word, division compliance

llvm
Clyne 2 years ago
parent 2ece0e4993
commit 9a58f8a55d

@ -120,8 +120,8 @@
: /mod 2dup % -rot / ; : /mod 2dup % -rot / ;
: */ >r m* r> _/ ; : */ >r m* r> _/ ;
: */mod >r m* 2dup r@ _% r> _/ ;
: sm/rem >r 2dup r@ _% -rot r> _/ ; : sm/rem >r 2dup r@ _% -rot r> _/ ;
: */mod >r m* r> sm/rem ;
: fm/mod 2dup dup >r ^ >r sm/rem swap dup : fm/mod 2dup dup >r ^ >r sm/rem swap dup
if r> 0< if r> + swap 1- else swap r> drop then if r> 0< if r> + swap 1- else swap r> drop then
else swap 2r> 2drop then ; else swap 2r> 2drop then ;
@ -141,11 +141,12 @@
: key begin _input @ dup 0 <= while drop _in repeat : key begin _input @ dup 0 <= while drop _in repeat
dup 1- _input ! dup 1- _input !
_input cell+ 80 chars + swap - c@ ; _input cell+ 80 chars + swap - c@ ;
: word here -1 cells over ! dup cell+ rot begin key 2dup <> while : word here dup >r char+ >r
2 pick c! swap char+ swap repeat begin key 2dup <> while
2drop over - over +! ; r> tuck c! char+ >r repeat
: count dup cell+ swap @ ; 2drop r> r> tuck - 1- over c! ;
: char bl word cell+ c@ ; : count dup char+ swap c@ ;
: char bl word char+ c@ ;
: [char] char postpone literal ; imm : [char] char postpone literal ; imm
: ( begin [char] ) key <> while repeat ; imm : ( begin [char] ) key <> while repeat ; imm
@ -167,7 +168,11 @@
: ." postpone s" state @ if ['] type , else type then ; imm : ." postpone s" state @ if ['] type , else type then ; imm
: .( [char] ) word count type ; imm : .( [char] ) word count type ; imm
: create align here bl word count nip cell+ allot align : create align here
1 cells 1 chars - allot
bl word count nip
1 chars allot
tuck over ! swap allot align
['] _lit , here 3 cells + , ['] exit dup , , ['] _lit , here 3 cells + , ['] exit dup , ,
dup @ 31 & over _latest @ - 6 << or over ! _latest ! ; dup @ 31 & over _latest @ - 6 << or over ! _latest ! ;
: _does> _latest @ dup @ 31 & + cell+ aligned 2 cells + : _does> _latest @ dup @ 31 & + cell+ aligned 2 cells +

@ -102,14 +102,14 @@ execute:
cell = state.pop(); cell = state.pop();
dcell = state.pop(); dcell = state.pop();
dcell <<= sizeof(Cell) * 8; dcell <<= sizeof(Cell) * 8;
dcell |= state.pop(); dcell |= static_cast<Addr>(state.pop());
state.push(dcell / cell); state.push(dcell / cell);
break; break;
case 10: // mod ( d n -- n ) case 10: // mod ( d n -- n )
cell = state.pop(); cell = state.pop();
dcell = state.pop(); dcell = state.pop();
dcell <<= sizeof(Cell) * 8; dcell <<= sizeof(Cell) * 8;
dcell |= state.pop(); dcell |= static_cast<Addr>(state.pop());
state.push(dcell % cell); state.push(dcell % cell);
break; break;
case 11: // peek case 11: // peek

