7 ================================================================================ Print a BASIC source program ====================== This program prints a source listing of a BASIC program ====(=== and prints all remarks statements (REM) in emphasized =====W2=== font. ALSO, certain printer control statements are =====<=== recognized when they are the only comment on a REM stmt=====F=== For example: =====/P=== REM $s4 will space 4 lines on the printer =====wZ=== REM $pa will eject to top of next page =====d==================================================================n $s1 'x  :CTIMEOUT.COUNT :SPTIME$  : : Clear screen  , : "Note: Drive B and filetype of BAS is assumed"  , : "Also: Pgm must have been saved using ASCII option"Q  , : , : Center query for file name " Enter the name of the BASIC source program: ";AAA$ , | "b:"AAA$".bas" AS 1LC  () " #,REC$%  : check for enough vertical spacel  : check for print control and print line if requiredv ~" , : : ( ) : Final page skip6@ $S3J==================================================================MT====================== SUBROUTINE ==============================^========= Convert lower case letters to upper case =============h================================================================== r $s1 ' | I  (AAA$)9 AA$ (AAA$,I,)u (AA$)a (AA$) z AA$ ((AA$) ) (AAA$,I,) AA$ I I  (AAA$) AAA$ AAA$" " I $pa'==================================================================o========================= SUBROUTINE ======================================== Check for special printer control rem's =============================================================================+ $s1 '= I  Y AA$ (REC$,I,)v& AA$"REM" D0 I: D AA$ (REC$,I,)N PC$ ()(E) : Turn ON emphasized for rem stmt.X AA$ "$"  : Check for REM $ formatvZ AA$(REC$,I,) : If so, pick up next characterb AA$ "S" AA$ "s"  :Check for Line Space cmdl AA ((REC$,I,))v AA AA : I  AA " "1 LC LC; I| PC$ ()(F) : Turn OFF emphasized font  AA$"p" AA$"P"  : Check for page eject H : Issue page eject+ :< PC$;REC$T PC$()(F)\ f $S3================================================================== ========================= SUBROUTINE ===========================>================ Check for vertical spacing =================== ==================================================================* $s1 '4 LC  p> LC  R H ( ) : skip to top of page R LC 7W \ ()()(G)(, )"PGM: "AAA$(, )PTIME$ f ()(H)()()" ":" " : " " pLC LC z  $pa '! ===============================================================Z! == Error trapping routine, intended primarily to handle =====! == device timeout on the printer when too much page =====! == ejecting is done. =====," ===============================================================X" $s1 '"   :" TIMEOUT.COUNTTIMEOUT.COUNT : Incr number of timeouts# TIMEOUT.COUNT : give it 10*# : : :g# "Program aborted due to too many device timeouts"# :# : : :# "Program aborted due to error code = ";$ :