mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 12:08:07 +11:00
Rename (find) to FIND
I hadn't noticed that this word was almost ANS compliant.
This commit is contained in:
parent
175b4bc497
commit
db9885b8cf
2
blk/037
2
blk/037
@ -10,7 +10,7 @@ Entry management
|
|||||||
, n -- Write n in HERE and advance it.
|
, n -- Write n in HERE and advance it.
|
||||||
ALLOT n -- Move HERE by n bytes
|
ALLOT n -- Move HERE by n bytes
|
||||||
C, b -- Write byte b in HERE and advance it.
|
C, b -- Write byte b in HERE and advance it.
|
||||||
|
FIND w -- a f Like '?, but for w.
|
||||||
EMPTY -- Rewind HERE and CURRENT where they were at
|
EMPTY -- Rewind HERE and CURRENT where they were at
|
||||||
system initialization.
|
system initialization.
|
||||||
|
|
||||||
(cont.)
|
(cont.)
|
||||||
|
9
blk/131
9
blk/131
@ -1,9 +0,0 @@
|
|||||||
( Relink a regular Forth full interpreter. )
|
|
||||||
: RLCORE
|
|
||||||
LIT< [ (find) DROP ( target )
|
|
||||||
DUP 3 - @ ( t prevoff )
|
|
||||||
( subtract [ name length )
|
|
||||||
1- ( t o )
|
|
||||||
RLDICT
|
|
||||||
;
|
|
||||||
|
|
2
blk/156
2
blk/156
@ -1,4 +1,4 @@
|
|||||||
: EMPTY
|
: EMPTY
|
||||||
LIT< _sys (find) NOT IF ABORT THEN
|
LIT< _sys FIND NOT IF ABORT THEN
|
||||||
DUP HERE ! CURRENT ! ;
|
DUP HERE ! CURRENT ! ;
|
||||||
|
|
||||||
|
2
blk/263
2
blk/263
@ -11,5 +11,5 @@ VARIABLE XCURRENT
|
|||||||
: X['] XCON ' _xapply LITA XCOFF ;
|
: X['] XCON ' _xapply LITA XCOFF ;
|
||||||
: XCOMPILE
|
: XCOMPILE
|
||||||
XCON ' _xapply LITA
|
XCON ' _xapply LITA
|
||||||
LIT< , (find) DROP _xapply , XCOFF ;
|
LIT< , FIND DROP _xapply , XCOFF ;
|
||||||
: X[COMPILE] XCON ' _xapply , XCOFF ;
|
: X[COMPILE] XCON ' _xapply , XCOFF ;
|
||||||
|
4
blk/393
4
blk/393
@ -6,11 +6,11 @@
|
|||||||
: XYPOS 0x40 RAM+ ;
|
: XYPOS 0x40 RAM+ ;
|
||||||
|
|
||||||
( w -- a f )
|
( w -- a f )
|
||||||
: (find) CURRENT @ SWAP _find ;
|
: FIND CURRENT @ SWAP _find ;
|
||||||
|
|
||||||
: QUIT
|
: QUIT
|
||||||
(resRS)
|
(resRS)
|
||||||
0 0x08 RAM+ ! ( 08 == C<* override )
|
0 0x08 RAM+ ! ( 08 == C<* override )
|
||||||
LIT< (main) (find) DROP EXECUTE
|
LIT< (main) FIND DROP EXECUTE
|
||||||
;
|
;
|
||||||
1 25 LOADR+ ( xcomp core low )
|
1 25 LOADR+ ( xcomp core low )
|
||||||
|
2
blk/394
2
blk/394
@ -1,5 +1,5 @@
|
|||||||
: ABORT (resSP) QUIT ;
|
: ABORT (resSP) QUIT ;
|
||||||
: ERR LIT< (print) (find) IF EXECUTE THEN ABORT ;
|
: ERR LIT< (print) FIND IF EXECUTE THEN ABORT ;
|
||||||
: = CMP NOT ; : < CMP -1 = ; : > CMP 1 = ;
|
: = CMP NOT ; : < CMP -1 = ; : > CMP 1 = ;
|
||||||
: 0< 32767 > ; : >= < NOT ; : <= > NOT ; : 0>= 0< NOT ;
|
: 0< 32767 > ; : >= < NOT ; : <= > NOT ; : 0>= 0< NOT ;
|
||||||
: >< ( n l h -- f ) 2 PICK > ( n l f ) ROT ROT > AND ;
|
: >< ( n l h -- f ) 2 PICK > ( n l f ) ROT ROT > AND ;
|
||||||
|
2
blk/403
2
blk/403
@ -4,5 +4,5 @@
|
|||||||
(parseb) IF EXIT THEN
|
(parseb) IF EXIT THEN
|
||||||
(parsed) IF EXIT THEN
|
(parsed) IF EXIT THEN
|
||||||
( nothing works )
|
( nothing works )
|
||||||
LIT< (wnf) (find) IF EXECUTE ELSE ABORT THEN
|
LIT< (wnf) FIND IF EXECUTE ELSE ABORT THEN
|
||||||
;
|
;
|
||||||
|
4
blk/410
4
blk/410
@ -1,7 +1,7 @@
|
|||||||
: '? WORD (find) ;
|
: '? WORD FIND ;
|
||||||
: '
|
: '
|
||||||
'? (?br) [ 4 , ] EXIT
|
'? (?br) [ 4 , ] EXIT
|
||||||
LIT< (wnf) (find) DROP EXECUTE
|
LIT< (wnf) FIND DROP EXECUTE
|
||||||
;
|
;
|
||||||
: ROLL
|
: ROLL
|
||||||
DUP NOT IF EXIT THEN
|
DUP NOT IF EXIT THEN
|
||||||
|
2
blk/432
2
blk/432
@ -1,7 +1,7 @@
|
|||||||
: INTERPRET
|
: INTERPRET
|
||||||
BEGIN
|
BEGIN
|
||||||
WORD DUP C@ EOT? IF DROP EXIT THEN
|
WORD DUP C@ EOT? IF DROP EXIT THEN
|
||||||
(find) NOT IF (parse) ELSE EXECUTE THEN
|
FIND NOT IF (parse) ELSE EXECUTE THEN
|
||||||
C<? NOT IF SPC LIT< ok (print) NL THEN
|
C<? NOT IF SPC LIT< ok (print) NL THEN
|
||||||
AGAIN ;
|
AGAIN ;
|
||||||
( Read from BOOT C< PTR and inc it. )
|
( Read from BOOT C< PTR and inc it. )
|
||||||
|
2
blk/437
2
blk/437
@ -9,7 +9,7 @@
|
|||||||
(entry)
|
(entry)
|
||||||
[ 14 ( == compiledWord ) LITN ] C,
|
[ 14 ( == compiledWord ) LITN ] C,
|
||||||
BEGIN
|
BEGIN
|
||||||
WORD (find)
|
WORD FIND
|
||||||
IF ( is word ) DUP IMMED? IF EXECUTE ELSE , THEN
|
IF ( is word ) DUP IMMED? IF EXECUTE ELSE , THEN
|
||||||
ELSE ( maybe number ) (parse) LITN THEN
|
ELSE ( maybe number ) (parse) LITN THEN
|
||||||
AGAIN ;
|
AGAIN ;
|
||||||
|
BIN
emul/forth.bin
BIN
emul/forth.bin
Binary file not shown.
Loading…
Reference in New Issue
Block a user