home *** CD-ROM | disk | FTP | other *** search
- start:
-
- rem This version of START.COM is for the ApBASIC 1.7 Support Disk.
-
- rem It requires approximately 68K of available RAM.
-
- rem First, initialize the Esc key. This is necessary when using parameters,
- rem because the menus are bypassed at first, which is where the Esc key would
- rem otherwise be itialized.
-
- b$=chr$(27)
-
- rem Next, initialize the space bar.
-
- e$=chr$(32)
-
- rem Here is the routine for reading parameters from the DOS prompt.
-
- a$=command$
- if a$=" /?" then help:
- if a$=" /v" then listfile:
- if a$=" /V" then listfile:
- if a$=" /r" then readfile:
- if a$=" /R" then readfile:
- if a$=" /p" then printdoc:
- if a$=" /P" then printdoc:
- if a$=" /d" then donation:
- if a$=" /D" then donation:
- if a$=" /40" then option40:
- if a$=" /40 ?" then help40:
- if a$=" /40 v" then listfl40:
- if a$=" /40 V" then listfl40:
- if a$=" /40 r" then rdfile40:
- if a$=" /40 R" then rdfile40:
- if a$=" /40 p" then prfile40:
- if a$=" /40 P" then prfile40:
- if a$=" /40 d" then donate40:
- if a$=" /40 D" then donate40:
-
- rem If no parameters, begin from the beginning.
-
- cls
- print " The ApBASIC 1.7 Support Disk 1.00"
- print
- print
- print " by Matt Roberts"
- print " 3 Cedar St., # 8"
- print " Montpelier, Vt 05602-3006"
- print " (802)223-2553"
- print
- print
- print "If you have trouble using this disk, and the documentation doesn't"
- print "seem to help, you can call between 9AM and 9PM EST, and I'll try to"
- print "help. Keep trying."
- print
- print
- print "If you find the files on this disk useful, a donation of $5.00 would"
- print "be greatly appreciated."
- print
- print "Of course, if there's work by other authors on the disk, the $5.00"
- print "doesn't cover them. Thanks for your understanding."
- print
- print
- print "Press any key to continue. ";
- gosub continue:
-
- options:
- cls
- print "You have the following options:"
- print
- print
- print "F1- View a list of the files on this disk."
- print
- print "F2- View the text file of your choice, on the screen."
- print
- print "F3- Print the text file of your choice."
- print
- print "F4- Shell to DOS."
- print
- print "F5- Change to 40-column mode (larger text; probably most useful for"
- print "the visually impaired)."
- print
- print "F6- See a list of the parameters you can use from the DOS prompt."
- print
- print "Esc- Return to DOS."
- print
- print
- print "Please press the key corresponding to your choice. ";
-
- wait1:
- gosub continue:
- if a$=b$ then finish:
- if extended=1 then readext:
- goto wait1:
-
- rem This routine reads the keyboard, accepting only F1-F6 and the Esc key as
- rem valid inputs.
-
- readext:
- if a$=";" then listfile:
- if a$="<" then readfile:
- if a$="=" then printdoc:
- if a$=">" then shell:
- if a$="?" then option40:
- if a$="@" then help:
- goto wait1:
-
- rem Here is the routine for seeing a list of the files on this disk.
-
- listfile:
- cls
- print "Here are the files on this disk:"
- print
- print
- print "DARKSCRN.BAS- The ApBASIC 1.7 source code for DARKSCRN.EXE."
- print
- print "DARKSCRN.EXE- A screen blanker, used from the DOS prompt."
- print
- print "DISPLAY.BAS- An ApBASIC module to display text files on the screen."
- print
- print "FILE-MAN.BAS- The ApBASIC 1.7 source code for FILE-MAN.EXE."
- print
- print "FILE-MAN.DOC- The documentation for FILE-MAN.EXE."
- print
- print "FILE-MAN.EXE- The ApBASIC 1.7 File Manager."
- print
- print "LIST.COM- A neat utility by Vern Buerg; displays files on the screen."
- print
- print "LOOSWARE.DOC- Notes on the looseware concept."
- print
- print
- print "Press any key to continue. ";
- gosub continue:
- cls
- print "START.ASI- The ASIC source code for START.COM."
- print
- print "START.COM- The file you're using right now."
- print
- print
- print "Press any key to return to the Main Options Menu. ";
- gosub continue:
- goto options:
-
- rem Here is the routine for viewing text files on the screen.
-
- readfile:
- cls
- print "To move forward in the file(s) you are about to view, press PgDn."
- print
- print "To move back, press PgUp."
- print
- print "To exit the file, press Esc."
- print
- print
- print "Press any key to see the menu of files."
- gosub continue:
- readmenu:
- cls
- print "Here are the files you can view:"
- print
- print
- print "A- DARKSCRN.BAS"
- print
- print "B- DISPLAY.BAS"
- print
- print "C- FILE-MAN.BAS"
- print
- print "D- FILE-MAN.DOC"
- print
- print "E- NOT IN USE"
- print
- print "F- LOOSWARE.DOC"
- print
- print "G- START.ASI"
- print
- print "Esc- Return to the Main Options Menu."
- print
- print
- print "Please press the key corresponding to your choice. ";
- gosub continue:
- if a$=b$ then options:
- print a$;
- if a$="g" then readstar:
- if a$="G" then readstar:
- if a$="f" then readloos:
- if a$="F" then readloos:
- if a$="e" then readmenu:
- if a$="E" then readmenu:
- if a$="d" then readfild:
- if a$="D" then readfild:
- if a$="c" then readfilb:
- if a$="C" then readfilb:
- if a$="b" then readdisb:
- if a$="B" then readdisb:
- if a$="a" then readdarb:
- if a$="A" then readdarb:
- goto readmenu:
-
- readdarb:
- call ("list.com"," darkscrn.bas")
- goto readmenu:
- readdisb:
- call ("list.com"," display.bas")
- goto readmenu:
- readfilb:
- call ("list.com"," file-man.bas")
- goto readmenu:
- readfild:
- call ("list.com"," file-man.doc")
- goto readmenu:
- readloos:
- call ("list.com"," loosware.doc")
- goto readmenu:
- readstar:
- call ("list.com"," start.asi")
- goto readmenu:
-
- rem Here is the routine for printing text files.
-
- printdoc:
- cls
- print "Please ready your printer; press any key to see the menu of files. ";
- gosub continue:
-
- printmen:
- cls
- print "Here are the files you can print:"
- print
- print
- print "A- DARKSCRN.BAS"
- print
- print "B- DISPLAY.BAS"
- print
- print "C- FILE-MAN.BAS"
- print
- print "D- FILE-MAN.DOC"
- print
- print "E- NOT IN USE"
- print
- print "F- LOOSWARE.DOC"
- print
- print "G- START.ASI"
- print
- print "Esc- Return to the Main Options Menu."
- print
- print
- print "Please press the key corresponding to your choice. ";
-
- wait5:
- gosub continue:
- if a$=b$ then options:
- if a$="g" then printsta:
- if a$="G" then printsta:
- if a$="f" then printloo:
- if a$="F" then printloo:
- if a$="e" then printmen:
- if a$="E" then printmen:
- if a$="d" then printfid:
- if a$="D" then printfid:
- if a$="c" then printfib:
- if a$="C" then printfib:
- if a$="b" then printdib:
- if a$="B" then printdib:
- if a$="a" then printdab:
- if a$="A" then printdab:
- goto wait5:
-
- printdab:
- file$="darkscrn.bas"
- gosub printfil:
- goto printmen:
-
- printdib:
- file$="display.bas"
- gosub printfil:
- goto printmen:
-
- printfib:
- file$="file-man.bas"
- gosub printfil:
- goto printmen:
-
- printfid:
- file$="file-man.doc"
- gosub printfil:
- goto printmen:
-
- printloo:
- file$="loosware.doc"
- gosub printfil:
- goto printmen:
-
- printsta:
- file$="start.asi"
- gosub printfil:
- goto printmen:
-
-
- rem Here is the routine for printing a file.
-
- printfil:
- cls
- f$=chr$(12)
- open "i",1,file$
-
- if error=2 then
- print ""
- print ""
- print "File not found."
- print
- print
- print "Press any key to continue. ";
- gosub continue:
- close 1
- return
- endif
-
- heading:
- cls
- print "Printing...";
- realfile$=ucase$(file$)
- color 0,7
- print realfile$
- color 7,0
- print
- print
- print "Press space bar to pause printing, or Esc to quit."
- print
- print
-
- printmor:
- input# 1, line$ crlf
-
- if error=96 then
- lprint line$
- goto blanklin:
- endif
-
- contlprn:
- lprint line$
-
- a$=inkey$
-
- if a$=b$ then
- print "Printing has been terminated. The printer may still have data in its"
- print "buffer. If so, it will continue printing until the buffer is empty."
- print
- lprint f$
- close 1
- file$=""
- print "Press any key to continue. ";
- gosub continue:
- return
- endif
-
- if a$=e$ then pause: else nopause:
-
- pause:
-
- print "Press any key to resume printing. ";
-
- pausemor:
- a$=inkey$
- if a$="" then pausemor:
- a$=""
- goto heading:
-
- nopause:
- if error=99 then eofp:
- goto printmor:
-
- blanklin:
- input# 1, line$ crlf
- if line$="" then printmor: else contlprn:
-
- eofp:
- lprint line$
- print "Finished."
- print
- close 1
- lprint f$
- print "Press any key to continue. ";
- gosub continue:
- return
-
-
- rem This is the end of the routine for printing text files.
-
-
- rem Here is the routine for shelling to DOS.
-
- shell:
- cls
- print "On which drive is your COMMAND.COM (don't type the colon)? ";
- gosub continue:
- path1$=a$+":"
- path2$=path1$+"\"
- path3$=path2$+"command.com"
- cls
- print "Use the DOS command EXIT to return to START.COM."
- print
- call path3$,""
- goto options:
-
- rem Here is the routine for changing to 40-column width.
-
- option40:
- width 40
- print "You have the following options:"
- print
- print
- print "F1- View a list of the files on this"
- print "disk."
- print
- print "F2- View the text file of your choice,"
- print "on the screen."
- print
- print "F3- Print the text file of your"
- print "choice."
- print
- print "F4- Shell to DOS."
- print
- print "F5- Return to 80-column mode."
- print
- print "F6- See a list of the parameters you"
- print "use from the DOS prompt."
- print
- print "Esc- Return to DOS."
- print
- print
- print "Please press the key corresponding to"
- print "your choice. ";
-
- wait2:
- gosub continue:
- if a$=b$ then finish:
- if extended=1 then rdext40:
- goto wait2:
-
- rdext40:
- if a$=";" then listfl40:
- if a$="<" then rdfile40:
- if a$="=" then prfile40:
- if a$=">" then shell40:
- if a$="?" then width80:
- if a$="@" then help40:
- goto wait2:
-
- rem Here is the routine for listing files in 40-column mode.
-
- listfl40:
- width 40
- print "Here are the files on this disk:"
- print
- print
- print "DARKSCRN.BAS- The ApBASIC 1.7 source"
- print "code for DARKSCRN.EXE."
- print
- print "DARKSCRN.EXE- A screen blanker, used"
- print "from the DOS prompt."
- print
- print "DISPLAY.BAS- An ApBASIC module for"
- print "displaying a file on the screen."
- print
- print "FILE-MAN.BAS- The ApBASIC 1.7 source"
- print "code for FILE-MAN.EXE."
- print
- print "FILE-MAN.DOC- The documentation for"
- print "FILE-MAN.EXE."
- print
- print "FILE-MAN.EXE- The ApBASIC 1.7 File"
- print "Manager."
- print
- print
- print "Press any key to continue. ";
- gosub continue:
- cls
- print "LIST.COM- A neat utility by Vern"
- print "Buerg; displays files on the screen."
- print
- print "LOOSWARE.DOC- Notes on the looseware"
- print "concept."
- print
- print "START.ASI- The ASIC source code"
- print "for START.COM."
- print
- print "START.COM- The file you're using right"
- print "now."
- print
- print
- print "Press any key to return to the Main"
- print "Options Menu. ";
- gosub continue:
- goto option40:
-
-
- rem Here is the routine for viewing files on the screen in 40-column mode.
- rdfile40:
- width 40
- print "To move forward in the file(s) you are"
- print "about to view, press PgDn."
- print
- print "To move back, press PgUp."
- print
- print "To move to the side, use the arrow"
- print "keys."
- print
- print "To exit the document, press Esc."
- print
- print
- print "Press any key to see the menu of"
- print "files. ";
- gosub continue:
-
- rdmenu40:
- cls
- print "Here are the files you can view:"
- print
- print "A- DARKSCRN.BAS"
- print
- print "B- DISPLAY.BAS"
- print
- print "C- FILE-MAN.BAS"
- print
- print "D- FILE-MAN.DOC"
- print
- print "E- NOT IN USE"
- print
- print "F- LOOSWARE.DOC"
- print
- print "G- START.ASI"
- print
- print "Esc- Return to the Main Options Menu."
- print
- print
- print "Please press the key corresponding to"
- print "your choice. ";
- gosub continue:
- if a$=b$ then option40:
- print a$;
- if a$="g" then rdstar40:
- if a$="G" then rdstar40:
- if a$="f" then rdloos40:
- if a$="F" then rdloos40:
- if a$="e" then rdmenu40:
- if a$="E" then rdmenu40:
- if a$="d" then rdfild40:
- if a$="D" then rdfild40:
- if a$="c" then rdfilb40:
- if a$="C" then rdfilb40:
- if a$="b" then rddisb40:
- if a$="B" then rddisb40:
- if a$="a" then rddarb40:
- if a$="A" then rddarb40:
- goto rdmenu40:
- rddarb40:
- call ("list.com"," darkscrn.bas")
- goto rdmenu40:
- rddisb40:
- call ("list.com"," display.bas")
- goto rdmenu40:
- rdfilb40:
- call ("list.com"," file-man.bas")
- goto rdmenu40:
- rdfild40:
- call ("list.com"," file-man.doc")
- goto rdmenu40:
- rdloos40:
- call ("list.com"," loosware.doc")
- goto rdmenu40:
- rdstar40:
- call ("list.com"," start.asi")
- goto rdmenu40:
-
-
- rem Here is the routine for printing files from the 40-column menu.
-
- prfile40:
- width 40
- print "Please ready your printer; press any"
- print "key to see the menu of files. ";
- gosub continue:
-
- prmenu40:
- cls
- print "Here are the files you can print:"
- print
- print
- print "A- DARKSCRN.BAS"
- print
- print "B- DISPLAY.BAS"
- print
- print "C- FILE-MAN.BAS"
- print
- print "D- FILE-MAN.DOC"
- print
- print "E- NOT IN USE"
- print
- print "F- LOOSWARE.DOC"
- print
- print "G- START.ASI"
- print
- print "Esc- Return to the Main Options Menu."
- print
- print
- print "Please press the key corresponding to"
- print "your choice. ";
-
- wait6:
- gosub continue:
- if a$=b$ then option40:
- if a$="g" then prstar40:
- if a$="G" then prstar40:
- if a$="f" then prloos40:
- if a$="F" then prloos40:
- if a$="e" then prmenu40:
- if a$="E" then prmenu40:
- if a$="d" then prfild40:
- if a$="D" then prfild40:
- if a$="c" then prfilb40:
- if a$="C" then prfilb40:
- if a$="b" then prdisb40:
- if a$="B" then prdisb40:
- if a$="a" then prdarb40:
- if a$="A" then prdarb40:
- goto wait6:
-
- prdarb40:
- file$="darkscrn.bas"
- gosub prndoc40:
- goto prmenu40:
-
- prdisb40:
- file$="display.bas"
- gosub prndoc40:
- goto prmenu40:
-
- prfilb40:
- file$="file-man.bas"
- gosub prndoc40:
- goto prmenu40:
-
- prfild40:
- file$="file-man.doc"
- gosub prndoc40:
- goto prmenu40:
-
- prloos40:
- file$="loosware.doc"
- gosub prndoc40:
- goto prmenu40:
-
- prstar40:
- file$="start.asi"
- gosub prndoc40:
- goto prmenu40:
-
-
- rem Here is the routine for printing a file in 40-column mode.
-
- prndoc40:
- cls
- f$=chr$(12)
- open "i",1,file$
-
- if error=2 then
- print ""
- print ""
- print "File not found."
- print
- print
- print "Press any key to continue. ";
- gosub continue:
- close 1
- return
- endif
-
- headng40:
- cls
- print "Printing...";
- realfile$=ucase$(file$)
- color 0,7
- print realfile$
- color 7,0
- print
- print
- print "Press space bar to pause printing, or"
- print "Esc to quit."
- print
- print
-
- prntmr40:
- input# 1, line$ crlf
-
- if error=96 then
- lprint line$
- goto blnkln40:
- endif
-
- contpr40:
- lprint line$
-
- a$=inkey$
-
- if a$=b$ then
- print "Printing has been terminated. The"
- print "printer may still have data in its"
- print "buffer. If so, it will continue"
- print "printing until the buffer is empty."
- print
- lprint f$
- close 1
- file$=""
- print "Press any key to continue. ";
- gosub continue:
- return
- endif
-
- if a$=e$ then pause40: else nopaus40:
-
- pause40:
-
- print "Press any key to resume printing. ";
-
- pausmr40:
- a$=inkey$
- if a$="" then pausmr40:
- a$=""
- goto headng40:
-
- nopaus40:
- if error=99 then eofp40:
- goto prntmr40:
-
- blnkln40:
- input# 1, line$ crlf
- if line$="" then prntmr40: else contpr40:
-
- eofp40:
- lprint line$
- print "Finished."
- print
- close 1
- lprint f$
- print "Press any key to continue. ";
- gosub continue:
- return
-
- rem This is the end of the routine for printing a file in 40-column mode.
- rem Here is the routine for shelling to DOS in 40-column mode.
-
- shell40:
- width 40
- print "On which drive is your COMMAND.COM?"
- print "(Don't type the colon.) ";
- gosub continue:
- path1$=a$+":"
- path2$=path1$+"\"
- path3$=path2$+"command.com"
- cls
- print "Use the DOS command EXIT to return to"
- print "START.COM."
- print
- call path3$,""
- goto option40:
-
- rem Here is the routine for returning to 80-column mode.
- width80:
- width 80
- goto options:
-
- rem Here is the routine for listing the parameters for 40-column mode.
- help40:
- width 40
- print "You can use parameters with START.COM;"
- print "they may save you some time."
- print
- print "These screens deal with parameters"
- print "used in 40-column mode; to see a list"
- print "of parameters for 80-column mode,"
- print "select that option from the 80-column"
- print "menu, or type START /? from DOS."
- print
- print ""
- print "Typing START /40 will put you into"
- print "40-column mode (you're using it now)."
- print
- print "Typing START /40 ? will give you these"
- print "help screens."
- print
- print "Typing START /40 V will let you view a"
- print "list of the files on this disk."
- print
- print "Typing START /40 R will let you read"
- print "your file of choice, on the screen."
- print
- print
- print "Press any key to continue. ";
- gosub continue:
- cls
- print "Typing START /40 P will let you print"
- print "the file of your choice."
- print
- print "Either upper or lower case is fine."
- print
- print
- print "Do you want to ";
- color 0,15
- print "C";
- color 7,0
- print "ontinue with START.COM"
- print "or return to ";
- color 0,15
- print "D";
- color 7,0
- print "OS? ";
-
- wait3:
- gosub continue:
- if a$="c" then option40:
- if a$="C" then option40:
- if a$="d" then finish:
- if a$="D" then finish:
- goto wait3:
-
- rem Here is the routine for showing the parameters that can be used in 80-
- rem column mode.
-
- help:
- cls
- print "You can use parameters with START.COM; they may save you time."
- print
- print "This screen describes the parameters you can use in 80-column mode; to"
- print "see the list of parameters for 40-column mode, choose that option from"
- print "the 40-column menu, or type START /40 ? from the DOS prompt."
- print
- print
- print "Typing START /? from the DOS prompt will get you this screen."
- print
- print "Typing START /V will let you view a list of the files on this disk."
- print
- print "Typing START /R will let you read the text file of your choice, on the"
- print "screen."
- print
- print "Typing START /P will let you print the text file of your choice."
- print
- print "Either upper or lower case is fine."
- print
- print
- print "Do you want to ";
- color 0,15
- print "C";
- color 7,0
- print "ontinue with START.COM or return to ";
- color 0,15
- print "D";
- color 7,0
- print "OS? ";
-
- wait4:
- gosub continue:
- if a$="c" then options:
- if a$="C" then options:
- if a$="d" then finish:
- if a$="D" then finish:
- goto wait4:
-
- rem Here is the routine for giving the address for donations.
-
- donation:
- cls
- print "You can send donations to:"
- print
- print
- print "Matt Roberts"
- print "3 Cedar St., # 8"
- print "Montpelier, Vt 05602-3006"
- print
- print
- print "Thanks."
- print
- print
- end
-
- rem Here is the donations routine in 40-column mode.
-
- donate40:
- width 40
- print "You can send donations to:"
- print
- print
- print "Matt Roberts"
- print "3 Cedar St., # 8"
- print "Montpelier, Vt 05602-3006"
- print
- print
- print "Thanks."
- print
- print
- end
-
- rem Here is the routine for waiting for the user to press a key.
-
- continue:
- wait:
- a$=inkey$
- if a$="" then wait:
- return
-
- rem Here is the routine for ending the program.
-
- finish:
- cls
- end
-