Add 'OPD/OPDLab4/' from commit 'ac3927c31a1a2fb5434d612ac9ff1feda27d3672'

git-subtree-dir: OPD/OPDLab4
git-subtree-mainline: fc2fb68827
git-subtree-split: ac3927c31a
This commit is contained in:
LeterZP
2026-04-24 01:29:16 +03:00
4 changed files with 534 additions and 0 deletions
+46
View File
@@ -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