home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / dos / computil.lzh / COMPUTIL.BAS (.txt)
Encoding:
GW-BASIC  |  1985-12-07  |  4.0 KB  |  71 lines

  1. 10  KEY OFF:CLS:WIDTH 80:CLEAR
  2. 20  LOCATE 10,30:PRINT"[ 1 ] End this program"
  3. 30  LOCATE 11,30:PRINT"[ 2 ] See a specific ASCII code"
  4. 40  LOCATE 12,30:PRINT"[ 3 ] See all ASCII codes"
  5. 50  LOCATE 13,30:PRINT"[ 4 ] Set up screen"
  6. 60  LOCATE 14,30:PRINT"[ 5 ] See different print colors
  7. 70  LOCATE 15,30:PRINT"[ 6 ] FOR I=1 TO X timing"
  8. 80  LOCATE 16,30:PRINT"[ 7 ] Set up printer for different fonts
  9. 90  LOCATE 23,37:INPUT "Choose one ",N
  10. 100  ON N GOTO 110,170,130,270,250,370,430
  11. 110  CLS:LOCATE 10,35:COLOR 20:PRINT"END OF LINE":COLOR 15:END
  12. 120  ' prints all ASCII characters
  13. 130  CLS:FOR I = 1 TO 254:LOCATE 9,22:PRINT"ASCII Character        ASCII code"
  14. 140  LOCATE 11,30:PRINT CHR$(I):LOCATE 11,50:PRINT I:FOR M= 1 TO 1000:NEXT M
  15. 150  NEXT I:GOTO 10
  16. 160  ' prints a specific ASCII character
  17. 170  CLS
  18. 180  LOCATE 12,30:PRINT"Press 0--' to exit"
  19. 190  LOCATE 10,60:PRINT"      "
  20. 200  LOCATE 10,20:INPUT "WHAT IS THE ASCII CODE  YOU WISH TO SEE";A:LOCATE 15,59:PRINT"    "
  21. 210  IF A=0 THEN 10
  22. 220  IF A> 254 THEN LOCATE 20,30:BEEP:PRINT"You can not excede 254!":FOR I = 1 TO 800:NEXT I:GOTO 170
  23. 230  LOCATE 15,20:PRINT"ASCII code: ";A:LOCATE 15,40:PRINT "symbol or function: "CHR$(A):GOTO 180
  24. 240  ' shows different colors for printing
  25. 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
  26. 260  ' sets up screen for different colors
  27. 270  DIM A$ (15)
  28. 280  COLOR 15,0,0:P=15:B=0:F=0
  29. 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
  30. 300  LOCATE 2,5:PRINT"Present screen colors are, printing:";P"background:";B"and border:";F
  31. 310  LOCATE 10,40:PRINT"Printing choices =   0 to 31"
  32. 320  LOCATE 11,40:PRINT"Background choices = 0 to 7"
  33. 330  LOCATE 12,40:PRINT"Border choices =     0 to 15"
  34. 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
  35. 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
  36. 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
  37. 370  CLS:COLOR 6
  38. 380  LOCATE 8,25:INPUT"What is your FOR I TO number";X
  39. 390  LOCATE 10,35:COLOR 15:PRINT "Timing":TIME$="00:00:00":FOR I=1 TO X:NEXT I
  40. 400  LOCATE 10,32:COLOR 4:PRINT "time:";TIMER"seconds"
  41. 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
  42. 420  ' sets up printer font
  43. 430  COLOR 6,1,0:CLS:WIDTH 80:DIM A$(13)
  44. 440  CLS:LOCATE 3,27:PRINT"This program to set up your printer"
  45. 450  LOCATE 6,15:PRINT"To be sure there are no commands in the printer buffer"
  46. 460  LOCATE 7,15:PRINT"reset your printer by turning it off then on."
  47. 470  LOCATE 8,15:PRINT"At any time you wish to return to normal print mode"
  48. 480  LOCATE 9,15:PRINT"repeat this procedure."
  49. 490  LOCATE 25,30:INPUT"Press any key when ready",A$
  50. 500  RESTORE 690:CLS:FOR I = 1 TO 13:READ A$(I):LOCATE 5+I,20:PRINT A$(I):NEXT I
  51. 510  LOCATE 2,30:PRINT"Press 0--' to exit"
  52. 520  LOCATE 20,37:PRINT"       ":LOCATE 20,30:INPUT"CHOICE";C
  53. 530  IF C=0 THEN 10
  54. 540  ON C GOTO 550,560,570,580,590,600,610,620,630,640,650,660,670
  55. 550  LPRINT CHR$(27)"N"CHR$(13):GOTO 680         'skip between pages
  56. 560  LPRINT CHR$(15):GOTO 680                    'compressed mode
  57. 570  LPRINT CHR$(27)+"P":GOTO 680                'pica pitch
  58. 580  LPRINT CHR$(27)+"M":GOTO 680                'elite pitch
  59. 590  LPRINT CHR$(27)+"o":GOTO 680                'proportional pitch
  60. 600  LPRINT CHR$(27)+"W"+CHR$(1):GOTO 680        'double width
  61. 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
  62. 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
  63. 630  LPRINT CHR$(27)+"4":GOTO 680                'italic printing
  64. 640  LPRINT CHR$(27)+"E":GOTO 680                'emphasized characters
  65. 650  LPRINT CHR$(27)+"G":GOTO 680                'double printing mode
  66. 660  LPRINT CHR$(27)+"n":GOTO 680                'near letter quality
  67. 670  LPRINT CHR$(27)+"n";CHR$(27)+"4":GOTO 680   'near letter quality italic
  68. 680  LOCATE 20,20:PRINT"                Done ":FOR I= 1 TO 1000:NEXT I:GOTO 520
  69. 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
  70. 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.
  71.