3 : CMOVE ( src dest length -- )
10 -ROT OVER - ( length src (dest-src) )
11 -ROT DUP ROT + SWAP ( (dest-src) (src+length) src )
15 OVER I + ( (dest-src) i@ (dest-src+i) )
22 : CMOVE> ( src dest length -- )
28 -ROT OVER - ( length src (dest-src) )
29 -ROT DUP ROT + 1- ( (dest-src) src (src+length-1) )
40 : S" IMMEDIATE ( -- addr len )
41 STATE @ IF ( compiling? )
42 ['] LITSTRING , ( compile LITSTRING )
43 HERE ( save the address of the length word on the stack )
44 0 , ( dummy length - we don't know what it is yet )
47 >IN @ #TIB @ >= IF \ End of TIB?
51 TIB >IN @ + @ 1 >IN +! \ Get char from TIB
57 DROP ( drop the double quote character at the end )
58 DUP ( get the saved address of the length word )
59 HERE SWAP - ( calculate the length )
60 1- ( subtract 1 (because we measured from the start of the length word) )
61 SWAP ! ( and back-fill the length location )
62 ELSE ( immediate mode )
63 HERE ( get the start address of the temporary space )
66 >IN @ #TIB @ >= IF \ End of TIB?
70 TIB >IN @ + @ 1 >IN +! \ Get char from TIB
74 OVER C! ( save next character )
75 1+ ( increment address )
77 DROP ( drop the final " character )
78 HERE - ( calculate the length )
79 HERE ( push the start address )
85 [COMPILE] S" ( read the string, and compile LITSTRING, etc. )
86 ['] TYPE , ( compile the final TYPE )
91 >IN @ #TIB @ >= IF \ End of TIB?
95 TIB >IN @ + @ 1 >IN +! \ Get char from TIB
98 DROP ( drop the double quote character )
99 EXIT ( return from this function )
105 ( Converts address of counted string into address of
106 start of string and length of string. )
107 : COUNT ( addr1 -- addr2 n )