@ -342,75 +342,76 @@ T{ MID-UINT+1 1 RSHIFT MID-UINT+1 OR 2 * -> MID-UINT+1 }T
\ T{ 1S 2 UM* -> 1S 1 LSHIFT 1 }T \ T{ 1S 2 UM* -> 1S 1 LSHIFT 1 }T
\ T{ MAX-UINT MAX-UINT UM* -> 1 1 INVERT }T \ T{ MAX-UINT MAX-UINT UM* -> 1 1 INVERT }T
\ \ ------------------------------------------------------------------------ \ ------------------------------------------------------------------------
\ TESTING DIVIDE: FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD ." TESTING DIVIDE: FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD" CR
\
\ T{ 0 S>D 1 FM/MOD -> 0 0 }T T{ 0 S>D 1 FM/MOD -> 0 0 }T
\ T{ 1 S>D 1 FM/MOD -> 0 1 }T T{ 1 S>D 1 FM/MOD -> 0 1 }T
\ T{ 2 S>D 1 FM/MOD -> 0 2 }T T{ 2 S>D 1 FM/MOD -> 0 2 }T
\ T{ -1 S>D 1 FM/MOD -> 0 -1 }T T{ -1 S>D 1 FM/MOD -> 0 -1 }T
\ T{ -2 S>D 1 FM/MOD -> 0 -2 }T T{ -2 S>D 1 FM/MOD -> 0 -2 }T
\ T{ 0 S>D -1 FM/MOD -> 0 0 }T T{ 0 S>D -1 FM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N-INT }T T{ 1 MIN-INT M* 1 FM/MOD -> 0 MIN-INT }T
\ T{ 1 MIN-INT M* MIN-INT FM/MOD -> 0 1 }T T{ 1 MIN-INT M* MIN-INT FM/MOD -> 0 1 }T
\ T{ 2 MIN-INT M* 2 FM/MOD -> 0 MIN-INT }T T{ 2 MIN-INT M* 2 FM/MOD -> 0 MIN-INT }T
\ T{ 2 MIN-INT M* MIN-INT FM/MOD -> 0 2 }T T{ 2 MIN-INT M* MIN-INT FM/MOD -> 0 2 }T
\ T{ 1 MAX-INT M* 1 FM/MOD -> 0 MAX-INT }T T{ 1 MAX-INT M* 1 FM/MOD -> 0 MAX-INT }T
\ T{ 1 MAX-INT M* MAX-INT FM/MOD -> 0 1 }T T{ 1 MAX-INT M* MAX-INT FM/MOD -> 0 1 }T
\ T{ 2 MAX-INT M* 2 FM/MOD -> 0 MAX-INT }T T{ 2 MAX-INT M* 2 FM/MOD -> 0 MAX-INT }T
\ T{ 2 MAX-INT M* MAX-INT FM/MOD -> 0 2 }T T{ 2 MAX-INT M* MAX-INT FM/MOD -> 0 2 }T
\ T{ MIN-INT MIN-INT M* MIN-INT FM/MOD -> 0 MIN-INT }T T{ MIN-INT MIN-INT M* MIN-INT FM/MOD -> 0 MIN-INT }T
\ T{ MIN-INT MAX-INT M* MIN-INT FM/MOD -> 0 MAX-INT }T T{ MIN-INT MAX-INT M* MIN-INT FM/MOD -> 0 MAX-INT }T
\ T{ MIN-INT MAX-INT M* MAX-INT FM/MOD -> 0 MIN-INT }T T{ MIN-INT MAX-INT M* MAX-INT FM/MOD -> 0 MIN-INT }T
\ T{ MAX-INT MAX-INT M* MAX-INT FM/MOD -> 0 MAX-INT }T T{ MAX-INT MAX-INT M* MAX-INT FM/MOD -> 0 MAX-INT }T
\
\ T{ 0 S>D 1 SM/REM -> 0 0 }T T{ 0 S>D 1 SM/REM -> 0 0 }T
\ T{ 1 S>D 1 SM/REM -> 0 1 }T T{ 1 S>D 1 SM/REM -> 0 1 }T
\ T{ 2 S>D 1 SM/REM -> 0 2 }T T{ 2 S>D 1 SM/REM -> 0 2 }T
\ T{ -1 S>D 1 SM/REM -> 0 -1 }T T{ -1 S>D 1 SM/REM -> 0 -1 }T
\ T{ -2 S>D 1 SM/REM -> 0 -2 }T T{ -2 S>D 1 SM/REM -> 0 -2 }T
\ T{ 0 S>D -1 SM/REM -> 0 0 }T T{ 0 S>D -1 SM/REM -> 0 0 }T
\ T{ 1 S>D -1 SM/REM -> 0 -1 }T T{ 1 S>D -1 SM/REM -> 0 -1 }T
\ T{ 2 S>D -1 SM/REM -> 0 -2 }T T{ 2 S>D -1 SM/REM -> 0 -2 }T
\ T{ -1 S>D -1 SM/REM -> 0 1 }T T{ -1 S>D -1 SM/REM -> 0 1 }T
\ T{ -2 S>D -1 SM/REM -> 0 2 }T T{ -2 S>D -1 SM/REM -> 0 2 }T
\ T{ 2 S>D 2 SM/REM -> 0 1 }T T{ 2 S>D 2 SM/REM -> 0 1 }T
\ T{ -1 S>D -1 SM/REM -> 0 1 }T T{ -1 S>D -1 SM/REM -> 0 1 }T
\ T{ -2 S>D -2 SM/REM -> 0 1 }T T{ -2 S>D -2 SM/REM -> 0 1 }T
\ T{ 7 S>D 3 SM/REM -> 1 2 }T T{ 7 S>D 3 SM/REM -> 1 2 }T
\ T{ 7 S>D -3 SM/REM -> 1 -2 }T T{ 7 S>D -3 SM/REM -> 1 -2 }T
\ T{ -7 S>D 3 SM/REM -> -1 -2 }T T{ -7 S>D 3 SM/REM -> -1 -2 }T
\ T{ -7 S>D -3 SM/REM -> -1 2 }T T{ -7 S>D -3 SM/REM -> -1 2 }T
\ T{ MAX-INT S>D 1 SM/REM -> 0 MAX-INT }T T{ MAX-INT S>D 1 SM/REM -> 0 MAX-INT }T
\ T{ MIN-INT S>D 1 SM/REM -> 0 MIN-INT }T T{ MIN-INT S>D 1 SM/REM -> 0 MIN-INT }T
\ T{ MAX-INT S>D MAX-INT SM/REM -> 0 1 }T T{ MAX-INT S>D MAX-INT SM/REM -> 0 1 }T
\ T{ MIN-INT S>D MIN-INT SM/REM -> 0 1 }T T{ MIN-INT S>D MIN-INT SM/REM -> 0 1 }T
\ T{ 1S 1 4 SM/REM -> 3 MAX-INT }T T{ 1S 1 4 SM/REM -> 3 MAX-INT }T
\ T{ 2 MIN-INT M* 2 SM/REM -> 0 MIN-INT }T T{ 2 MIN-INT M* 2 SM/REM -> 0 MIN-INT }T
\ T{ 2 MIN-INT M* MIN-INT SM/REM -> 0 2 }T T{ 2 MIN-INT M* MIN-INT SM/REM -> 0 2 }T
\ T{ 2 MAX-INT M* 2 SM/REM -> 0 MAX-INT }T T{ 2 MAX-INT M* 2 SM/REM -> 0 MAX-INT }T
\ T{ 2 MAX-INT M* MAX-INT SM/REM -> 0 2 }T T{ 2 MAX-INT M* MAX-INT SM/REM -> 0 2 }T
\ T{ MIN-INT MIN-INT M* MIN-INT SM/REM -> 0 MIN-INT }T T{ MIN-INT MIN-INT M* MIN-INT SM/REM -> 0 MIN-INT }T
\ T{ MIN-INT MAX-INT M* MIN-INT SM/REM -> 0 MAX-INT }T T{ MIN-INT MAX-INT M* MIN-INT SM/REM -> 0 MAX-INT }T
\ T{ MIN-INT MAX-INT M* MAX-INT SM/REM -> 0 MIN-INT }T T{ MIN-INT MAX-INT M* MAX-INT SM/REM -> 0 MIN-INT }T
\ T{ MAX-INT MAX-INT M* MAX-INT SM/REM -> 0 MAX-INT }T T{ MAX-INT MAX-INT M* MAX-INT SM/REM -> 0 MAX-INT }T
\
\ T{ 0 0 1 UM/MOD -> 0 0 }T \ T{ 0 0 1 UM/MOD -> 0 0 }T
\ T{ 1 0 1 UM/MOD -> 0 1 }T \ T{ 1 0 1 UM/MOD -> 0 1 }T
\ T{ 1 0 2 UM/MOD -> 1 0 }T \ T{ 1 0 2 UM/MOD -> 1 0 }T
@ -418,133 +419,133 @@ T{ MID-UINT+1 1 RSHIFT MID-UINT+1 OR 2 * -> MID-UINT+1 }T
\ T{ MAX-UINT 2 UM* 2 UM/MOD -> 0 MAX-UINT }T \ T{ MAX-UINT 2 UM* 2 UM/MOD -> 0 MAX-UINT }T
\ T{ MAX-UINT 2 UM* MAX-UINT UM/MOD -> 0 2 }T \ T{ MAX-UINT 2 UM* MAX-UINT UM/MOD -> 0 2 }T
\ T{ MAX-UINT MAX-UINT UM* MAX-UINT UM/MOD -> 0 MAX-UINT }T \ T{ MAX-UINT MAX-UINT UM* MAX-UINT UM/MOD -> 0 MAX-UINT }T
\
\ : IFFLOORED : IFFLOORED
\ [ -3 2 / -2 = INVERT ] LITERAL IF POSTPONE \ THEN ; [ -3 2 / -2 = INVERT ] LITERAL IF POSTPONE \ THEN ;
\
\ : IFSYM : IFSYM
\ [ -3 2 / -1 = INVERT ] LITERAL IF POSTPONE \ THEN ; [ -3 2 / -1 = INVERT ] LITERAL IF POSTPONE \ THEN ;
\
\ \ THE SYSTEM MIGHT DO EITHER FLOORED OR SYMMETRIC DIVISION. \ THE SYSTEM MIGHT DO EITHER FLOORED OR SYMMETRIC DIVISION.
\ \ SINCE WE HAVE ALREADY TESTED M*, FM/MOD, AND SM/REM WE CAN USE THEM IN TEST \ SINCE WE HAVE ALREADY TESTED M*, FM/MOD, AND SM/REM WE CAN USE THEM IN TEST
\
\ IFFLOORED : T/MOD >R S>D R> FM/MOD ; IFFLOORED : T/MOD >R S>D R> FM/MOD ;
\ IFFLOORED : T/ T/MOD SWAP DROP ; IFFLOORED : T/ T/MOD SWAP DROP ;
\ IFFLOORED : TMOD T/MOD DROP ; IFFLOORED : TMOD T/MOD DROP ;
\ IFFLOORED : T*/MOD >R M* R> FM/MOD ; IFFLOORED : T*/MOD >R M* R> FM/MOD ;
\ IFFLOORED : T*/ T*/MOD SWAP DROP ; IFFLOORED : T*/ T*/MOD SWAP DROP ;
\ IFSYM : T/MOD >R S>D R> SM/REM ; IFSYM : T/MOD >R S>D R> SM/REM ;
\ IFSYM : T/ T/MOD SWAP DROP ; IFSYM : T/ T/MOD SWAP DROP ;
\ IFSYM : TMOD T/MOD DROP ; IFSYM : TMOD T/MOD DROP ;
\ IFSYM : T*/MOD >R M* R> SM/REM ; IFSYM : T*/MOD >R M* R> SM/REM ;
\ IFSYM : T*/ T*/MOD SWAP DROP ; IFSYM : T*/ T*/MOD SWAP DROP ;
\
\ T{ 0 1 /MOD -> 0 1 T/MOD }T T{ 0 1 /MOD -> 0 1 T/MOD }T
\ T{ 1 1 /MOD -> 1 1 T/MOD }T T{ 1 1 /MOD -> 1 1 T/MOD }T
\ T{ 2 1 /MOD -> 2 1 T/MOD }T T{ 2 1 /MOD -> 2 1 T/MOD }T
\ T{ -1 1 /MOD -> -1 1 T/MOD }T T{ -1 1 /MOD -> -1 1 T/MOD }T
\ T{ -2 1 /MOD -> -2 1 T/MOD }T T{ -2 1 /MOD -> -2 1 T/MOD }T
\ T{ 0 -1 /MOD -> 0 -1 T/MOD }T T{ 0 -1 /MOD -> 0 -1 T/MOD }T
\ T{ 1 -1 /MOD -> 1 -1 T/MOD }T T{ 1 -1 /MOD -> 1 -1 T/MOD }T
\ T{ 2 -1 /MOD -> 2 -1 T/MOD }T T{ 2 -1 /MOD -> 2 -1 T/MOD }T
\ T{ -1 -1 /MOD -> -1 -1 T/MOD }T T{ -1 -1 /MOD -> -1 -1 T/MOD }T
\ T{ -2 -1 /MOD -> -2 -1 T/MOD }T T{ -2 -1 /MOD -> -2 -1 T/MOD }T
\ T{ 2 2 /MOD -> 2 2 T/MOD }T T{ 2 2 /MOD -> 2 2 T/MOD }T
\ T{ -1 -1 /MOD -> -1 -1 T/MOD }T T{ -1 -1 /MOD -> -1 -1 T/MOD }T
\ T{ -2 -2 /MOD -> -2 -2 T/MOD }T T{ -2 -2 /MOD -> -2 -2 T/MOD }T
\ T{ 7 3 /MOD -> 7 3 T/MOD }T T{ 7 3 /MOD -> 7 3 T/MOD }T
\ T{ 7 -3 /MOD -> 7 -3 T/MOD }T T{ 7 -3 /MOD -> 7 -3 T/MOD }T
\ T{ -7 3 /MOD -> -7 3 T/MOD }T T{ -7 3 /MOD -> -7 3 T/MOD }T
\ T{ -7 -3 /MOD -> -7 -3 T/MOD }T T{ -7 -3 /MOD -> -7 -3 T/MOD }T
\ T{ MAX-INT 1 /MOD -> MAX-INT 1 T/MOD }T T{ MAX-INT 1 /MOD -> MAX-INT 1 T/MOD }T
\ T{ MIN-INT 1 /MOD -> MIN-INT 1 T/MOD }T T{ MIN-INT 1 /MOD -> MIN-INT 1 T/MOD }T
\ T{ MAX-INT MAX-INT /MOD -> MAX-INT MAX-INT T/MOD }T T{ MAX-INT MAX-INT /MOD -> MAX-INT MAX-INT T/MOD }T
\ T{ MIN-INT MIN-INT /MOD -> MIN-INT MIN-INT T/MOD }T T{ MIN-INT MIN-INT /MOD -> MIN-INT MIN-INT T/MOD }T
\
\ T{ 0 1 / -> 0 1 T/ }T T{ 0 1 / -> 0 1 T/ }T
\ T{ 1 1 / -> 1 1 T/ }T T{ 1 1 / -> 1 1 T/ }T
\ T{ 2 1 / -> 2 1 T/ }T T{ 2 1 / -> 2 1 T/ }T
\ T{ -1 1 / -> -1 1 T/ }T T{ -1 1 / -> -1 1 T/ }T
\ T{ -2 1 / -> -2 1 T/ }T T{ -2 1 / -> -2 1 T/ }T
\ T{ 0 -1 / -> 0 -1 T/ }T T{ 0 -1 / -> 0 -1 T/ }T
\ T{ 1 -1 / -> 1 -1 T/ }T T{ 1 -1 / -> 1 -1 T/ }T
\ T{ 2 -1 / -> 2 -1 T/ }T T{ 2 -1 / -> 2 -1 T/ }T
\ T{ -1 -1 / -> -1 -1 T/ }T T{ -1 -1 / -> -1 -1 T/ }T
\ T{ -2 -1 / -> -2 -1 T/ }T T{ -2 -1 / -> -2 -1 T/ }T
\ T{ 2 2 / -> 2 2 T/ }T T{ 2 2 / -> 2 2 T/ }T
\ T{ -1 -1 / -> -1 -1 T/ }T T{ -1 -1 / -> -1 -1 T/ }T
\ T{ -2 -2 / -> -2 -2 T/ }T T{ -2 -2 / -> -2 -2 T/ }T
\ T{ 7 3 / -> 7 3 T/ }T T{ 7 3 / -> 7 3 T/ }T
\ T{ 7 -3 / -> 7 -3 T/ }T T{ 7 -3 / -> 7 -3 T/ }T
\ T{ -7 3 / -> -7 3 T/ }T T{ -7 3 / -> -7 3 T/ }T
\ T{ -7 -3 / -> -7 -3 T/ }T T{ -7 -3 / -> -7 -3 T/ }T
\ T{ MAX-INT 1 / -> MAX-INT 1 T/ }T T{ MAX-INT 1 / -> MAX-INT 1 T/ }T
\ T{ MIN-INT 1 / -> MIN-INT 1 T/ }T T{ MIN-INT 1 / -> MIN-INT 1 T/ }T
\ T{ MAX-INT MAX-INT / -> MAX-INT MAX-INT T/ }T T{ MAX-INT MAX-INT / -> MAX-INT MAX-INT T/ }T
\ T{ MIN-INT MIN-INT / -> MIN-INT MIN-INT T/ }T T{ MIN-INT MIN-INT / -> MIN-INT MIN-INT T/ }T
\
\ T{ 0 1 MOD -> 0 1 TMOD }T T{ 0 1 MOD -> 0 1 TMOD }T
\ T{ 1 1 MOD -> 1 1 TMOD }T T{ 1 1 MOD -> 1 1 TMOD }T
\ T{ 2 1 MOD -> 2 1 TMOD }T T{ 2 1 MOD -> 2 1 TMOD }T
\ T{ -1 1 MOD -> -1 1 TMOD }T T{ -1 1 MOD -> -1 1 TMOD }T
\ T{ -2 1 MOD -> -2 1 TMOD }T T{ -2 1 MOD -> -2 1 TMOD }T
\ T{ 0 -1 MOD -> 0 -1 TMOD }T T{ 0 -1 MOD -> 0 -1 TMOD }T
\ T{ 1 -1 MOD -> 1 -1 TMOD }T T{ 1 -1 MOD -> 1 -1 TMOD }T
\ T{ 2 -1 MOD -> 2 -1 TMOD }T T{ 2 -1 MOD -> 2 -1 TMOD }T
\ T{ -1 -1 MOD -> -1 -1 TMOD }T T{ -1 -1 MOD -> -1 -1 TMOD }T
\ T{ -2 -1 MOD -> -2 -1 TMOD }T T{ -2 -1 MOD -> -2 -1 TMOD }T
\ T{ 2 2 MOD -> 2 2 TMOD }T T{ 2 2 MOD -> 2 2 TMOD }T
\ T{ -1 -1 MOD -> -1 -1 TMOD }T T{ -1 -1 MOD -> -1 -1 TMOD }T
\ T{ -2 -2 MOD -> -2 -2 TMOD }T T{ -2 -2 MOD -> -2 -2 TMOD }T
\ T{ 7 3 MOD -> 7 3 TMOD }T T{ 7 3 MOD -> 7 3 TMOD }T
\ T{ 7 -3 MOD -> 7 -3 TMOD }T T{ 7 -3 MOD -> 7 -3 TMOD }T
\ T{ -7 3 MOD -> -7 3 TMOD }T T{ -7 3 MOD -> -7 3 TMOD }T
\ T{ -7 -3 MOD -> -7 -3 TMOD }T T{ -7 -3 MOD -> -7 -3 TMOD }T
\ T{ MAX-INT 1 MOD -> MAX-INT 1 TMOD }T T{ MAX-INT 1 MOD -> MAX-INT 1 TMOD }T
\ T{ MIN-INT 1 MOD -> MIN-INT 1 TMOD }T T{ MIN-INT 1 MOD -> MIN-INT 1 TMOD }T
\ T{ MAX-INT MAX-INT MOD -> MAX-INT MAX-INT TMOD }T T{ MAX-INT MAX-INT MOD -> MAX-INT MAX-INT TMOD }T
\ T{ MIN-INT MIN-INT MOD -> MIN-INT MIN-INT TMOD }T T{ MIN-INT MIN-INT MOD -> MIN-INT MIN-INT TMOD }T
\
\ T{ 0 2 1 */ -> 0 2 1 T*/ }T T{ 0 2 1 */ -> 0 2 1 T*/ }T
\ T{ 1 2 1 */ -> 1 2 1 T*/ }T T{ 1 2 1 */ -> 1 2 1 T*/ }T
\ T{ 2 2 1 */ -> 2 2 1 T*/ }T T{ 2 2 1 */ -> 2 2 1 T*/ }T
\ T{ -1 2 1 */ -> -1 2 1 T*/ }T T{ -1 2 1 */ -> -1 2 1 T*/ }T
\ T{ -2 2 1 */ -> -2 2 1 T*/ }T T{ -2 2 1 */ -> -2 2 1 T*/ }T
\ T{ 0 2 -1 */ -> 0 2 -1 T*/ }T T{ 0 2 -1 */ -> 0 2 -1 T*/ }T
\ T{ 1 2 -1 */ -> 1 2 -1 T*/ }T T{ 1 2 -1 */ -> 1 2 -1 T*/ }T
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 2 1 T*/MOD }T
\ T{ -2 2 1 */MOD -> -2 2 1 T*/MOD }T T{ -2 2 1 */MOD -> -2 2 1 T*/MOD }T
\ T{ 0 2 -1 */MOD -> 0 2 -1 T*/MOD }T T{ 0 2 -1 */MOD -> 0 2 -1 T*/MOD }T
\ T{ 1 2 -1 */MOD -> 1 2 -1 T*/MOD }T T{ 1 2 -1 */MOD -> 1 2 -1 T*/MOD }T
\ T{ 2 2 -1 */MOD -> 2 2 -1 T*/MOD }T T{ 2 2 -1 */MOD -> 2 2 -1 T*/MOD }T
\ T{ -1 2 -1 */MOD -> -1 2 -1 T*/MOD }T T{ -1 2 -1 */MOD -> -1 2 -1 T*/MOD }T
\ T{ -2 2 -1 */MOD -> -2 2 -1 T*/MOD }T T{ -2 2 -1 */MOD -> -2 2 -1 T*/MOD }T
\ T{ 2 2 2 */MOD -> 2 2 2 T*/MOD }T T{ 2 2 2 */MOD -> 2 2 2 T*/MOD }T
\ T{ -1 2 -1 */MOD -> -1 2 -1 T*/MOD }T T{ -1 2 -1 */MOD -> -1 2 -1 T*/MOD }T
\ T{ -2 2 -2 */MOD -> -2 2 -2 T*/MOD }T T{ -2 2 -2 */MOD -> -2 2 -2 T*/MOD }T
\ T{ 7 2 3 */MOD -> 7 2 3 T*/MOD }T T{ 7 2 3 */MOD -> 7 2 3 T*/MOD }T
\ T{ 7 2 -3 */MOD -> 7 2 -3 T*/MOD }T T{ 7 2 -3 */MOD -> 7 2 -3 T*/MOD }T
\ T{ -7 2 3 */MOD -> -7 2 3 T*/MOD }T T{ -7 2 3 */MOD -> -7 2 3 T*/MOD }T
\ T{ -7 2 -3 */MOD -> -7 2 -3 T*/MOD }T T{ -7 2 -3 */MOD -> -7 2 -3 T*/MOD }T
\ T{ MAX-INT 2 MAX-INT */MOD -> MAX-INT 2 MAX-INT T*/MOD }T T{ MAX-INT 2 MAX-INT */MOD -> MAX-INT 2 MAX-INT T*/MOD }T
\ T{ MIN-INT 2 MIN-INT */MOD -> MIN-INT 2 MIN-INT T*/MOD }T T{ MIN-INT 2 MIN-INT */MOD -> MIN-INT 2 MIN-INT T*/MOD }T
\
\ ------------------------------------------------------------------------ \ ------------------------------------------------------------------------
." TESTING HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2! ALIGN ALIGNED +! ALLOT" ." TESTING HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2! ALIGN ALIGNED +! ALLOT"
CR CR
@ -651,7 +652,7 @@ HERE 3 C, CHAR G C, CHAR T C, CHAR 2 C, CONSTANT GT2STRING
\ ( HOW TO SEARCH FOR NON-EXISTENT WORD? ) \ ( HOW TO SEARCH FOR NON-EXISTENT WORD? )
T{ : GT3 GT2 LITERAL ; -> }T T{ : GT3 GT2 LITERAL ; -> }T
T{ GT3 -> ' GT1 }T T{ GT3 -> ' GT1 }T
\ T{ GT1STRING COUNT -> GT1STRING CHAR+ 3 }T T{ GT1STRING COUNT -> GT1STRING CHAR+ 3 }T
T{ : GT4 POSTPONE GT1 ; IMMEDIATE -> }T T{ : GT4 POSTPONE GT1 ; IMMEDIATE -> }T
T{ : GT5 GT4 ; -> }T T{ : GT5 GT4 ; -> }T

Loading…
Cancel
Save