projects
/
rrq
/
rrqforth.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
4a6f8e4
)
fixing inveresed logic
author
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sun, 30 May 2021 13:26:16 +0000
(23:26 +1000)
committer
Ralph Ronnquist
<ralph.ronnquist@gmail.com>
Sun, 30 May 2021 13:26:16 +0000
(23:26 +1000)
logic.asm
patch
|
blob
|
history
diff --git
a/logic.asm
b/logic.asm
index 53673a8272dc88524a9dbb0b334579832ed18e76..56dd2db88254b8fbf190d3a69ddab35d64d8df28 100644
(file)
--- a/
logic.asm
+++ b/
logic.asm
@@
-52,18
+52,15
@@
pop_true_next:
pop rax
pop rbx
cmp qword [rsp],rbx
pop rax
pop rbx
cmp qword [rsp],rbx
- jl p
_within_no
t
+ jl p
op_false_nex
t
cmp qword [rsp],rax
cmp qword [rsp],rax
- jge p_within_not
- not rcx
-p_within_not:
- next
-
+ jge pop_false_next
+ jmp pop_true_next
+
WORD p_0less, '0<',fasm
;; ( n -- flag )
;; flag is true (non-zero) if and only if n is less than zero.
WORD p_0less, '0<',fasm
;; ( n -- flag )
;; flag is true (non-zero) if and only if n is less than zero.
- pop rax
- cmp rax,qword [rsp]
+ cmp qword [rsp],0
jl pop_true_next
jmp pop_false_next
jl pop_true_next
jmp pop_false_next
@@
-78,7
+75,7
@@
p_within_not:
;; ( n1 n2 -- flag )
;; flag is true if and only if n1 is less than n2.
pop rax
;; ( n1 n2 -- flag )
;; flag is true if and only if n1 is less than n2.
pop rax
- cmp
rax,qword [rsp]
+ cmp
qword [rsp],rax
jl pop_true_next
jmp pop_false_next
jl pop_true_next
jmp pop_false_next
@@
-86,7
+83,7
@@
p_within_not:
;; ( n1 n2 -- flag )
;; flag is true if and only if n1 is less than n2.
pop rax
;; ( n1 n2 -- flag )
;; flag is true if and only if n1 is less than n2.
pop rax
- cmp
rax,qword [rsp]
+ cmp
qword [rsp],rax
jle pop_true_next
jmp pop_false_next
jle pop_true_next
jmp pop_false_next
@@
-95,7
+92,7
@@
p_within_not:
;; flag is true if and only if x1 is bit-for-bit the same as
;; x2.
pop rax
;; flag is true if and only if x1 is bit-for-bit the same as
;; x2.
pop rax
- cmp
rax,qword [rsp]
+ cmp
qword [rsp],rax
je pop_true_next
jmp pop_false_next
je pop_true_next
jmp pop_false_next
@@
-104,7
+101,7
@@
p_within_not:
;; flag is true if and only if x1 is bit-for-bit the same as
;; x2.
pop rax
;; flag is true if and only if x1 is bit-for-bit the same as
;; x2.
pop rax
- cmp qword [rsp],
rax
+ cmp qword [rsp],rax
jne pop_true_next
jmp pop_false_next
jne pop_true_next
jmp pop_false_next
@@
-112,7
+109,7
@@
p_within_not:
;; ( n1 n2 -- flag )
;; flag is true if and only if n1 is greater than n2.
pop rax
;; ( n1 n2 -- flag )
;; flag is true if and only if n1 is greater than n2.
pop rax
- cmp
rax,qword [rsp]
+ cmp
qword [rsp],rax
jg pop_true_next
jmp pop_false_next
jg pop_true_next
jmp pop_false_next
@@
-120,6
+117,6
@@
p_within_not:
;; ( n1 n2 -- flag )
;; flag is true if and only if n1 is greater than n2.
pop rax
;; ( n1 n2 -- flag )
;; flag is true if and only if n1 is greater than n2.
pop rax
- cmp
rax,qword [rsp]
+ cmp
qword [rsp],rax
jge pop_true_next
jmp pop_false_next
jge pop_true_next
jmp pop_false_next