1 line
5.0 KiB
Plaintext
1 line
5.0 KiB
Plaintext
|
\ Information A utility to print source screens. SHOW and LISTING work the same way as those in DX-Forth but print 6 screens per page. Requires a 132 column printer. \ Load screen - forth definitions decimal sys @ system cr .( loading SHOW LISTING ) 2 #screens 1- thru sys ! \ (scr) (line) \ Substitute screen n with screen 0 if out of range : (scr) ( n -- n | 0 ) dup #screens < and ; \ Return a string containing line n of block : (line) ( blk n -- adr u ) 64 * swap block + 64 ; \ SHOW \ Print screens n1 thru n2 -? : SHOW ( n1 n2 -- ) printer 1+ swap 6 / 6 * do cr ." Page " i 6 / 1+ . 11 out @ - spaces loadfile -path type i 3 + i do cr i dup 3 + (scr) swap (scr) cr 3 spaces dup u. 68 out @ - spaces over u. 16 0 do cr i 2 .r space dup i (line) type space over i (line) -trailing type loop 2drop loop cr page key? if key drop leave then 6 +loop console ;
|