Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC840302); site dido.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!mcvax!enea!dido!john From: john@dido.UUCP (John Collins) Newsgroups: net.lang Subject: Re: Re: Optimization technique wanted... Message-ID: <160@dido.UUCP> Date: Thu, 29-Nov-84 08:12:05 EST Article-I.D.: dido.160 Posted: Thu Nov 29 08:12:05 1984 Date-Received: Sat, 1-Dec-84 19:16:33 EST References: <438@ima.UUCP> <258@scc.UUCP> <332@ut-sally.UUCP> Organization: ENEA DATA, Sweden Lines: 40 I once worked on a crazy British machine where you had a choice between - Signed 8-bit displacements for conditional branches. - Signed 9-bit displacements for unconditional branches. - Unsigned 7-bit displacements to an indirect word lower down in the code (which had to be inserted after some unconditional branch) if the above 2 proved too little. This meant that some code looked like (mnemonics different, won't bore you with those this time round). bz one bindir two one: ..... code ..... ................ bmi three | This could fall over with > 126 indirects bindir four two: .word five four: .word six three: The assembler gave no help whatsoever, so you wrote your program, and then produced an assembly listing with its 100 or so displacement errors and whittled them down by hand. I wrote 2 compilers for that machine. My eventual approach was to do almost everything by indirects with the compiler breaking code to jump around a block of indirect words every so often. Would love to hear comments on that lot! -- John Collins Please note that I am visiting Sweden. Address all replies to ist!inset!jmc Phone: +44 727 57267 Snail mail: 47 Cedarwood Drive, St Albans, Herts, AL4 0DN, England.