10 'PATCH 256 by Tim Fields June 13,1982 20 ' This program will patch various printer configurations into 30 ' PR256 code. This permits the user to have both Epson graphics 40 ' printers and non-graphics printers used properly on the same 50 ' system. It also patches in the default CONTROL code mode. 60 CLS:KEY OFF:BASEADDR=525 70 PRINT :PRINT :INPUT "Name of file containing PR256 program ";PGM$ 80 IF LEN(PGM$)=0 THEN PGM$="PR256.EXE" 90 IF ((INSTR(PGM$,".EXE")=0) AND (INSTR(PGM$,".exe")=0)) THEN PGM$=PGM$+".EXE" 100 OPEN PGM$ FOR INPUT AS 1:CLOSE 1 110 OPEN PGM$ AS 1 LEN=1:FIELD 1,1 AS ALUE$ 120 PRINT:INPUT "Which printer do you want to update (0,1,2)";PRNUMB 130 IF ((PRNUMB<0) OR (PRNUMB>2)) THEN PRINT "Invalid printer number":GOTO 120 140 PNMB = BASEADDR + (PRNUMB*6) 150 PRINT "Does printer";PRNUMB; 160 INPUT "contain Epson bit image capability (Y/N)";YN$ 170 IF YN$="N" OR YN$="n" THEN GOTO 400 180 IF YN$<>"Y" AND YN$<>"y" THEN GOTO 150 190 'If the printer selected has the bit image capability, we need to set 200 'up the CONTROL character mode used by PR256. 210 CLS:PRINT :PRINT :PRINT 220 PRINT "PR256 has three different methods for handling control characters:" 230 PRINT :PRINT 240 PRINT " 1. `Pass them thru - This mode sends any CONTROL character" 250 PRINT " on to the printer as a control character. This mode" 260 PRINT " allows full user access to all Epson modes and functions." 270 PRINT 280 PRINT " 2. `Print it out' - This mode interprets any CONTROL character" 290 PRINT " as a printing character. It allows no control codes to be" 300 PRINT " sent to the Epson." 310 PRINT 320 PRINT " 3. `Print all but CR & LF' - This mode sees only ASCII 13 and" 330 PRINT " ASCII 10 (carriage return and line feed) as valid CONTROL" 340 PRINT " codes. All other CONTROL characters are assumed to be" 350 PRINT " printing characters." 360 PRINT :PRINT :PRINT 370 PRINT "What mode should printer";PRNUMB;:INPUT"be set into (1,2,3)";PRMODE 380 IF PRMODE<1 OR PRMODE>3 THEN GOTO 370 390 GET 1,PNMB:LSET VALUE$=CHR$(PRMODE-1):PUT 1,PNMB 400 IF YN$="Y" OR YN$="y" THEN YNVAL = 0 ELSE YNVAL=1 410 GET 1,PNUMB+1:LSET VALUE$=CHR$(YNVAL):PUT 1,PNUMB+1 420 PRINT :INPUT "Any more configurations (Y/N)";YN$ 430 IF YN$="Y" OR YN$="y" THEN GOTO 120 440 CLOSE : SYSTEM