commit a60c9806ec9167bcfd252973e1146f2d1632116b
parent 6123c6262e1e9f16a1ca42e4b81fc2420ce6c20b
Author: Christian Ermann <christian.ermann@joescan.com>
Date: Fri, 11 Jul 2025 19:37:08 -0700
Add '/' and '/mod'
Diffstat:
1 file changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/forth.s b/src/forth.s
@@ -1325,6 +1325,18 @@ defcode "*", times, 0x2F0C9F3D
mul w, x, w
next
+defcode "/", div, 0x2A0C975E
+ pop x
+ div w, x, w
+ next
+
+defcode "/mod", div_mod, 0x02E40C82
+ lw x, 0(psp)
+ rem y, x, w
+ div w, x, w
+ sw y, 0(psp)
+ next
+
defcode "not", not_, 0x29B19C8A
not w, w
next