Logically flip SPACE? to NSPACE

WORD was using it like this, and it's easier to fix it this way rather
than insert an INVERT into WORD.
This commit is contained in:
2026-02-27 19:51:34 +00:00
parent 42a9c5db08
commit 6474c2f227

View File

@@ -1105,39 +1105,39 @@
;; => 0x1c bytes
;; : SPACE? ( byte -- bool )
;; DUP 9 = SWAP \ Compare to horizontal tab
;; DUP 10 = SWAP \ Compare to line-feed
;; DUP 13 = SWAP \ Compare to carriage return
;; 32 = \ Compare to space
;; OR OR OR \ Or all results together
;; : NSPACE ( byte -- bool )
;; DUP 9 <> SWAP \ Compare to horizontal tab
;; DUP 10 <> SWAP \ Compare to line-feed
;; DUP 13 <> SWAP \ Compare to carriage return
;; 32 <> \ Compare to space
;; AND AND AND \ And all results together
;; ;
(data (i32.const 0x0600)
"\e4\05\00\00"
"\06SPACE?\00"
"\06NSPACE\00"
"\00\00\00\00"
"\08\02\00\00" ;; DUP
"\18\04\00\00" ;; LIT
"\09\00\00\00" ;; 9
"\fc\02\00\00" ;; =
"\08\03\00\00" ;; <>
"\28\02\00\00" ;; SWAP
"\08\02\00\00" ;; DUP
"\18\04\00\00" ;; LIT
"\0a\00\00\00" ;; 10
"\fc\02\00\00" ;; =
"\08\03\00\00" ;; <>
"\28\02\00\00" ;; SWAP
"\08\02\00\00" ;; DUP
"\18\04\00\00" ;; LIT
"\0d\00\00\00" ;; 13
"\fc\02\00\00" ;; =
"\08\03\00\00" ;; <>
"\28\02\00\00" ;; SWAP
"\18\04\00\00" ;; LIT
"\20\00\00\00" ;; 32
"\fc\02\00\00" ;; =
"\98\03\00\00" ;; OR
"\98\03\00\00" ;; OR
"\98\03\00\00" ;; OR
"\08\03\00\00" ;; <>
"\8c\03\00\00" ;; AND
"\8c\03\00\00" ;; AND
"\8c\03\00\00" ;; AND
"\0c\04\00\00") ;; EXIT
;; => 0x68 bytes
@@ -1146,7 +1146,7 @@
;; 0 \ Initial length
;;
;; KEY \ Get byte from input
;; TUCK SPACE? 0BRANCH [60] \ Check if whitespace
;; TUCK NSPACE 0BRANCH [60] \ Check if whitespace
;; TUCK WORDBUF + C! \ Append byte to WORDBUF
;; 1+ \ Increment length
;; DUP 32 >= 0BRANCH [8] EXIT \ Exit if at max length
@@ -1165,7 +1165,7 @@
"\00\00\00\00" ;; 0
"\84\04\00\00" ;; KEY
"\f0\05\00\00" ;; TUCK
"\0c\06\00\00" ;; SPACE?
"\0c\06\00\00" ;; NSPACE
"\b4\04\00\00" ;; 0BRANCH
"\3c\00\00\00" ;; 60
"\f0\05\00\00" ;; TUCK