Skip to content

Commit e90b18e

Browse files
author
theBF
committed
Update FINDNAME.FTH
1 parent caad188 commit e90b18e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

LIB.ITC/FINDNAME.FTH

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
\ findname.fth
2-
NEEDS .S FROM DSK1.TOOLS
3-
NEEDS S= FROM DSK1.COMPARE
4-
NEEDS 4TH FROM DSK1.3RD4TH
2+
NEEDS .S FROM DSK1.TOOLS
3+
NEEDS COMPARE FROM DSK1.COMPARE
4+
NEEDS 4TH FROM DSK1.3RD4TH
55

6-
: 2OVER ( a b c d -- a b c d a b) POSTPONE 4TH POSTPONE 4TH ; IMMEDIATE
6+
: 2OVER ( a b c d -- a b c d a b) POSTPONE 4TH POSTPONE 4TH ; IMMEDIATE
77

88
: FIND-NAME ( addr len -- nfa ) \ nfa is "name field address"
99
CONTEXT @ @ ( -- nfa )
10-
BEGIN DUP
11-
WHILE ( tos<>0)
12-
DUP 1+ 2OVER S=
10+
BEGIN
11+
DUP C@ \ test word length byte
12+
WHILE ( len<>0)
13+
DUP>R COUNT 2OVER 2OVER COMPARE
1314
WHILE ( compare<>0)
14-
NFA>LFA @ ( follow link to next name)
15+
R> NFA>LFA @ ( follow link to next name)
1516
REPEAT
1617
THEN NIP NIP ;
1718

0 commit comments

Comments
 (0)