Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,30 @@
|
|||
macro if2_EQ_DOT_L 1,2,3,4
|
||||
;input: 1 = first param (can be any addressing mode compatible with CMP)
|
||||
; 2 = second param (used for condition 1)
|
||||
; 3 = third param (used for condition 2)
|
||||
; 4 = output for comparison results (must be a data register, and can't be 1, 2, or 3. The macro will not enforce this!)
|
||||
|
||||
; <backslash>@ represents a macro-local label that is scoped for each instance of that macro in your program
|
||||
; and doesn't cause "label already defined" conflicts if the macro is used multiple times
|
||||
|
||||
MOVEQ #0,\4
|
||||
CMP.L \2,\1
|
||||
BEQ \@eqCond1
|
||||
;condition 1 failed.
|
||||
CMP.L \3,\1
|
||||
BEQ \@TwoButNotOne
|
||||
;both failed
|
||||
clr.b d0
|
||||
bra \@done
|
||||
\@eqCond1:
|
||||
CMP.L \3,\1
|
||||
BEQ \@Both
|
||||
move.b #2,d0
|
||||
bra \@done
|
||||
\@Both:
|
||||
move.b #3,d0
|
||||
bra \@done
|
||||
\@TwoButNotOne:
|
||||
move.b #1,d0
|
||||
\@done:
|
||||
endm
|
||||
Loading…
Add table
Add a link
Reference in a new issue