--------------------------- _ _ _ _ ___ __ __ _ __ _
| Kurt "Koleman" Koller | ( )/ ) /,\ ( ) ( __)( \/ ) ( ) ( \ ( )
| P.O. Box 50656 | ( \ ( )( )__ ( __)( )\/( ) (_|_) ( )\\( )
| Mendota, MN 55150-0656 | (_)\_) \_/ (____)(___)(_) (_)(_) ( )(_) \__)
---------------------------
UUCP: {crash tcnet}!orbit!pnet51!koleman
INET: kol...@pnet51.orb.mn.org
CC Carry Clear LS Low or Same
CS Carry Set LT Less Than
EQ Equal MI Minus
F False NE Not Equal
GE Greater or Equal PI Plus
GT Greater Than T True
HI High VC Overflow Clear
LE Less or Equal VS OverFlow Set
This command is a good way to set a Boolean Flag byte in a return value
for a function. As far as I know it is supported on all of the 680x0
processors. Feel free to e-mail me with any other questions.
I got all of this information from the S68000 User's Guide, which only
costs about $0.65 at our University Book Store. You can also call
Signetics and they will send you one free, plus a bunch of other useful
information on the 68000.
The phone # is 408-739-7700, ask for publications department.
Thanks,
--
Robert Faulkner co...@ccwf.cc.utexas.edu
/// Recursion: Thinking
\\\/// University of Texas about
\\// Amiga Computers Thinking
> These are not "documented" instructions. What do they do, and why would
> someone use them other than to save cycles or 10? Are they also used on the
> 020 030 040 etc?
These are the "set conditional" instructions, which are documented under
"Scc" like all the branches are collectively called "Bcc".
If the condition is true ("t" is always true, "f" never is), they
set the destination byte to all 1's, otherwise they clear it to
all 0's.
Obviously, their function can be emulated with other instruction
sequences (conditional branches are easiest), but that's true of
most 68000 instructions.
--
-Colin
They're magik, of course! Actually, they are individual branch codes
for the Scc instruction (set according to condition). The format is:
Scc.b <ea>
Scc is always a byte operation. If the specified condition is TRUE,
the byte destination is set to all 1's (-1). If it is FALSE, the
byte destination is set to all 0's. The 'cc' follows the DBcc
branch codes which is the same as the Bcc branch codes except for
the 't' and 'f' code (always true and always fast).
st D0 (always true), sets lower byte of D0 to 1's
sne D0 If not equal ...
sf D0 (always false), clears lower byte of D0
sge D0 If greater or equal then..
You can get 0, 1 longword results by following the Scc with a NEG
instruction, like this (for example):
moveq.l #0,D0
.
cmp ...
.
sne.b D0
neg.b D0
>Thanks,
>
>--------------------------- _ _ _ _ ___ __ __ _ __ _
>| Kurt "Koleman" Koller | ( )/ ) /,\ ( ) ( __)( \/ ) ( ) ( \ ( )
>| P.O. Box 50656 | ( \ ( )( )__ ( __)( )\/( ) (_|_) ( )\\( )
>| Mendota, MN 55150-0656 | (_)\_) \_/ (____)(___)(_) (_)(_) ( )(_) \__)
>---------------------------
>UUCP: {crash tcnet}!orbit!pnet51!koleman
>INET: kol...@pnet51.orb.mn.org
-Matt
--
Matthew Dillon dil...@Overload.Berkeley.CA.US
891 Regal Rd. uunet.uu.net!overload!dillon
Berkeley, Ca. 94708
USA
Stephan.
-- Scott Karlin knu...@spf.trw.com
-- TRW Data Systems Center Phone: (213) 812-7335
-- One Space Park, O2-1761
-- Redondo Beach, CA 90278-1071
Just to save face here...
The reason that I posted this inquiry is because I have 3 books here, one of
which is a Motorola reference on the 68000, none of which have any set
instructions under the heading Scc or any other similar heading.
That is why I asked here. I AM literate.