1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 22:28:06 +11:00

forth: fix "NOT"

Ouh, I need a solution here...
This commit is contained in:
Virgil Dupras 2020-03-11 19:59:10 -04:00
parent ea5f33558a
commit d8542f7cf7

View File

@ -658,6 +658,7 @@ CONSTANT:
.dw FETCH
.dw EXIT
; TODO: find a way to express IF/THEN/ELSE in core dict more easily.
; ( f -- f )
; IF 0 ELSE 1 THEN
.db "NOT"
@ -665,13 +666,14 @@ CONSTANT:
.dw CONSTANT
NOT:
.dw compiledWord
.dw IF
.dw CBRANCH
.db 8
.dw NUMBER
.dw 0
.dw ELSE
.dw BRANCH
.db 5
.dw NUMBER
.dw 1
.dw THEN
.dw EXIT
; ( n1 n2 -- f )