>>> I've always thought variables and such went at the bottom... or >>> is that just m68k asm? >>> >>> John >> >> you can put them anywhere. there's no typechecking in assembly >> and the linker doesn't care. >> >> - erik > > Ok, maybe that was just a style thing they taught us. > > John
Most old school programmers put the variables at the bottom so the assembled binary could start executing from the top avoiding the need to jmp around the data. Even early C programs did this. Check out dmr's old C compilers. The globals were at the end of the file. Early PDP-11 binaries could be loaded with the a.out headers intact and run. The magic number was a branch relative eight words instruction and would jump the header.
