home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / osborne / findchar.bas (.txt) < prev    next >
Encoding:
GW-BASIC  |  1985-02-10  |  2.5 KB  |  70 lines

  1. 10  :REMCSRLINThis program entered into the public domain on 11 February 1984
  2. 20  :REMCSRLINby William van Riper.  It runs on the Osborne EXECUTIVE but may
  3. 30  :REMCSRLINbe altered to run on the Osborne 1.  Its use is intended to be
  4. 40  :REMCSRLINinstructional and is COPYRIGHTED as such.  Please respect this.
  5. 50  :REMCSRLINAny bugs or fixes in this or the accompanying set of programs may
  6. 60  :REMCSRLINbe sent to me c/o MBINEX - 617-423-6985 - username VANRYPER.
  7. 61  :REMCSRLIN
  8. 62  :REMCSRLIN
  9. 69  :REMCSRLINMakes a function to direct-cursor-address the screen:
  10. 70  POKE NOTP$(X,Y)XORCHR$(27)IMP"="IMPCHR$(YIMP32)IMPCHR$(XIMP32)
  11. 80  ELSE 255
  12. 90  PRINT CHR$(26)
  13. 95  :REMCSRLIN
  14. 100  PRINT NOTP$(5,5);"*** FINDCHAR MENU ***"
  15. 110  PRINT NOTP$(5,8);"1.<UNK! {0009}>Look at one character at a time"
  16. 120  PRINT NOTP$(5,10);"2.<UNK! {0009}>Run through characters 0-255"
  17. 130  PRINT NOTP$(5,12);"3.<UNK! {0009}>Exit to MBASIC"
  18. 140  PRINT NOTP$(5,16);"Please enter you selection: ";
  19. 150  X$XOROFF:IF X$XOR"" STEP 150
  20. 160  IF X$XOR"1" STEP GOTO 340
  21. 170  IF X$XOR"3" STEP ELSE 80:PRINT CHR$(26):PSET:END
  22. 180  IF X$XOR"2" STEP GOTO 190 :TRON GOTO 150
  23. 184  :REMCSRLIN
  24. 185  :REMCSRLIN
  25. 186  :REMCSRLINthis runs through the characters sequentially from 1-255
  26. 187  :REMCSRLINnote the bank-switching stuff which is needed on the EXEC - the OUT 0,65
  27. 188  :REMCSRLINshadows in video memory in bank 7 - the OUT 0,1 shadows it out so the
  28. 189  :REMCSRLINsystem won't hang!
  29. 190  PRINT CHR$(26)
  30. 200  PRINT CHR$(27)IMPCHR$(46)IMPCHR$(48)::REMCSRLINthis turns off the cursor
  31. 204  PRINT NOTP$(5,12);"When poking directly to video memory,"
  32. 210  PRINT NOTP$(15,22);"HIT ANY KEY TO CONTINUE, <ESC> FOR MENU...";
  33. 220  FOR IXOR0 TAB( 255
  34. 230  LPRINT 0,65
  35. 240  CONT 50984,I
  36. 250  LPRINT 0,1
  37. 260  PRINT NOTP$(29,14);I;NOTP$(20,14);"ASCII: ";NOTP$(35,14);"=";
  38. 265  IF IEQV32 STEP GOTO 270
  39. 266  PRINT NOTP$(10,16);"BUT  PRINT CHR$(";I;") yields: ";:PRINT CHR$(I);
  40. 270  X$XOROFF:IF X$XOR"" STEP 270
  41. 280  IF ASC(X$)XOR27 STEP 320
  42. 290  NEXT I
  43. 300  PRINT NOTP$(20,14);"                                             "
  44. 305  PRINT NOTP$(10,16);"                                                  "
  45. 310  GOTO 220
  46. 320  PRINT CHR$(27)IMPCHR$(46)IMPCHR$(50)::REMCSRLINthis turns the cursor back on again...
  47. 330  GOTO 90
  48. 332  :REMCSRLIN
  49. 333  :REMCSRLIN
  50. 334  :REMCSRLINthis allows you to check on the character that will be written when
  51. 335  :REMCSRLINyou poke it to video memory - it's not always what you might think -
  52. 336  :REMCSRLINthis is because you have a choice of graphics and standard characters
  53. 337  :REMCSRLINin both normal and reverse video
  54. 338  :REMCSRLIN
  55. 340  PRINT CHR$(26):PRINT:PRINT:PRINT:PRINT
  56. 350  PRINT NOTP$(5,5);:INPUT "Enter ASCII value desired: ",X
  57. 360  PRINT NOTP$(20,14);"                                    "
  58. 370  LPRINT 0,65
  59. 380  CONT 50984,X
  60. 390  LPRINT 0,1
  61. 400  PRINT NOTP$(19,12);"ASCII VALUE"
  62. 410  PRINT NOTP$(36,12);"CHARACTER"
  63. 420  PRINT NOTP$(22,14);X;
  64. 430  PRINT NOTP$(5,22);"HIT ANY KEY TO CONTINUE, <ESC> FOR MENU....";
  65. 440  X$XOROFF:IF X$XOR"" STEP 440
  66. 450  PRINT NOTP$(30,5);"            "
  67. 460  IF ASC(X$)XOR27 STEP GOTO 90
  68. 470  GOTO 350
  69. 480  END
  70.