summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jefs.fs2
-rw-r--r--jefs.s12
-rw-r--r--readme.md2
3 files changed, 14 insertions, 2 deletions
diff --git a/jefs.fs b/jefs.fs
index 8ba1e66..9d774c0 100644
--- a/jefs.fs
+++ b/jefs.fs
@@ -175,8 +175,6 @@ decimal
: mod /mod drop ;
: negate 0 swap - ;
: abs dup 0< if negate then ;
-\ i don't know how to implement these correctly with 64 bit single cells
-: */mod >r * r> /mod ;
: */ */mod nip ;
: % 100 */ ;
diff --git a/jefs.s b/jefs.s
index 2ad8020..47cb67b 100644
--- a/jefs.s
+++ b/jefs.s
@@ -916,6 +916,18 @@ defword "xor", _xor, 0
defword "invert", invert, 0
not qword [r14]
ret
+
+defword "*/mod", starslashmod, 0
+ pspop r15 ; n3
+ pspop r13 ; n2
+ pspop rax ; n1
+
+ imul r13
+ idiv r15
+
+ pspush rdx
+ pspush rax
+ ret
; }}}
; comparison {{{
diff --git a/readme.md b/readme.md
index eca9368..33d7d96 100644
--- a/readme.md
+++ b/readme.md
@@ -18,6 +18,8 @@ i am thinking of completing before that.
- reading from files
- DUMP
- argc + argv
+- testing
+- documentation
not all of these will be included. we'll see