home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / prt / chdump.do < prev    next >
Text File  |  2006-10-19  |  7KB  |  130 lines

  1. Documentation for CHDUMP.BA
  2. (Excerpted from Portable 100 magazine, May 1990)
  3. Copyright 1990 Tri-Mike Network East -- All rights reserved.
  4.  
  5. IMPORTANT FIRST STEP!
  6.  
  7.         Line 10 should be all one line, with just a single CRLF at the end.
  8. In downloading, it may be broken up. Be sure to remove all extraneous CRLF's
  9. except for the one at the end of line 10. All other lines should be okay as
  10. delivered.
  11.  
  12. ABOUT THE PROGRAM
  13.  
  14.         CHDUMP.BA is derived from George Flanders' screen dump program,
  15. DMP100.102 elsewhere the data libraries (and published in the May 1990 issue of
  16. Portable 100, as was this program). It simply prints a copy of the Model
  17. 100/102 screen to an IBM-compatible printer.
  18.  
  19.         This program works much like George's original, using the same
  20. keystrokes to start and to disable the screen dump. The major difference is
  21. that, while his program is a .CO file that operates high RAM, mine is machine
  22. language packed inside a .BA file, which resides in low RAM, thus minimizing
  23. conflicts with other .CO files, like print formatters, disk operating systems
  24. (e.g., FLOPPY), screen enhancement software (e.g., Ultrascreen, View-80), and
  25. what-have-you.
  26.  
  27.         To use CHDUMP.BA, type it in and save it as CHDUMP.BA (it expects that
  28. name). To save memory, you may leave out unnecessary spaces and delete remarks,
  29. but you must use all existing line numbers, and remark lines must contain at
  30. least the line number and the apostrophe. If in doubt, just type it in exactly
  31. as shown. This creates the BASIC installer program. Save it to tape or disk, so
  32. you'll never have to type it in again.
  33.  
  34.         Before running the installer, first kill any .BA files that you may
  35. later want to remove. Some BASIC programs don't show a .BA extension (for
  36. example, UR-2, RANDOM, T-WORD+). When in doubt about a file, kill it. You can
  37. reload it later.
  38.  
  39.         CAUTION: Mistakes made in typing CHDUMP.BA can have potentially
  40. disastrous results. The first time you run it, back up any important files
  41. first!
  42.  
  43.         Now you can run CHDUMP.BA. When run, it installs the machine code into
  44. line 10, and then deletes any unneeded lines, shrinking itself from 3K to 277
  45. bytes. CHDUMP.BA is now ready to use. (If you get a Load Error message, see the
  46. LOAD ERROR section below.)
  47.  
  48.         To arm the program (i.e., to make it ready to do a screen dump) just
  49. run it from the main menu like any other .BA program. The Model 100/102 main
  50. menu quickly returns, and CHDUMP.BA is missing. It's been made invisible so
  51. that it can't be killed. Killing it while it's armed can cause a cold start. To
  52. indicate that it's armed, BASIC on the main menu is now named BASIC+, and any
  53. time you press the ESC/GRPH key combination, it will initiate a screen dump to
  54. your printer. If the printer is not connected and ready, the computer will beep
  55. to inform you.
  56.  
  57.         To disable CHDUMP, press ESC/CODE. When you return to the main menu,
  58. BASIC has lost the + symbol, and CHDUMP.BA is back on the menu. It is now
  59. disarmed and can be safely killed. However, being so small, it is usually
  60. easier to leave it on the menu, making it convenient and handy whenever needed.
  61.  
  62. CAUTIONS AND CLARIFICATIONS
  63.  
  64.         First, never edit the installed CHDUMP. The embedded machine code in
  65. line 10 may run afoul of the computer's editor, and it may refuse to restore
  66. itself to .BA form, forcing you to kill it and start over.
  67.  
  68.         Second, if you disable it from the main menu, CHDUMP.BA won't reappear
  69. (and BASIC+ won't lose the +) until you've left the main menu and returned. A
  70. bit of a quirk, perhaps, but what do you want from a 277-byte program?
  71.  
  72.         Third--and this applies to George Flanders' original version as well--
  73. when pressing ESC/GRPH or ESC/CODE, you must first hold down GRPH or CODE, and
  74. then press ESC. If you press ESC first, nothing happens. It has to do with the
  75. way the M100/102 scans for keys; nothing we can do about it.
  76.  
  77.         And finally, don't bother saving the installed (277-byte) CHDUMP.BA to
  78. tape or disk, intending to reload it later to avoid hassling with the normal
  79. installation procedure. Upon reloading, it won't be able to find itself in the
  80. directory, so it won't work properly. In other words, if you ever remove
  81. CHDUMP.BA, always reinstall it using the uninstalled (3K) version, as described
  82. above.
  83.  
  84. LOAD ERROR
  85.  
  86.         Packing machine language into a .BA program (as CHDUMP does) can be a
  87. complex affair, because you can't predict where the program will reside in
  88. memory. Since the values of certain bytes depend on the program's location,
  89. sometimes a byte contains a value BASIC misinterprets. The Load Error message
  90. warns you of such a byte. You must move the code higher in memory, a byte at a
  91. time, until all bytes are acceptable to BASIC. Here's how:
  92.  
  93. 1. Type NEW and press ENTER. Type KILL "CHDUMP.BA" and press ENTER.
  94. 2. Load a fresh copy of CHDUMP.BA from disk or tape, and save it to RAM as
  95. CHDUMP.BA.
  96. 3. Edit line 10 (type EDIT 10 and press ENTER). Insert an X right after the
  97. REM, making it REMX. Then press F8.
  98. 4. Edit line 100 (type EDIT 100 and press ENTER). Change X=0 to X=1. Then press
  99. F8.
  100. 5. Edit line 870 (type EDIT 870 and press ENTER). Change the +5 to +6. Then
  101. press F8.
  102.  
  103.         You've just moved the program code up one byte in memory. Try running
  104. the program again. If it still fails, repeat steps 1-5, inserting another X in
  105. line 10 (e.g., REMXX) adding 1 more to the numbers in lines 100 and 870, and
  106. then run it again. One or two X's should do the trick. If you've added 5 or 6
  107. of them without success, carefully check your program listing for errors.
  108.  
  109. COMPATIBILITY
  110.  
  111.         As described in George Flanders' documentation, the program uses the
  112. CHGET hook in the Model 100/102 keyboard ROM routine. Some other programs may
  113. alter that hook without first checking to see if it's in use, and/or without
  114. restoring its contents afterward. See George's docs for further details. Until
  115. you've experimented a bit and are sure of its compatibility with your other
  116. programs, make frequent backups. (Good advice when using any new software.)
  117.  
  118. HAPPY TRAILS
  119.  
  120.         Well, that's it. Use and enjoy. Catch ya! -- Nuge --
  121.  
  122.  
  123. Afterthoughts: I've learned that the Gemini X10 printer uses different codes
  124. to set up the left margin and linefeed spacing. Change last three DATA values
  125. in line 810 from 27,108,10 (ESC"l"10) to 27,77,10 (ESC"M"10) for left margin.
  126. Also change the first three DATA values in line 820 from 27,51,24 (ESC"3"24)
  127. to 27,51,16 (ESC"3"16) which sets the linefeed spacing to more closely suit
  128. the Gemini. Experiment with different values near 16 until you find one that's
  129. pleasing to your printer.
  130.