-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSTARLIST.BLK
executable file
·1 lines (1 loc) · 7 KB
/
STARLIST.BLK
1
One/Forth \ 19:52 10Nov87 b0b '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' '''' '''' '''' '''' '''' Listing utilities for Gemini 10 printer '''' '''' '''' '''' '''' '''' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' \ Printer specific commands \ 19:49 10Nov87 b0b CR .( Loading STAR GEMINI 10 listing utilities. ) FORTH DEFINITIONS HEX : PR.RESET ( -- ) 1B EMIT 40 EMIT ; : CONDENSED ( -- ) 1B EMIT 42 EMIT 3 EMIT ; : 4"FORM ( -- ) 1B EMIT ASCII C EMIT 0 EMIT 4 EMIT ; : 12CPI ( -- ) 1B EMIT 42 EMIT 2 EMIT ; : HEADLINE ( -- ) 0E EMIT ; : FORMFEED ( -- ) 0C EMIT #LINE OFF #OUT OFF ; DECIMAL 2 6 THRU CR HIDDEN DEFINITIONS \ 25Apr87 b0b CREATE SCR#S 14 ALLOT \ array for count & 6 screen numbers : CLR.SCR#S ( -- ) SCR#S 14 ERASE ; : PR ( scr -- ) DUP CAPACITY < IF 1 SCR#S +! SCR#S DUP @ 2* + ! THEN ; \ 2SCR Print 2 screens across on a page \ 25Apr87 b0b : 2SCR ( scr1 scr2 -- ) CR CR 3 SPACES ." Screen #" OVER 3 .R 54 SPACES ." Screen #" DUP 3 .R 16 0 DO CR PAD 129 BLANK BASE @ HEX I . BASE ! SPACE OVER BLOCK I C/L * + PAD C/L CMOVE DUP BLOCK I C/L * + PAD C/L + 1+ C/L CMOVE PAD 129 -TRAILING TYPE LOOP 2DROP ; \ 1PAGE prints 6 screens on a page \ 25Apr87 b0b : 1PAGE ( -- ) HEADLINE 2 SPACES ." Filename: " FILE? CR SCR#S 2+ 3 0 DO DUP @ OVER 2+ @ 2SCR 4 + LOOP DROP CR CR 61 SPACES ." F83 from -b0b- " FORMFEED CLR.SCR#S ; FORTH DEFINITIONS \ 8Oct87 b0b : SHOW ( first last -- ) \ prints a range of screens ['] (PRINT) IS EMIT PR.RESET CONDENSED [ HIDDEN ALSO ] CLR.SCR#S 1+ SWAP DO I PR SCR#S @ 6 = IF 1PAGE THEN LOOP SCR#S @ IF 1PAGE ELSE FORMFEED THEN PR.RESET ['] (EMIT) IS EMIT ; : LISTING ( -- ) \ prints the current source file 0 CAPACITY 1- SHOW ; : .SCREENS ( last+1 first ) SWAP 1- SHOW ; \ CARDS \ 18:52 10Nov87 b0b : CARDS ( scr1 scr2 -- ) ['] (PRINT) IS EMIT PR.RESET 4"FORM 12CPI 1+ SWAP DO HEADLINE ." Screen # " I . 9 EMIT FILE? CR CR I BLOCK 16 0 DO CR I 3 .R ." " DUP 64 -TRAILING TYPE 64 + LOOP DROP FORMFEED LOOP PR.RESET ['] (EMIT) IS EMIT ;