Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!cornell!uw-beaver!tikal!amc!mikem From: mikem@amc.UUCP (Mike McGinnis) Newsgroups: comp.sys.m68k Subject: Re: addq.w #n,sp and a pop quiz Keywords: C asm addq cmpa Message-ID: <810@amc.UUCP> Date: 14 Dec 88 17:05:24 GMT References: <5005@bsu-cs.UUCP> <5460@cbmvax.UUCP> <1100@ncar.ucar.edu> <4350@Portia.Stanford.EDU> Distribution: na Organization: Applied Microsystems Corp.; Redmond, WA Lines: 30 In article <4350@Portia.Stanford.EDU>, duggie@Jessica.stanford.edu (Doug Felt) writes: > In article <1737@oakhill.UUCP> davet@oakhill.UUCP (David Trissel) writes: > > > > [stuff deleted] > > > >There is only one place in the instruction set where a data register is > >implicitly sign-extended. Where? > > > > I believe this instruction is CMPA ,An where a word-length value > in the effective address field (possibly a data register) is > sign-extended before being compared with the address register. > > > > > -- Dave Trissel Motorola Semiconductor, Austin Texas > > Doug Felt > Courseware Authoring Tools Project The CMPA instruction implies that the destination operand is an address register. The only place a data register will be extended to a long is the MOVEQ instruction. The source operand must be no more than 3 bits (37.5 cents :), and the value gets placed in the destination operand (data register), then extended to a long. Do I win a cupie doll??? Michael E. McGinnis Applied Microsytems Corp. "You wake up lost in an empty town, wondering why no one else is around" "Look up to see a giant boy - you've just become his brand new toy..."