figForth Word - ENCLOSE
Some parts of this page/site are currently incomplete & will be updated asap
Other parts will change continually so use “Refresh” in your browser !!
There is extensive use of “Tooltips” text to support learning which do
not seem to render on a Smartphone
ENCLOSE addr1 c – addr1 n1 n2 n3 The text scanning primitive used by WORD. From the text address addr1 and an ascii delimiting character c, is determined the byte offset to the first non-delimiter character n1, the offset to the first delimiter after the text n2, and the offset to the first character not included. This proceedure will not process past an ascii ‘null’, treating it as an unconditional delimiter
NFA: 0022E8 87 DB 87H
0022E9 454E434C 4F53 DB "ENCLOS"
0022EF C5 DB 'E'+80H
LFA: 0022F0 9A22 DW PFIND-9
CFA: 0022F2 F422 ENCL: DW $+2
PFA: 0022F4 D1 POP DE
0022F5 E1 POP HL
0022F6 E5 PUSH HL
0022F7 7B LD A,E
0022F8 57 LD D,A
0022F9 1EFF LD E,-1
0022FB 2B DEC HL
0022FC 23 ENCL1: INC HL
0022FD 1C INC E
0022FE BE CP (HL)
0022FF CA FC 22 JP Z,ENCL1
002302 1600 LD D,0
002304 D5 PUSH DE
002305 57 LD D,A
002306 7E LD A,(HL)
002307 A7 AND A
002308 C2 14 23 JP NZ,ENCL2
00230B 1600 LD D,0
00230D 1C INC E
00230E D5 PUSH DE
00230F 1D DEC E
002310 D5 PUSH DE
002311 C3 E2 20 JP NEXT
002314 7A ENCL2: LD A,D
002315 23 INC HL
002316 1C INC E
002317 BE CP (HL)
002318 CA 27 23 JP Z,ENCL4
00231B 7E LD A,(HL)
00231C A7 AND A
00231D C2 14 23 JP NZ,ENCL2
002320 1600 ENCL3: LD D,0
002322 D5 PUSH DE
002323 D5 PUSH DE
002324 C3 E2 20 JP NEXT
002327 1600 ENCL4: LD D,0
002329 D5 PUSH DE
00232A 1C INC E
00232B D5 PUSH DE
00232C C3 E2 20 JP NEXT