home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / club100 / cat / sam1.exe / lha / PRNMOD.DOC < prev    next >
Text File  |  1991-12-31  |  5KB  |  92 lines

  1. Documentation for PRNMOD.BA
  2.  
  3. by Jim Irwin
  4.  
  5. This file describes the procedure for modifying PRINT to suit your own printer.
  6.  
  7. CONTROL CODES:
  8.  
  9. Any character from A-Z except C,I,J,M,P,W,X,Y, and Z can be set up as a user defined control sequence. I,J,M,Z are used by M100 and C,P,W,X,Y by PRINT. In addition, each character actually stands for two codes.
  10.  
  11. VERY IMPORTANT: A user defined control character embedded in a text file MUST be followed by a + sign or a - sign! You won't crash the program if you don't do that, but you may get strange results.
  12.  
  13. Most user defined codes will be for Bold Print On/Off, Underline On/Off, etc.  That's the reason for the +/- following the control character. However, PRINT won't mind if a ^A+ is totally different from a ^A-. This should give you maximum flexibility to tailor PRINT to your needs. It is permissible to leave the + or - undefined.
  14.  
  15. CONTROL SEQUENCE STORAGE:
  16.  
  17. The computer stores the control sequences in the following manner:
  18.  
  19. First, the control character itself.  Next, the control sequence for +.  Next, the value 255 to indicate the end of the + code Next, the control sequence for -.  Last, a 255 to end the minus sequence.
  20.  
  21. The pattern repeats for each control character that you define. After the last control sequence, an extra 255 is added to end the table. Here's what a simple table would look like:
  22.  
  23. Addrs  Code  Description
  24. 59900    1   Code for ^A
  25. 59901   27   ^A+ = 27,87
  26. 59902   87
  27. 59903  255   End of ^A+
  28. 59904   27   ^A- = 27,38
  29. 59905   38
  30. 59906  255   End of ^A-
  31. 59907   19   Code for ^S
  32. 59908  255   ^S+ is not used
  33. 59909   27   ^S- = 27,31,9
  34. 59910   31
  35. 59911    9
  36. 59912  255   End of ^S-
  37. 59913  255   End of Control Code Table
  38.  
  39. Fortunately, you don't need to understand any of this to set up your copy of PRINT. Download PRN100.BAS and you will have a program that will ask you for your control sequences and then store them in the proper format. Right now, PRINT has set aside 60 storage locations for your control codes. If that isn't enough, edit line 20 of PRN100.BAS and change I=59900 to a lower value. To determine your space requirement:
  40.  
  41. 1.  A = # of user-defined control characters.
  42. 2.  Multiply A*3
  43. 3.  Count all the numbers used in all your control sequences
  44. 4.  Add results from #2 with results from #3
  45. 5.  Add #1 to results from #4
  46. 6.  If your answer is less than 60, then you are OK. Otherwise, change Line 20 as described earlier.
  47.  
  48. FONT SPECIFICATIONS:
  49.  
  50. In PRINT, one of the user options is [F]ont Code. The font code can be any integer from 1-254. You can select any code that is meaningful to you, I use characters/inch. Set-up is similar to the Control Codes. The Fonts have 40 bytes available starting at 59960. A sample look at the memory would be:
  51.  
  52. Addrs  Code  Description
  53. 59960   10   Font Code #10
  54. 59961   27   Sequence is 27,45,0
  55. 59962   45
  56. 59963    0
  57. 59964  255   End of Sequence
  58. 59965   12   Font Code #12
  59. 59966   27   Sequence is 27,31,13
  60. 59967   31
  61. 59968   13
  62. 59969  255   End of Sequence
  63. 59970  255   End of Font Table
  64.  
  65. To see if 40 bytes is enough for all your Font Codes, do this:
  66.  
  67. 1.  Multipy the number of codes by 2
  68. 2.  Add 1
  69. 3.  Add the total count (not the sum) of all your Sequence Numbers.
  70.  
  71. If you come up with 40 bytes or less, then you are OK. Otherwise, you need to edit line 20 in PRN100.BAS and change J=59960 to a lower number. You may also have to change I=59900 to a lower number if you change J.
  72.  
  73. USING PRN100.BAS
  74.  
  75. The program allows you to inspect the status of your stored control characters and Fonts. It also allows you to input a new SET of Control characters or a new SET of Font codes. I didn't program the capability to modify one specific code, I did include all kinds of error checking in the program. You can't overwrite PRINT, the Control characters won't overwrite the Font codes and vice versa. Unfortunately if an error like that occurs you lose all your input. You have to type in your control sequence again.
  76.  
  77. So, now is the time to dust off your Printer Manual and find your Control Sequences and Font Sequences. I recommend you get organized before you enter the PRN100.BAS program. Know what your + and/or - codes are going to be and know your Font codes and sequences.
  78.  
  79. To run PRN100.BAS:
  80.  
  81. 1.  Download PRN100.BAS as PRNMOD.DO
  82. 2.  Using TEXT, delete any leading or trailing garbage.
  83. 3.  Go to BASIC
  84. 4.  Load"PRNMOD"
  85. 5.  At the OK prompt, Kill"PRNMOD.DO"
  86. 6.  Save"PRNMOD"
  87. 7.  Run
  88.  
  89. CAUTION: If you are saving PRINT to RAM complete SAVEM"PRINT",59900,62959,60503  then make sure you LOADM"PRINT" before you run PRNMOD and SAVEM again after running PRNMOD.
  90.  
  91. The program is really pretty easy to use. I think you will be delighted with the results once you get PRINT configured to your specifications. I hope you enjoy using PRINT as much as I enjoyed writing it!
  92.