diff options
author | Bad Diode <bd@badd10de.dev> | 2023-08-28 20:46:36 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2023-08-28 20:46:36 +0200 |
commit | 864f6b60f5f8d70c14d177256a0815fc9cabacef (patch) | |
tree | 24dc5b6a67151063bc40d2e7a3d0924c7a289f1f /src/uxn-core.s | |
parent | 6c2da62e1a5cc88dae68f0dfe3305974fb5d4467 (diff) | |
download | uxngba-864f6b60f5f8d70c14d177256a0815fc9cabacef.tar.gz uxngba-864f6b60f5f8d70c14d177256a0815fc9cabacef.zip |
Add absolute store instructions sta/sta2
Diffstat (limited to 'src/uxn-core.s')
-rw-r--r-- | src/uxn-core.s | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/uxn-core.s b/src/uxn-core.s index 7307dce..c290d17 100644 --- a/src/uxn-core.s +++ b/src/uxn-core.s | |||
@@ -111,16 +111,27 @@ uxn_ret: | |||
111 | strb \a, [\off] | 111 | strb \a, [\off] |
112 | .endm | 112 | .endm |
113 | 113 | ||
114 | .macro zload8 dst, off | 114 | .macro zload8 a, off |
115 | ldrb \dst, [r7, \off] | 115 | ldrb \a, [r7, \off] |
116 | .endm | 116 | .endm |
117 | 117 | ||
118 | .macro rload8 dst, off | 118 | .macro rload8 a, off |
119 | ldrb \dst, [r0, \off] | 119 | ldrb \a, [r0, \off] |
120 | .endm | 120 | .endm |
121 | 121 | ||
122 | .macro aload8 dst, off | 122 | .macro aload8 a, off |
123 | ldrb \dst, [r7, \off] | 123 | ldrb \a, [r7, \off] |
124 | .endm | ||
125 | |||
126 | .macro asave8 a, off | ||
127 | strb \a, [r7, \off] | ||
128 | .endm | ||
129 | |||
130 | .macro asave16 a, off | ||
131 | add \off, r7 | ||
132 | strb \a, [\off, #1] | ||
133 | lsr \a, #8 | ||
134 | strb \a, [\off] | ||
124 | .endm | 135 | .endm |
125 | 136 | ||
126 | .macro rsave8 a, off | 137 | .macro rsave8 a, off |
@@ -684,9 +695,15 @@ lda2: | |||
684 | b uxn_decode | 695 | b uxn_decode |
685 | 696 | ||
686 | sta: | 697 | sta: |
698 | wpop16 r4, r5 | ||
699 | wpop8 r3 | ||
700 | asave8 r3, r4 | ||
687 | b uxn_decode | 701 | b uxn_decode |
688 | 702 | ||
689 | sta2: | 703 | sta2: |
704 | wpop16 r4, r5 | ||
705 | wpop16 r3, r5 | ||
706 | asave16 r3, r4 | ||
690 | b uxn_decode | 707 | b uxn_decode |
691 | 708 | ||
692 | dei: | 709 | dei: |