diff options
| author | kitty <nepeta@canaglie.net> | 2026-03-06 17:54:44 +1100 |
|---|---|---|
| committer | kitty <nepeta@canaglie.net> | 2026-03-06 17:54:44 +1100 |
| commit | 7a571b75a9cf3d3547d862c7125488006f376e2c (patch) | |
| tree | 4deb7cd54ea9994b7df9e27f2c1fe840b3a36017 | |
| parent | 0647f71d8a4dd5e93c0d64f13cea43978cef3ec8 (diff) | |
*/mod
| -rw-r--r-- | jefs.fs | 2 | ||||
| -rw-r--r-- | jefs.s | 12 | ||||
| -rw-r--r-- | readme.md | 2 |
3 files changed, 14 insertions, 2 deletions
@@ -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 */ ; @@ -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 {{{ @@ -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 |
