home *** CD-ROM | disk | FTP | other *** search
GW-BASIC | 1985-12-07 | 4.0 KB | 71 lines |
- 10 KEY OFF:CLS:WIDTH 80:CLEAR
- 20 LOCATE 10,30:PRINT"[ 1 ] End this program"
- 30 LOCATE 11,30:PRINT"[ 2 ] See a specific ASCII code"
- 40 LOCATE 12,30:PRINT"[ 3 ] See all ASCII codes"
- 50 LOCATE 13,30:PRINT"[ 4 ] Set up screen"
- 60 LOCATE 14,30:PRINT"[ 5 ] See different print colors
- 70 LOCATE 15,30:PRINT"[ 6 ] FOR I=1 TO X timing"
- 80 LOCATE 16,30:PRINT"[ 7 ] Set up printer for different fonts
- 90 LOCATE 23,37:INPUT "Choose one ",N
- 100 ON N GOTO 110,170,130,270,250,370,430
- 110 CLS:LOCATE 10,35:COLOR 20:PRINT"END OF LINE":COLOR 15:END
- 120 ' prints all ASCII characters
- 130 CLS:FOR I = 1 TO 254:LOCATE 9,22:PRINT"ASCII Character ASCII code"
- 140 LOCATE 11,30:PRINT CHR$(I):LOCATE 11,50:PRINT I:FOR M= 1 TO 1000:NEXT M
- 150 NEXT I:GOTO 10
- 160 ' prints a specific ASCII character
- 170 CLS
- 180 LOCATE 12,30:PRINT"Press 0--' to exit"
- 190 LOCATE 10,60:PRINT" "
- 200 LOCATE 10,20:INPUT "WHAT IS THE ASCII CODE YOU WISH TO SEE";A:LOCATE 15,59:PRINT" "
- 210 IF A=0 THEN 10
- 220 IF A> 254 THEN LOCATE 20,30:BEEP:PRINT"You can not excede 254!":FOR I = 1 TO 800:NEXT I:GOTO 170
- 230 LOCATE 15,20:PRINT"ASCII code: ";A:LOCATE 15,40:PRINT "symbol or function: "CHR$(A):GOTO 180
- 240 ' shows different colors for printing
- 250 CLS:WIDTH 40:FOR I = 1 TO 30:LOCATE 10,15:COLOR I:PRINT"Color ";I:FOR T= 1 TO 1000:NEXT T:NEXT I:COLOR 15:GOTO 10
- 260 ' sets up screen for different colors
- 270 DIM A$ (15)
- 280 COLOR 15,0,0:P=15:B=0:F=0
- 290 RESTORE 360:CLS:FOR I = 0 TO 15:READ A$(I):LOCATE I+5,10:PRINT I:LOCATE I+5,20:PRINT A$(I):NEXT I
- 300 LOCATE 2,5:PRINT"Present screen colors are, printing:";P"background:";B"and border:";F
- 310 LOCATE 10,40:PRINT"Printing choices = 0 to 31"
- 320 LOCATE 11,40:PRINT"Background choices = 0 to 7"
- 330 LOCATE 12,40:PRINT"Border choices = 0 to 15"
- 340 LOCATE 22,7:INPUT "What color printing,background,and border do you want to have ",P,B,F:IF P>31 OR B>7 OR F>15 GOTO 280
- 350 COLOR P,B,F:CLS:LOCATE 15,15:INPUT"Is this the way you want the screen to look y/n ",Q$:IF Q$="N" OR Q$="n" THEN 290 ELSE 10
- 360 DATA Black,Blue,Green,Cyan,Red,Magenta,Brown,White,Gray,Light Blue,Light Green,Light Cyan,Light Red,Light Magenta,Yellow,High-intensity White
- 370 CLS:COLOR 6
- 380 LOCATE 8,25:INPUT"What is your FOR I TO number";X
- 390 LOCATE 10,35:COLOR 15:PRINT "Timing":TIME$="00:00:00":FOR I=1 TO X:NEXT I
- 400 LOCATE 10,32:COLOR 4:PRINT "time:";TIMER"seconds"
- 410 LOCATE 20,20:COLOR 15:INPUT"Press 0--' to continue; M to return to menu.",M$:IF M$="M" OR M$="m"THEN 10 ELSE 370
- 420 ' sets up printer font
- 430 COLOR 6,1,0:CLS:WIDTH 80:DIM A$(13)
- 440 CLS:LOCATE 3,27:PRINT"This program to set up your printer"
- 450 LOCATE 6,15:PRINT"To be sure there are no commands in the printer buffer"
- 460 LOCATE 7,15:PRINT"reset your printer by turning it off then on."
- 470 LOCATE 8,15:PRINT"At any time you wish to return to normal print mode"
- 480 LOCATE 9,15:PRINT"repeat this procedure."
- 490 LOCATE 25,30:INPUT"Press any key when ready",A$
- 500 RESTORE 690:CLS:FOR I = 1 TO 13:READ A$(I):LOCATE 5+I,20:PRINT A$(I):NEXT I
- 510 LOCATE 2,30:PRINT"Press 0--' to exit"
- 520 LOCATE 20,37:PRINT" ":LOCATE 20,30:INPUT"CHOICE";C
- 530 IF C=0 THEN 10
- 540 ON C GOTO 550,560,570,580,590,600,610,620,630,640,650,660,670
- 550 LPRINT CHR$(27)"N"CHR$(13):GOTO 680 'skip between pages
- 560 LPRINT CHR$(15):GOTO 680 'compressed mode
- 570 LPRINT CHR$(27)+"P":GOTO 680 'pica pitch
- 580 LPRINT CHR$(27)+"M":GOTO 680 'elite pitch
- 590 LPRINT CHR$(27)+"o":GOTO 680 'proportional pitch
- 600 LPRINT CHR$(27)+"W"+CHR$(1):GOTO 680 'double width
- 610 LPRINT CHR$(27)+"S"+CHR$(0);CHR$(27)+"3"+CHR$(18):GOTO 680 'superscript printing,change the last number in this line to change width between lines
- 620 LPRINT CHR$(27)+"S"+CHR$(1);CHR$(27)+"3"+CHR$(18):GOTO 680 'subscript printing, change the last number in this line to change width between lines
- 630 LPRINT CHR$(27)+"4":GOTO 680 'italic printing
- 640 LPRINT CHR$(27)+"E":GOTO 680 'emphasized characters
- 650 LPRINT CHR$(27)+"G":GOTO 680 'double printing mode
- 660 LPRINT CHR$(27)+"n":GOTO 680 'near letter quality
- 670 LPRINT CHR$(27)+"n";CHR$(27)+"4":GOTO 680 'near letter quality italic
- 680 LOCATE 20,20:PRINT" Done ":FOR I= 1 TO 1000:NEXT I:GOTO 520
- 690 DATA [ 1 ] Pause between pages on llist of program.,[ 2 ] Compressed Characters,[ 3 ] Pica pitch,[ 4 ] Elite pitch.,[ 5 ] Proportional pitch.,[ 6 ] Double width.,[ 7 ] Superscript printing
- 700 DATA [ 8 ] Subscript printing.,[ 9 ] Italic Characters,[ 10 ] Emphasized Characters.,[ 11 ] Double Printing mode.,[ 12 ] Near letter quality.,[ 13 ] Near letter quality italic printing.
-