<< Home | About Forth | About TurboForth | Download | Language Reference | Resources | Tutorials | YouTube >>
In Parsing Words in TurboForth Kernal
Identifies words from a string of text in the Terminal Input Buffer (which is in VDP memory).
: test ( -- )
tib @ 80 expect \ get up to 80 characters of text into TIB in VDP RAM
begin bl word dup while cr type repeat
test fred bloggs was ere
Moves through the input buffer defined by TIB returns the address and length of a word identified by the ascii value delimiter. Updates >IN as WORD moves through the buffer. If no word is found, or the end of the buffer (as defined by C/L) is reached then 0 0 is returned.
If no word is found (i.e., the end of the input has been reached) then the length parameter returned shall be zero.
Moves through the input buffer, which is in VDP memory, and pointed to by the VDP address in the varaible TIB, and copies a single delimited word to the word buffer in CPU RAM.