aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2023-08-29 08:42:27 +0200
committerBad Diode <bd@badd10de.dev>2023-08-29 08:42:27 +0200
commitc0f929c1ab793e45d1e38b41bc41e376a7e94621 (patch)
treec3790400bf819d7c803ead63fe4b4995afe8cf75 /src
parent864f6b60f5f8d70c14d177256a0815fc9cabacef (diff)
downloaduxngba-c0f929c1ab793e45d1e38b41bc41e376a7e94621.tar.gz
uxngba-c0f929c1ab793e45d1e38b41bc41e376a7e94621.zip
Add JMP instruction
Diffstat (limited to 'src')
-rw-r--r--src/main.c6
-rw-r--r--src/uxn-core.s5
2 files changed, 9 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index 8dbaf45..9199f31 100644
--- a/src/main.c
+++ b/src/main.c
@@ -136,8 +136,11 @@ init_uxn() {
136 // LDA /STA 136 // LDA /STA
137 // 0xa0, 0x01, 0x05, 0x14, 0xa0, 0xaa, 0xbb, 137 // 0xa0, 0x01, 0x05, 0x14, 0xa0, 0xaa, 0xbb,
138 // 0xa0, 0x01, 0x05, 0x34, 0xa0, 0xcc, 0xdd, 138 // 0xa0, 0x01, 0x05, 0x34, 0xa0, 0xcc, 0xdd,
139 0xa0, 0xab, 0xcd, 0xa0, 0x01, 0x08, 0x15, 139 // 0xa0, 0xab, 0xcd, 0xa0, 0x01, 0x08, 0x15,
140 // 0xa0, 0xab, 0xcd, 0xa0, 0x01, 0x08, 0x35, 140 // 0xa0, 0xab, 0xcd, 0xa0, 0x01, 0x08, 0x35,
141 // JMP
142 // 0x80, 0x01, 0x0c, 0x00, 0x80, 0xaa,
143 0xa0, 0x01, 0x05, 0x2c, 0x00, 0x80, 0xbb,
141 }; 144 };
142 memcpy(uxn_ram + PAGE_PROGRAM, uxn_rom, sizeof(uxn_rom)); 145 memcpy(uxn_ram + PAGE_PROGRAM, uxn_rom, sizeof(uxn_rom));
143} 146}
@@ -149,7 +152,6 @@ init_uxn() {
149// - OPr modes 152// - OPr modes
150// - OPk modes 153// - OPk modes
151// - OPrk modes 154// - OPrk modes
152//
153 155
154int 156int
155main(void) { 157main(void) {
diff --git a/src/uxn-core.s b/src/uxn-core.s
index c290d17..c14c0f3 100644
--- a/src/uxn-core.s
+++ b/src/uxn-core.s
@@ -598,9 +598,14 @@ lth2:
598 b uxn_decode 598 b uxn_decode
599 599
600jmp: 600jmp:
601 wpop8s r3
602 add r0, r3
601 b uxn_decode 603 b uxn_decode
602 604
603jmp2: 605jmp2:
606 wpop16 r3, r5
607 mov r0, r7
608 add r0, r0, r3
604 b uxn_decode 609 b uxn_decode
605 610
606jcn: 611jcn: