home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!sun-barr!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!agate!stanford.edu!rock!concert!sas!mozart.unx.sas.com!jamie
- From: jamie@cdevil.unx.sas.com (James Cooper)
- Subject: Re: cmpi.l #,d16(pc) with SAS6asm, A68K, etc
- Originator: jamie@cdevil.unx.sas.com
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <BxM2Fp.42u@unx.sas.com>
- Date: Thu, 12 Nov 1992 16:14:12 GMT
- References: <1dlshuINN6f6@werple.apana.org.au> <69309@cup.portal.com> <BxKq3t.E9q@unx.sas.com>
- Nntp-Posting-Host: cdevil.unx.sas.com
- Organization: SAS Institute Inc.
- Lines: 50
-
-
- In article <BxKq3t.E9q@unx.sas.com>, jamie@cdevil.unx.sas.com (James Cooper) writes:
- >
- >In article <69309@cup.portal.com>, Aurelius@cup.portal.com (Mark Christian Barnes) writes:
- > [various arguments about whether (d16,pc) mode is legal for cmpi on
- > 68000 deleted]
- >
- >Now the acid test is to execute this statement on a 68000, and see if it
- >works or not... well, it doesn't crash my machine, but I'd have to spend
- >a few minutes writing to actually see if it works or not... :-)
-
- O.K. I did some tests here, with an assembler which will work with this
- addressing mode for this instruction.
-
- Sample program:
-
- section code
- moveq #0,d0
- cmpi.l #1,12(pc)
- beq.b 1$
- moveq #5,d0
- 1$:
- rts
-
- dc.l 1,1,1,1
-
- end
-
- Results:
-
- Above program work fine on both 68000 and 68030 (my only test processors
- available) for sizes of .W and .L.
-
- However, the .B size only works on my 68030. The instruction:
-
- cmpi.b #1,12(pc)
-
- causes a illegal instruction exception on a 68000.
-
- So, can we forget about this now? The answer to the original question
- is that yes, this should be allowed, but the .B size should be illegal
- unless you are assembling for an '020 or greater.
-
- --
- ---------------
- Jim Cooper
- (jamie@unx.sas.com) bix: jcooper
-
- Any opinions expressed herein are mine (Mine, all mine! Ha, ha, ha!),
- and not necessarily those of my employer.
-