1. - - 13


30

( 31.03.86 >BODY BODY> >LINK LINK> L>NAME N>LINK >NAME NAME> ) : >BODY ( CFA->PFA) 2+ ; : BODY> ( PFA->CFA) 2- ; : >LINK ( CFA->LFA) 2- ; : LINK> ( LFA->CFA) 2+ ; CODE L>NAME ( LFA->NFA) RW2 PULL, RW2 RMASK NR, RW1 RW2 LR, 14 &LENG LA, 1 1 SR, DO, RW1 RTWO SR, 1 0 (, RW1 RFORTH IC, 1 LENG1MSK N, 0 2 (, 1 RW1 LA, 0 RW2 CR, PUTRW1 BE, 14 LOOPBCT, PUTRW1 B, END-CODE : N>LINK ( NFA->LFA) DUP C@ 31 AND + 2+ ; : >NAME ( CFA->NFA) >LINK L>NAME ; : NAME> ( NFA->CFA) N>LINK LINK> ;

31

( 31.03.86 LATEST DEFINITIONS SMUDGE UNSMUDGE IMMEDIATE ID.) : LATEST ( ->NFA) CURRENT @ @ ; ( (;CODE/ RECURSE ) : DEFINITIONS ( ->) CONTEXT @ CURRENT ! ; : SMUDGE ( ->) LATEST C@ [ &SFLAG ] LITERAL OR LATEST C! ; : UNSMUDGE ( ->) LATEST C@ [ 255 &SFLAG - ] LITERAL AND LATEST C! ; : IMMEDIATE ( ->) LATEST C@ [ &IFLAG ] LITERAL OR LATEST C! ; : ID. ( NFA-> ) DUP 1+ SWAP C@ [ &LENG ] LITERAL AND 2DUP + C@ IF 1+ THEN TYPE SPACE ; : (;CODE) ( -> ) R> LATEST NAME> ! ; : RECURSE ( -> ) LATEST NAME> , ; IMMEDIATE

32

( 31.03.86 CONSTANT VARIABLE 2CONSTANT 2VARIABLE : ; ) : ?LOADING ( ->) BLK @ 0= ABORT" " ; : ?GAP ( N->) HERE + SP@ SWAP U< ABORT" " ; : ?STACK ( ->) S0 @ SP@ U< ABORT" " 10 ?GAP ; : CONSTANT ( W-> ) CREATE , ;CODE RW1 0 (, 14 RFORTH LH, PUSHRW1 B, END-CODE : VARIABLE ( -> ) CREATE 0 , ; : 2VARIABLE ( -> ) CREATE 0 , 0 , ; : 2CONSTANT ( WD-> ) CREATE , , DOES> 2@ ; : : ( -> ) !CSP CREATE ] SMUDGE ;CODE RI RPUSH, RI 14 LR, RNEXT BR, END-CODE : ; ( -> ) ?CSP COMPILE EXIT UNSMUDGE [COMPILE] [ ; IMMEDIATE

33

( 09.09.86 FORTH FORTH# FL# VOC-LINK VOCABULARY VOCABULARY# ) VOC FORTH &DWORD H, ( FORTH-83 ) A: FORTH# LASTWORD ( ) A: FL# 0 H, ( ) CREATE VOC-LINK FL# ( ) : VOCABULARY ( -> ) CREATE [ &DWORD ] LITERAL , LIT [ FORTH# ] CONTEXT @ - IF CONTEXT @ 2- ELSE 0 THEN , HERE VOC-LINK @ , VOC-LINK ! DOES> [ THERE 4 - :A: VOCABULARY# ] 2+ CONTEXT ! ; : FORTH-83 ( ->) FORTH DEFINITIONS DECIMAL ;