kkaempf@rmi.UUCP (Klaus Kaempf) (11/05/88)
What's wrong with the following program ?? -- far code far data AbsExecBase equ $4 move.l $4,a6 movea.l $00000004,a6 move.l ExecBase,a6 movea.l ExecBase,a6 move.l AbsExecBase,a6 movea.l AbsExecBase,a6 bra.s Label bra Label ds.b 10 Label section ,data ExecBase equ $4 section ,code end -- Nothing you say ? Well, let's look what Manx's AS 3.6a has to say: -- > as bautz.asm Aztec 68000 Assembler 3.6a 12-18-87 Label ^ File bautz.asm; Line 17 # Label mismatch - Pc=0026 Label=002a,sdi=4 FATAL ERROR - Ending PC's differ: Pass 1=2a Pass2=26 -- Ha ! That's the assembler trying to optimize ON THE SECOND PASS ONLY ! Ok, then I try it without optimization and set the -n option. > as -n bautz.asm And voila! No assembly errors. Fine, let's start the linker: >ln bautz.o Aztec C68K Linker 3.6a 12-18-87 Base: 000000 Code: 00002c Data: 000000 Udata: 000000 Total: 00002c Relocation table invalid from 0 to 252, of -8!! So what am I doing wrong ???? Thanks for any help! Klaus P.S: For those of you out there with the Manx Assembler at hand, have a look at the listing file the assembler generates. Or the symbol dump the linker produces or even the 'final' program. Very interesting.
lphillips@lpami.van-bc.UUCP (Larry Phillips) (11/07/88)
> What's wrong with the following program ?? > > -- > far code > far data > > AbsExecBase equ $4 > > move.l $4,a6 > movea.l $00000004,a6 > move.l ExecBase,a6 > movea.l ExecBase,a6 > move.l AbsExecBase,a6 > movea.l AbsExecBase,a6 > > bra.s Label > bra Label > > ds.b 10 > Label > > section ,data > ExecBase equ $4 > section ,code > end > -- > > Nothing you say ? Well, let's look what Manx's AS 3.6a has to say: I have always found the Manx assembler to be very good at assembling the output of their compiler, but nearly useless for any serious assembly work. I tried this, and though I did not get the same results you did, I too was unable to get it through the linker. I tried it on A68K, Charlie Gibbs' freely distributable assembler, and other than having to remove the 'far' directives, it ate it just fine, as did Blink 6.7. -larry -- "Intelligent CPU? I thought you said Intel CPU!" -Anonymous IBM designer- +----------------------------------------------------------------+ | // Larry Phillips | | \X/ lpami.wimsey.bc.ca!lphillips or van-bc!lpami!lphillips | | COMPUSERVE: 76703,4322 | +----------------------------------------------------------------+