no "continue" in bp 7 commands
[rrq/rrqforth.git] / math.asm
index c678d116d253a36486274e8f8fb4536eae550837..3b82bd49ccef3e290bc65a6e324ab17fc576e4a1 100644 (file)
--- a/math.asm
+++ b/math.asm
@@ -42,7 +42,7 @@ p_abs_end:
 
        WORD p_divmod,'/MOD',fasm
        ;; ( x y -- q r )
-       ;; divide signed x/y giving quotient q and reminder r
+       ;; divide signed x/y giving quotient q and remainder r
        pop rbx
        pop rax
        xor rdx,rdx
@@ -51,3 +51,13 @@ p_abs_end:
        push rdx
        next
 
+       WORD p_div,'/',fasm
+       ;; ( x y -- q )
+       ;; divide signed x/y giving quotient q and discard remainder
+       pop rbx
+       pop rax
+       xor rdx,rdx
+       idiv rbx
+       push rax
+       next
+