68000 Assembly/Conditional Tests

From Wikibooks, open books for an open world
Jump to navigation Jump to search

Wherever you see "cc" in an instruction, you should replace it with the appropriate conditional test code. Refer to this table for what each test does.

Code Description Test
T* True, always tests true. Not available for Bcc or Jcc. 1
F False, always tests false. Not available for Bcc or Jcc. 0
HI High. True if Carry and Zero are both clear. not C and not Z
LS Low or same. True if either Carry or Zero are set. C or Z
CC Carry Clear. True if Carry is clear. not C
CS Carry Set. True if Carry is set. C
NE Not Equal. True if Zero flag is clear. not Z
EQ Equal. True if Zero flag is set. Z
VC Overflow Clear. True if Overflow is clear. not V
VS Overflow set. True if Overflow is set. V
PL Plus. True if Negative is clear. not N
MI Minus. True if Negative is set. N
GE Greater or Equal (N and V) or (not N and not V)
LT Less Than (N and not V) or (not N and V)
GT Greater Than ((N and V) or (not N and not V)) and not Z
LE Less than or Equal Z or (N and not V) or (not N and V)