Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!hplabs!hpfcdc!hpislx!hplvli!boyne From: boyne@hplvli.HP.COM (Art Boyne) Newsgroups: comp.arch Subject: Re: 68000 architecture Message-ID: <310002@hplvli.HP.COM> Date: 9 Jun 89 15:09:51 GMT References: <658@geovision.UUCP> Organization: Loveland Inst. Div Lines: 26 gd@geovision.uucp (Gord Deinstadt) writes: >Actually, I don't mind the absolute addresses being signed; it's a >fairly minor issue. It's the signed offsets in base+offset mode that >burn me up. You *can* work around it (ie. still get a 64k address >range with 16-bit offsets) by fudging all your >base addresses by 32768; but you shouldn't have to. Signed offsets in address register direct with displacement mode are useful when dealing with stack frames (LINK command). Local variables are located at negative offsets from the *stack frame* pointer, parameters are at positive offsets. True, one could argue that the local variables are at positive offsets from the *stack* pointer, but it is a pain when writing assembler to remember to kludge the offsets while pushing parameters when calling another function (let's see... I've pushed a word and three longs, so I need x+14(SP), I think). It's a lot easier to use the unchanging negative offsets from the *stack frame* pointer. After writing >100K of 68000 assembler in the last 5 years, I have good reason to want the signed offsets. Yes, it means that you have to kludge to get a 64k address range, but many smaller systems don't have that much global/stack data, which is where most assembler is written. Bigger systems are written in HLL's and the compiler takes care of this automatically. :-) Art Boyne, boyne@hplvla.hp.com