home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.sys.amiga.demos
- Path: sparky!uunet!usc!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-cv!hp-pcd!hpmcaa!hpmcaa!bryanf
- From: bryanf@hpmcaa (Bryan Ford)
- Subject: Re: Interrupt vectors.. still.
- Message-ID: <1992Aug18.155949.6677@hpmcaa.mcm.hp.com>
- Sender: news@hpmcaa.mcm.hp.com (News Administrator)
- Nntp-Posting-Host: hpmcaa.mcm.hp.com
- Organization: HP Cardiology Business Unit - McMinnville, OR
- X-Newsreader: Tin 1.1 PL4
- References: <2331@forty2.physik.unizh.ch>
- Date: Tue, 18 Aug 1992 15:59:49 GMT
- Lines: 17
-
- cschneid@amiga.physik.unizh.ch (Christian Schneider) writes:
- > In article <umage.713636144@mcl> umage@mcl.ucsb.edu (Vorpal Greed) writes:
- > >Also i found a cool trick for when you write a routine that returns success
- > >or failure.. I used to stick the return code in d0 or someplace, but it's
- > >just a easy to stick em in the ccr ! That way, you can do:
- >
- > Nope! Don't do this! You'd have to to a move d0,sr on mc68000 and a
- > move d0,ccr on mc68010+ ! (move d0,sr is priviledged on 68010+)
-
- Although it definitely wouldn't be a good idea to use the move->ccr or
- move->sr to return result codes, there are many other ways to set the condition
- codes. When a routine returns some value in d0, say, it's often easy to
- arrange that the CCR reflect that value (say, the Z flag set or clear
- according to the zero/nonzero status of D0); this saves the tst.l instruction.
- But then of course you have to remember which routines support this. :-)
-
- Bryan
-