1000 EXTEND & ! & ! Switch a VT220 or a VT100 with printer port into 80 or 132 column mode & ! and the LA50, LA75, or ImageWriter II on its printer port to 10, 12 or & ! 16.5/17 cpi with or without enhanced print. & ! & ! Author: W. Franklin Mitchell, Jr. & ! Director of Computer Services & ! Erskine College, Due West, South Carolina & ! & ! Copyright (c) 1988 & ! Erskine College, Due West, South Carolina & ! & ! *********************************************************************** & ! * This software is furnished without charge by Erskine College and * & ! * may be copied only with the inclusion of the author's name and * & ! * copyright notice. No title to or ownership of this software is * & ! * hereby transmitted. Neither Erskine College nor the author assumes * & ! * any responsibility for the use or reliability of this software. The * & ! * author welcomes comments and/or bug reports mailed to Franklin * & ! * Mitchell, Erskine College, Box 86L, Due West, South Carolina 29639. * & ! *********************************************************************** & ! & ! 20-Feb-85 F. Mitchell Erskine College & ! & ! 29-Feb-88 last edit *M & 1020 DIM SCRN.SIZE$(3), TERM.WIDTH$(3), CPI$(2,3), DEN$(2,3), M%(30) & 1030 DEC% = 1% & \ APP% = 2% & 1040 VT52.ANSI$ = "<" & \ ANSI.VT52$ = "[?2l" & \ PP.ON$ = "[5i" & \ PP.OFF$ = "[4i" & \ SCRN.SIZE$(1%) = "[?3l" & \ SCRN.SIZE$(2%) = "[?3h" & \ SCRN.SIZE$(3%) = "[?3h" & \ TERM.WIDTH$(1%) = "80" & \ TERM.WIDTH$(2%) = "96" & \ TERM.WIDTH$(3%) = "132" & \ CPI$(DEC%,1%) = "[1w" & \ CPI$(DEC%,2%) = "[2w" & \ CPI$(DEC%,3%) = "[4w" & \ CPI$(APP%,1%) = "N" & \ CPI$(APP%,2%) = "E" & \ CPI$(APP%,3%) = "Q" & \ DEN$(DEC%,1%) = '[1"z' & \ DEN$(DEC%,2%) = '[2"z' & \ DEN$(APP%,1%) = 'a1' & \ DEN$(APP%,2%) = 'a2' & \ ON ERROR GOTO 8000 & 1050 CHANGE SYS(CHR$(6%) + CHR$(26%)) TO M% & \ KB.NR% = M%(4%) & \ OPEN "[1,3]KB.MAP" FOR INPUT AS FILE 1%, MODE 8192% & \ INPUT LINE #1%, KB$ & \ INPUT LINE #1%, PP$ & \ CLOSE 1% & \ K% = VAL(MID(KB$, KB.NR% + 1%, 1%)) & \ P% = VAL(MID(PP$, KB.NR% + 1%, 1%)) & \ ESC$ = CHR$(155%) & \ VT52% = (K% = 3%) & \ IF K% = 5% & THEN & CLEAR$ = ESC$ + "[H" + ESC$ + "[J" & ELSE & IF VT52% & THEN & CLEAR$ = ESC$ + "H" + ESC$ + "J" & ELSE & PRINT & \ PRINT "?VT220/VT100PP needed." & \ GOTO 32767 & 1060 PRINT CLEAR$ & \ PRINT "VT220/Printer Mode Switcher V1.1 "; TIME$(0%); " "; DATE$(0%) & 1070 GOTO 1120 IF (P% = 1%) OR (P% = 2%) & \ PRINT & \ PRINT "1=LA50/LA75, 2=ImageWriter II. Printer on printer port <1>"; & \ INPUT LINE PP$ & \ PP$ = CVT$$(PP$, 38%) & \ PP$ = "1" IF LEN(PP$) = 0% 1080 P% = VAL(PP$) & \ GOTO 1070 & 1100 PRINT & \ PRINT & \ PRINT " Select ------Printer------ Screen" & \ PRINT & \ PRINT " N(ormal) 80 char @ 10 cpi 80 col" & \ PRINT & \ PRINT " M(edium) 96 char @ 12 cpi 132 col" & \ PRINT & \ PRINT " W(ide) 132 char @ 16.5/17 cpi 132 col" & \ PRINT & \ PRINT "Add /E for enhanced print. (i.e., N/E for normal but "; & \ PRINT "enhanced print.)" & \ PRINT & 1120 PRINT & \ INPUT "N, M, W, or Help (N/E) "; M$ & \ M$ = CVT$$(M$, 38%) & \ IF INSTR(1%, M$, "/E") & THEN & DEN% = 2% & ELSE & DEN% = 1% & 1130 M$ = LEFT(M$, 1%) & \ M$ = "N" IF LEN(M$) = 0% & \ S% = INSTR(1%, "NMW", M$) & \ GOTO 1100 IF S% = 0% & 2000 PRINT ESC$; VT52.ANSI$; IF VT52% & \ PRINT ESC$; SCRN.SIZE$(S%); & ESC$; PP.ON$; & ESC$; CPI$(P%, S%); & ESC$; DEN$(P%, DEN%); & ESC$; PP.OFF$; & \ PRINT ESC$; ANSI.VT52$; IF VT52% & \ DO.CCL$ = SYS(CHR$(14%) + "$_SET TERM/WIDTH=" + TERM.WIDTH$(S%)) & 8000 IF ERL = 1080% & THEN & P% = 0% & \ RESUME 1060 & 8010 ON ERROR GOTO 0 & 32767 END