CompuServe Messages

Lattice C

#: 4131 S1/SoftwareForum unknown
    04-Jan-86 03:25:36
Sb: #4054-Lattice C
Fm: Bob Perez 76003,102
To: Larry Miller 72336,3241

This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.

You've got the same situation here with data, text, etc. (the 68000 is particularly well suited for such distinctions..in fact, it won't let you do a pc-relative write to a destination operand since that's a step in the direction of self-modifying code). Frankly, I don't know whether the loader handles absolute addressing or not. I'm just so used to writing position independent code that I've never thought much about what it would be like _not_ to write code that way. The situation's a bit different on the Mac since your code segments can actually be moved around WHILE EXECUTING, so a loader couldn't handle that much juggling. pea myThing(PC) is one way to invoke pc-relative addressing. There's also pc-relative with an index: pea myThing(pc,d0.l) With the Amiga assembler an instruction of the type move label,d0 also invokes pc-relative addressing. Likewise, the instruction move label(d0),d1 invokes pc-relative with index addressing.