3 : CMOVE ( src dest length -- )
9 -ROT OVER - ( length src (dest-src) )
10 -ROT DUP ROT + SWAP ( (dest-src) (src+length) src )
14 OVER I + ( (dest-src) i@ (dest-src+i) )
21 : S" IMMEDIATE ( -- addr len )
22 STATE @ IF ( compiling? )
23 ['] LITSTRING , ( compile LITSTRING )
24 HERE ( save the address of the length word on the stack )
25 0 , ( dummy length - we don't know what it is yet )
28 >IN @ #TIB @ >= IF \ End of TIB?
32 TIB >IN @ + @ 1 >IN +! \ Get char from TIB
38 DROP ( drop the double quote character at the end )
39 DUP ( get the saved address of the length word )
40 HERE SWAP - ( calculate the length )
41 1- ( subtract 1 (because we measured from the start of the length word) )
42 SWAP ! ( and back-fill the length location )
43 ELSE ( immediate mode )
44 HERE ( get the start address of the temporary space )
47 >IN @ #TIB @ >= IF \ End of TIB?
51 TIB >IN @ + @ 1 >IN +! \ Get char from TIB
55 OVER C! ( save next character )
56 1+ ( increment address )
58 DROP ( drop the final " character )
59 HERE - ( calculate the length )
60 HERE ( push the start address )
66 [COMPILE] S" ( read the string, and compile LITSTRING, etc. )
67 ['] TYPE , ( compile the final TYPE )
72 >IN @ #TIB @ >= IF \ End of TIB?
76 TIB >IN @ + @ 1 >IN +! \ Get char from TIB
79 DROP ( drop the double quote character )
80 EXIT ( return from this function )
86 ( Converts address of counted string into address of
87 start of string and length of string. )
88 : COUNT ( addr1 -- addr2 n )