diff options
author | Bad Diode <bd@badd10de.dev> | 2023-08-29 08:42:27 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-08-29 08:42:27 +0200 |
commit | c0f929c1ab793e45d1e38b41bc41e376a7e94621 (patch) | |
tree | c3790400bf819d7c803ead63fe4b4995afe8cf75 | |
parent | 864f6b60f5f8d70c14d177256a0815fc9cabacef (diff) | |
download | uxngba-c0f929c1ab793e45d1e38b41bc41e376a7e94621.tar.gz uxngba-c0f929c1ab793e45d1e38b41bc41e376a7e94621.zip |
Add JMP instruction
-rw-r--r-- | src/main.c | 6 | ||||
-rw-r--r-- | src/uxn-core.s | 5 |
2 files changed, 9 insertions, 2 deletions
@@ -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 | ||
154 | int | 156 | int |
155 | main(void) { | 157 | main(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 | ||
600 | jmp: | 600 | jmp: |
601 | wpop8s r3 | ||
602 | add r0, r3 | ||
601 | b uxn_decode | 603 | b uxn_decode |
602 | 604 | ||
603 | jmp2: | 605 | jmp2: |
606 | wpop16 r3, r5 | ||
607 | mov r0, r7 | ||
608 | add r0, r0, r3 | ||
604 | b uxn_decode | 609 | b uxn_decode |
605 | 610 | ||
606 | jcn: | 611 | jcn: |