projects
/
rrq
/
rrqforth.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added open-file" and load-file"
[rrq/rrqforth.git]
/
math.asm
diff --git
a/math.asm
b/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 )
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 rem
a
inder r
pop rbx
pop rax
xor rdx,rdx
pop rbx
pop rax
xor rdx,rdx
@@
-51,3
+51,13
@@
p_abs_end:
push rdx
next
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
+