home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / p / wspatch.lbr / WSFAST.DZC / WSFAST.DOC
Encoding:
Text File  |  1993-10-25  |  8.6 KB  |  268 lines

  1.    Addendum to Thom Hogan's WordStar modification 
  2.        article in the June/July 1982 issue of 
  3.               THE PORTABLE COMPANION.  
  4.  
  5.                    By Dave Radke
  6.  
  7.  
  8. I was very pleased to see the Wordstar modification 
  9. article presented by Thom Hogan in the June/July 
  10. issue of THE PORTABLE COMPANION.  I enjoyed the 
  11. smooth response of the WordStar that was originally 
  12. shipped with my Osborne and I did not mind the use 
  13. of underlining to highlight (although half-intensity 
  14. highlighting is a lot nicer).  I was very anxious to 
  15. try incorporating the modification suggested by Thom 
  16. into my "upgraded" WordStar program.  So I 
  17. immediately began to enter the listing presented 
  18. starting on page 47 of THE PORTABLE COMPANION onto 
  19. diskette and that is when I started to run into 
  20. problems.  The WSMODS.ASM listing does not work as 
  21. presented.  After several tries, I was able to 
  22. correct the problems in the WSMODS.ASM listing so 
  23. that it works as advertised.  
  24.  
  25. Included on this diskette is an assembly listing 
  26. titled "WSFAST.ASM" that contains the modifications 
  27. I used to update my WordStar program.  The following 
  28. list describes the changes I made to Thom's listing.  
  29. Changes 1,2,4, & 6 are all the changes needed to get 
  30. WordStar working as Thom described in his article.  
  31. The other changes I made to suit my own personal 
  32. preference.  To incorporate the changes, follow 
  33. Thom's directions presented on page 46 of THE 
  34. PORTABLE COMPANION with one exception - SAVE 56 
  35. B:WS.COM <cr> is all that is necessary to save the 
  36. WordStar program instead of SAVE 63 B:WS.COM <cr> 
  37. (at least this is true on the version 1.3 upgrade 
  38. WordStar program).  
  39.  
  40.      (reference the listing starting on page 47 
  41.              of THE PORTABLE COMPANION)
  42.  
  43. 1. ESCAPE should be defined with EQU rather than DB.
  44.  
  45. 2. SCREEN was not defined in the listing and should 
  46.    be defined as SCREEN EQU 0F000h
  47.  
  48. 3. I entered a modification at location 190h to 
  49.    update the WordStar startup message to read 
  50.    "Smooth Scrolling Osborne I.
  51.  
  52. 4. Use single quotes to define cursor position 
  53.    character rather than double quotes on CLEAD1 
  54.    line (i.e. '=' instead of "=")
  55.  
  56. 5. I replaced JMP ITERM with DB 0,0,0C9h on INISUB 
  57.    line since I prefer not to clear the screen when 
  58.    WordStar is started.  
  59.  
  60. 6. I replaced JMP INCON with DB 0,0,0C9h on UCONI 
  61.    line since using BIOS console input bypasses 
  62.    check for arrow key and special function key 
  63.    definitions.
  64.  
  65. 7. I changed the medium-long delay from 25 to 35 
  66.    since I like a little more time to respond before 
  67.    the prompt messages come up in WordStar.
  68.  
  69. 8. I modified the Z80 code so that the auto scroll 
  70.    column number is easily identifiable and changed 
  71.    to suit your own preference.  I set it at column 
  72.    40.
  73.  
  74. 9. For the input prompt/command response, I changed 
  75.    the CALL from X1BB4 to X30D2.  This sets the 
  76.    horizontal offset to the WordStar column number 
  77.    rather than to zero in response to WordStar 
  78.    prompts.
  79.  
  80.  
  81. The following is an entire listing of the WordStar 
  82. modifications:
  83.  
  84. ;
  85. ;    WSFAST.ASM
  86. ;
  87. ;==================================================|
  88. ;                           |
  89. ; Published by The Portable Companion, 1982.       |
  90. ; Routines by Thom Hogan, OCC               |
  91. ; Modified by Dave Radke, Osborne User             |
  92. ;__________________________________________________|
  93. ;  
  94. ;    DEFINITIONS
  95. ;
  96. TRUE    EQU    1
  97. FALSE    EQU    NOT TRUE    
  98. ;                    
  99. SMOOTH    EQU    TRUE    ;if TRUE, smooth scrolling implemented
  100. HILITE    EQU    TRUE     ;if TRUE, underlined video selected for hilite
  101. WIDE    EQU    TRUE    ;if TRUE, 128 character width set, else 80
  102. ;
  103. CURSOR    EQU    0EF5Ah    ;location of cursor position in BMRAM
  104. IOUT    EQU    0106h    ;location of output routine in WordStar 2.26
  105. SCREEN    EQU    0F000h    ;this was left out of Thom Hogan's listing
  106. ESCAPE  EQU     27    ;ASCII CODE OF <ESC>   (This must be an EQU, not a DB)
  107. ;    
  108. ;    Change Logo
  109. ;
  110.     IF    SMOOTH
  111.     ORG    190h
  112.     DB    'Smooth Scrolling Osborne I       ';Limit LOGO to 33 characters
  113.     ENDIF
  114. ;
  115. ;    TERMINAL PATCH AREA
  116. ;
  117.     ORG    248h    ;origin of WordStar terminal patch area
  118. HITE    DB    24    ;24 lines on screen
  119.  
  120.     IF     WIDE
  121. WID    DB     128    ;128 columns on screen
  122.     ENDIF
  123.     IF     NOT WIDE
  124. WID    DB    80    ;80 columns on screen
  125.     ENDIF
  126.  
  127. CLEAD1    DB    2,ESCAPE,'='    ;Cursor positioning routine
  128.     DB    0,0,0,0,0,0    ;Room for expansion
  129. CLEAD2    DB    0,0,0,0,0    ;Function not used by Osborne 1
  130. CTAIL    DB    0,0,0,0,0    ;Function not used by Osborne 1
  131. CB4FLG    DB    0        ;Function not used by Osborne 1
  132. LINOFF    DB    32        ;Line offset amount
  133. COLOFF    DB    32        ;Column offset amount
  134. ASCUR    DB    0,0,0,0        ;Function not used by Osborne 1
  135.  
  136.     IF SMOOTH
  137. UCRPOS    JMP    WCUR        ;Get cursor position
  138.     ENDIF
  139.     IF NOT SMOOTH
  140. UCRPOS    DB    0,0,0C9h    ;Not used if terminal emulated
  141.     ENDIF
  142.  
  143.     DW    IOUT        ;Wordstar output routine
  144.     DB    0,0,0,0        ;Reserved bytes
  145. ERAEOL    DB    2,ESCAPE,54h    ;Erase to end of line sequence
  146.     DB    0,0,0,0        ;Room for expansion
  147. LINDEL    DB    2,ESCAPE,52h    ;Delete line sequence
  148.     DB    0,0,0,0        ;Room for expansion
  149. LININS    DB    2,ESCAPE,45h    ;Insert line sequence
  150.     DB    0,0,0,0,0,0    ;Room for expansion
  151. IVON    DB    2,ESCAPE,29h    ;Highlighting ON sequence
  152.     DB    0,0,0,0        ;Room for expansion
  153. IVOFF    DB    2,ESCAPE,28h    ;Highlighting OFF sequence
  154.     DB    0,0,0,0        ;Room for expansion
  155. TRMINI    DB    8,'O C C -1'
  156. TRMUNI    DB    8,'O C C -1'
  157. INISUB    DB     0,0,0C9h    ;put JMP ITERM here if you like
  158. UNISUB    JMP    XTERM        ;  screen cleared before entering Wordstar
  159. USELST    DB    1        ;Enable character in last position to show
  160.     DB    0,0,0        ;Reserved bytes for expansion
  161. DELCUS    DB    5        ;Delay after cursor set
  162. DELMIS    DB    3        ;Delay after other functions
  163. ;
  164. ; The following section contains the primary code which implements
  165. ; smooth scrolling on the Osborne 1.  Be careful when modifying this
  166. ; section.
  167. ;
  168.     IF    SMOOTH
  169. MEMAPV    DB    1        ;Use memory-mapped video
  170. MEMADR    DW    SCREEN        ;Screen location
  171.     ENDIF
  172.     IF     NOT SMOOTH
  173. MEMAPV    DB    0        ;Use terminal driver
  174. MEMADR    DB    0,0        ;No memory address needed
  175.     ENDIF
  176.  
  177.     IF    HILITE
  178. HIBIV    DB    80h        ;Use underline for highlight
  179.     ENDIF
  180.     IF    NOT HILITE    
  181. HIBIV    DB    00h        ;No highlighting
  182.     ENDIF
  183. HIBCUR    DB    80h        ;cursor set on self
  184. CRBLIV    DB    0FFh        ;blink cursor on self
  185. ZAFCIN    DW    0        ;Not needed for Osborne 1
  186. RUBFXF    DB    0        ;Not needed for Osborne 1
  187. RFIXER    DB    0        ;Not needed for Osborne 1
  188.  
  189.     IF     SMOOTH
  190. UCNSTA    JMP    0E506h        ;get console status from BIOS
  191. UCONI    DB     0,0,0C9h    ;if you put JMP INCON here, arrow keys are bypassed
  192. UCONO    JMP    OUTCON        ;send console output
  193.     ENDIF
  194.     IF    NOT SMOOTH
  195. UCNSTA    DB    0,0,0C9h    ;no special console status from BIOS
  196. UCONI    DB    0,0,0C9h    ;no special console input
  197. UCONO    DB    0,0,0C9h    ;no special console output
  198.     ENDIF
  199. SWIN    DB    0C9h,0,0,0,0,0    ;no special before video routine
  200. SWOUT    DB    0C9h,0,0,0,0,0    ;no special after video routine
  201. DEL1    DB    3        ;short delay
  202. DEL2    DB    9        ;medium-short delay
  203. DEL3    DB    35        ;medium-long delay (25 is standard)
  204. DEL4    DB    64        ;long delay 
  205. ;
  206. ;    SPECIAL ROUTINES FOR OSBORNE 1
  207. ;    Not part of Micro Pro patch items
  208. ;
  209.     ORG    02D6h
  210. ;    Initialization of terminal routine  
  211. ;      (Use of this routine cleans up display before starting Wordstar)
  212. ;
  213. ITERM    MVI    A,26        ;clear screen code in A
  214.     CALL    UCONO        ;send it
  215.     RET            ;done
  216. ;
  217. ;    Finalization of terminal routine
  218. ;
  219. XTERM    RET            ;just get out
  220. ;
  221. ;    Input from console routine
  222. ;
  223. ;    NOTE: if used, this routine will bypass special function keys 
  224. ;          and arrow keys.
  225. ;
  226. INCON    CALL    0E509h        ;get a character
  227.     MOV    A,C        ;put it in A where Wordstar can use it
  228.     RET            ;done
  229. ;
  230. ;    Output from console routine
  231. ;
  232. OUTCON    MOV    C,A        ;get it in C where CP/M can use it
  233.     JMP    0E50Ch        ;send it and return directly
  234. ;
  235. ;    Position the cursor by brute force in BMRAM
  236. ;
  237. WCUR    LXI    H,SCREEN    ;put screen start in HL register
  238.     DAD    D        ;add position of cursor in DE to HL
  239.     SHLD    CURSOR        ;save new cursor position
  240.     RET
  241. ;
  242. ;    Special automatic scrolling routines coded in Z80 assembly language
  243. ;
  244. X1BB4    DB    0D9h,000h,000h,0AFh,018h,011h    ;if used, resets screen to column 0.
  245. ;
  246. X30D2    DB    0D9h,000h,000h,03Ah,01Eh,037h    ;Sets screen to Wordstar's column #.
  247.     DB    0D6h                 ;Begins auto horizontal scroll 
  248.                         ;                       at column 40
  249.     DB     040            ;(This location sets auto scroll column #)
  250.     DB    030h,001h,0AFh,0FEh        ;
  251.     DB    04Ch,038h,002h,03Eh,04Ch,0C6h    ;       
  252.     DB    020h,032h,019h,003h,021h,016h    ;if used, turn auto horizonital 
  253.     DB    003h,0CDh,01Bh,003h,0D9h,000h    ;     scroll feature off using SETUP.
  254.     DB    000h,0C3h,0BBh,01Bh,01Bh,053h
  255.     DB    020h,020h,000h,07Eh,0B7h,0C8h
  256.     DB    023h,0E5h,0CDh,0E2h,002h,0E1h
  257.     DB    018h,0F5h,000h,000h
  258.     IF    SMOOTH
  259.     ORG    1BB4h            ;input prompt/command response in Wordstar
  260.     CALL    X30D2            ;   (use auto horizontal scroll routine)
  261.  
  262.     ORG    30D2h            ;input data character
  263.     JMP    X30D2            ; go directly to auto horizontal scroll routine
  264.     ENDIF
  265.     
  266.     END
  267.