1. - - 12


26

( 31.03.86 SAVE-BUFFERS FLUSH ) : SAVE-BUFFERS ( -> ) LIMIT FIRST DO I @ 32768 AND IF I @ 32767 AND DUP I ! I 2+ SWAP WBLK THEN B/BUF 4 + +LOOP ; : FLUSH ( -> ) SAVE-BUFFERS EMPTY-BUFFERS ;

27

( 31.03.86 ENCLOSE WORD ) CODE ENCLOSE ( A,C->A,N1,N2,N3) 14 LHRW12 BAL, RW1 RMASK NR, RW1 RFORTH AR, 14 14 SR, 0 0 SR, BEGIN, 0 0 (, 14 RW1 IC, 0 0 LTR 2 =F BZ, 14 1 (, 0 14 LA, 0 RW2 CR, ?NE UNTIL, 14 0 BCTR, 2 =H 14 PUT, BEGIN, 1 14 LR, 0 0 (, 1 RW1 IC, 0 0 LTR, 2 =F BZ, 14 1 (, 0 14 LA, 0 RW2 CR, ?E UNTIL, 2 =H 1 PUSH, RW1 14 LR, PUSHRW1 B, END-CODE : WORD ( C->T ) BLK @ IF BLK @ BLOCK ELSE TIB THEN >IN @ + SWAP ENCLOSE >IN +! HERE >R OVER - >R + ALIGNH HERE 1+ R@ CMOVE HERE R> 1+ ALLOT ALIGNH HERE OVER - 2- OVER C! R> DP! ;

28

( 31.03.86 LIT" COUNT ," " ". (."/ ." C" ( .( QUIT ABORT ) CODE LIT" ( ->T ) 14 IPUSH BAL, RNEXT BR, END-CODE : COUNT ( T->A,N) DUP 1+ SWAP C@ 2DUP + C@ IF 1+ THEN ; : ," ( -> ) C" " WORD C@ 2+ ALLOT ALIGNH ; : " ( ->T) ?COMP COMPILE LIT" ," ; IMMEDIATE : ". ( T-> ) COUNT TYPE ; CODE (.") ( ->) 14 IPUSH BAL, 14 GOTO BAL, ] ". [ : ." ( -> ) ?COMP COMPILE (.") ," ; IMMEDIATE : C" ( ->C) BL WORD 1+ C@ [COMPILE] LITERAL ; IMMEDIATE : ( ( ->) C" ) WORD DROP ; IMMEDIATE : .( ( ->) C" ) WORD COUNT TYPE ; IMMEDIATE : QUIT ( ->) [COMPILE] [ S0 @ SP! R0 @ RP! - ;

29

( 31.03.86 ) : ?ABORT ( F,T->) SWAP IF COUNT CR TYPE ABORT THEN DROP ; CODE (A") ( F->) 14 IPUSH BAL, 14 GOTO BAL, ] ?ABORT [ END-CODE : ABORT" ( F->) COMPILE (A") ," ; IMMEDIATE : ABORT8 ( ->) -1 ABORT" " ; : !CSP ( ->) SP@ CSP 1 ; : ?CSP ( ->) SP@ CSP @ - ABORT" " ; : ?PAIRS ( N1,N2-> ) - ABORT" " ; CODE ?+ ( N->N ) FIRST 128 TM, RNEXT BZR, ERCOND8 B, END-CODE : ?COMP ( ->) STATE @ NOT ABORT" " ; : BADWORD ( T->) CR ". ." ?" ABORT ;