Merge commit '4c63632d609e04c810222271475b238d75edd010' as 'OPD/OPDLab4'
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
ORG 0x05C6
|
||||
START: CLA
|
||||
ST result
|
||||
LD X
|
||||
INC
|
||||
PUSH
|
||||
CALL 0x06E5
|
||||
POP
|
||||
ADD result
|
||||
ST result
|
||||
LD Z
|
||||
PUSH
|
||||
CALL 0x06E5
|
||||
POP
|
||||
ADD result
|
||||
ST result
|
||||
LD Y
|
||||
DEC
|
||||
PUSH
|
||||
CALL 0x06E5
|
||||
POP
|
||||
SUB result
|
||||
ST result
|
||||
HLT
|
||||
Z: WORD 0xFFF4
|
||||
Y: WORD 0x0000
|
||||
X: WORD 0xFDDE
|
||||
result: WORD ?
|
||||
|
||||
ORG 0x06E5
|
||||
LD &1
|
||||
BEQ A
|
||||
BPL B
|
||||
A: CMP const1
|
||||
BLT B
|
||||
BEQ B
|
||||
ASL
|
||||
ASL
|
||||
SUB &1
|
||||
ADD const2
|
||||
JUMP C
|
||||
B: LD const1
|
||||
C: ST &1
|
||||
RET
|
||||
const1: WORD 0xFAB3
|
||||
const2: WORD 0x0064
|
||||
Reference in New Issue
Block a user