home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / PROGRAMS / WSTAR / WSSCRIPT.PZT / WSSCRIPT.PAT
Text File  |  2000-06-30  |  5KB  |  97 lines

  1.                                  WSSCRIPT.PAT
  2.                                  ------------
  3.                         Wordstar Super/Subscript Patch
  4.                         for recent Dot Matrix Printers
  5.  
  6.                                 E.Meyer - 7/87
  7.  
  8.  
  9.      Wordstar is a fine program, but an old one that dates from the days of 
  10. simple printers; unfortunately, it's often a challenge to get it installed to 
  11. take advantage of all the neat features of recent printers.  One problem is 
  12. that there just aren't enough installable codes; the other is that not all of 
  13. them are fully generic, like the ^Y toggle and the User Codes ^Q/W/E/R.  For 
  14. example, you can install ^A and ^N for any codes you want; but since they're 
  15. "really" intended for alternate pitch, Wordstar will ignore ^N if it wasn't 
  16. preceded by ^A.
  17.      Similarly, ^S is supposed to underline -- but it does it by overstriking 
  18. an underline character, whereas many modern printers have a nicer continuous 
  19. underline that should be used instead, and overstriking will foul up with 
  20. proportional spacing.  (Often the ^Y toggle is sacrificed for this purpose... 
  21. but then, what about italics? color?)
  22.  
  23.      THE PRESENT PROBLEM relates to super/subscripts.  Wordstar thinks these 
  24. are done by moving the paper down and up (printing up and down), respectively, 
  25. so it has two installable code areas, ROLUP and ROLDOW.  It assumes that the 
  26. ROLUP sequence will start a superscript OR end a subscript, and ROLDOW vice 
  27. versa.  This works with some dot matrix printers, like Okidatas, which have a 
  28. symmetric code sequence that must have been designed with just this in mind.  
  29. But my new printer, and presumably other Epson compatibles, use:
  30.               ESC S 0 - superscript on
  31.               ESC S 1 - subscript on
  32.               ESC T   - either script off!!
  33. After spending a few minutes imagining appropriate punishments for whoever 
  34. designed this, I found that I could go ahead and put in ESC S 0 as ROLUP and 
  35. ESC T as ROLDOW, and superscripts (^T) would work fine... but I'd have to 
  36. avoid subscripts (^V).  This was unacceptable, so I got to work with a 
  37. debugger and figured out a patch to get around it.
  38.  
  39.                        PATCHING WS.COM AND WSOVLY1.OVR
  40.  
  41.      The following information gives addresses for Wordstar 3.3.  For versions 
  42. 2.26-3.0, WS.COM has MORPAT at 02E0, and ROLUP/DOW at 06BF and 06CF, instead. 
  43. I don't know where the relevant code in the overlay is; you'll have to find 
  44. it, as I did, by searching for the ROLUP/DOW addresses.
  45.      This patch changes the printing code in WSOVLY1.OVR to make the existing 
  46. ROLUP and ROLDOW the codes for beginning superscript and subscript, respec- 
  47. tively; and it creates a new pair of codes in the MORPAT area to function as 
  48. UNROLUP and UNROLDOW.  I found room for these at 02D3 and 02D8; if you already 
  49. have code in the MORPAT area you may have to put them someplace else.
  50.      Use DDT, SID, EDFILE, DU, or your favorite patching utility.
  51.  
  52. STEP 1.  Install ROLUP, ROLDOW in WS.COM.
  53.  
  54.      ROLUP    06C5  03   ;this is "ESC S 0" for superscript
  55.               06C6  1B
  56.               06C7  53
  57.               06C8  30
  58.  
  59.      ROLDOW   06CA  03   ;this is "ESC S 1" for subscript
  60.               06CB  1B
  61.               06CC  53
  62.               06CD  31
  63.  
  64. STEP 2.  Add "UNROLUP, UNROLDOW" to WS.COM.
  65.  
  66.    UNROLUP    02D3   00   --->  02      ;this is "ESC T"...
  67.               02D4   00         1B      ;use whatever you need
  68.               02D5   00         54
  69.  
  70.    UNROLDOW   02D8   00   --->  02      ;for me, this is the same
  71.               02D9   00         1B
  72.               02DA   00         54
  73.  
  74. STEP 3.  Change print code in WSOVLY1.OVR.
  75.  
  76.               73FF   LXI  B,06CA  --->  LXI  B,02D3
  77.               7402   LXI  D,06C5
  78.               7405   LXI  H,3AB4
  79.               7408   CPI  14
  80.               740A   JZ   42BD
  81.               740D   PUSH D       --->  MVI  C,D8    ;change 02D3 to 02D8
  82.               740E   MOV  D,B
  83.               740F   MOV  E,C     --->  MVI  E,CA    ;change 06C5 to 06CA
  84.               7410   POP  B
  85.               7411   LXI  H,3AB5
  86.               7414   CPI  16
  87.               7416   JZ   42BD
  88.  
  89.  
  90.      Obviously I can't guarantee that you won't have trouble, but I have found 
  91. the patch to work.  You may want to remove it if you ever reinstall Wordstar 
  92. for a different printer, especially a daisy wheel that may be using ROLUP/DOW 
  93. for other things as well.
  94.  
  95.  
  96.        ----- Eric Meyer, 427 N. Washington, Bloomington, IN 47401 -----
  97.