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 ( Compile-mode word which compiles everything until the next
41 double quote as a litstring. )
42 : S" IMMEDIATE ( -- addr len )
43 ['] LITSTRING , ( compile LITSTRING )
44 HERE ( save the address of the length word on the stack )
45 0 , ( dummy length - we don't know what it is yet )
48 >IN @ #IB @ >= IF \ End of TIB?
49 QUERY-INPUT \ Get next line
52 IB >IN @ + @ 1 >IN +! \ Get char from TIB
58 DROP ( drop the double quote character at the end )
59 DUP ( get the saved address of the length word )
60 HERE SWAP - ( calculate the length )
61 1- ( subtract 1 (because we measured from the start of the length word) )
62 SWAP ! ( and back-fill the length location )
65 ( Compile-mode word which compiles everything until the
66 next double quote as a litstring and appends a TYPE. )
72 ( Interpret-mode word which prints everything until the next
73 right-paren to the terminal. )
76 >IN @ #IB @ >= IF \ End of TIB?
77 QUERY-INPUT \ Get next line
80 IB >IN @ + @ 1 >IN +! \ Get char from TIB
83 DROP ( drop the double quote character )
84 EXIT ( return from this function )
90 ( Converts address of counted string into address of
91 start of string and length of string. )
92 : COUNT ( addr1 -- addr2 n )
95 ( Abort if flag is true. )
96 : ABORT" IMMEDIATE ( flag -- )
101 s" Aborted: " ['] lit , , ['] lit , , ['] swap ,