Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ORG $1000
- START: ; first instruction of program
- move.w a,-(sp) ;push a
- move.w b,-(sp) ;push b
- move.l #x,-(sp) ;push x
- jsr QUAD
- QUAD
- move.w 10(sp),D2 ;pop a
- move.w 8(sp),D3 ;pop b
- move.w D2,D4 ;START 3*a
- add.w D2,D4
- add.w D2,D4 ;END 3*a
- move.w D4,D1
- cmp.w #0,D3
- BLT END ;if 0>b END
- move.w #0,D5 ;START 2*b
- add.w D3,D5
- add.w D3,D5 ;END 2*b
- move.w D5,D3
- END
- move.b #9,D0
- trap #15
- * Variables and Strings
- org $2000
- a dc.w 2
- b dc.w 36
- x ds.w 1
- END START ; last line of source
Add Comment
Please, Sign In to add comment