home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 15 / CDACTUAL15.iso / cdactual / program / basic / POKECHAR.ZIP / POKECHAR.BAS
Encoding:
BASIC Source File  |  1991-11-16  |  1.3 KB  |  37 lines

  1. ' This program demonstrates how to display the "unprintable" character codes
  2. ' 7, 9 to 13, and 28 to 31 in QBasic, QuickBASIC, or BASIC PDS.
  3. '----------------------------------------------------------------------------
  4. ' By Lou A. Moccia, 11/17/91, America Online DOS Forum Consultant: PCC Lou
  5. ' This file is Public Domain.
  6. '----------------------------------------------------------------------------
  7.  
  8. ' Use 80 by 25 character text mode screen.
  9.  
  10. SCREEN 0
  11. CLS
  12.  
  13. ' Set the data segment to the video memory area. Be sure to use &HB000
  14. ' instead for monochrome adapter displays.
  15.  
  16. DEF SEG = &HB800
  17.  
  18. ' The first number used with POKE is the screen location, which must be an
  19. ' EVEN number from 0 to 3998. 0 is the upper-left corner of the screen, and
  20. ' 3998 is the lower-right corner. Why is it 0 to 3998, you ask? An 80 by 25
  21. ' text mode screen is 2000 characters, and at 2 bytes per character the
  22. ' screen takes 4000 bytes of memory. So, the even numbers from 0 to 3998 are
  23. ' the screen memory locations. The second number used with POKE is the
  24. ' character code to display (code 30 is the "unprintable" symbol "").
  25.  
  26. POKE 0, 30
  27. POKE 3998, 30
  28.  
  29. ' Reset the data segment to the BASIC default.
  30.  
  31. DEF SEG
  32.  
  33. ' Just wait for a keypress so you can see the full screen.
  34.  
  35. WHILE INKEY$ = "": WEND
  36.  
  37.