home *** CD-ROM | disk | FTP | other *** search
- Addendum to Thom Hogan's WordStar modification
- article in the June/July 1982 issue of
- THE PORTABLE COMPANION.
-
- By Dave Radke
-
-
- I was very pleased to see the Wordstar modification
- article presented by Thom Hogan in the June/July
- issue of THE PORTABLE COMPANION. I enjoyed the
- smooth response of the WordStar that was originally
- shipped with my Osborne and I did not mind the use
- of underlining to highlight (although half-intensity
- highlighting is a lot nicer). I was very anxious to
- try incorporating the modification suggested by Thom
- into my "upgraded" WordStar program. So I
- immediately began to enter the listing presented
- starting on page 47 of THE PORTABLE COMPANION onto
- diskette and that is when I started to run into
- problems. The WSMODS.ASM listing does not work as
- presented. After several tries, I was able to
- correct the problems in the WSMODS.ASM listing so
- that it works as advertised.
-
- Included on this diskette is an assembly listing
- titled "WSFAST.ASM" that contains the modifications
- I used to update my WordStar program. The following
- list describes the changes I made to Thom's listing.
- Changes 1,2,4, & 6 are all the changes needed to get
- WordStar working as Thom described in his article.
- The other changes I made to suit my own personal
- preference. To incorporate the changes, follow
- Thom's directions presented on page 46 of THE
- PORTABLE COMPANION with one exception - SAVE 56
- B:WS.COM <cr> is all that is necessary to save the
- WordStar program instead of SAVE 63 B:WS.COM <cr>
- (at least this is true on the version 1.3 upgrade
- WordStar program).
-
- (reference the listing starting on page 47
- of THE PORTABLE COMPANION)
-
- 1. ESCAPE should be defined with EQU rather than DB.
-
- 2. SCREEN was not defined in the listing and should
- be defined as SCREEN EQU 0F000h
-
- 3. I entered a modification at location 190h to
- update the WordStar startup message to read
- "Smooth Scrolling Osborne I.
-
- 4. Use single quotes to define cursor position
- character rather than double quotes on CLEAD1
- line (i.e. '=' instead of "=")
-
- 5. I replaced JMP ITERM with DB 0,0,0C9h on INISUB
- line since I prefer not to clear the screen when
- WordStar is started.
-
- 6. I replaced JMP INCON with DB 0,0,0C9h on UCONI
- line since using BIOS console input bypasses
- check for arrow key and special function key
- definitions.
-
- 7. I changed the medium-long delay from 25 to 35
- since I like a little more time to respond before
- the prompt messages come up in WordStar.
-
- 8. I modified the Z80 code so that the auto scroll
- column number is easily identifiable and changed
- to suit your own preference. I set it at column
- 40.
-
- 9. For the input prompt/command response, I changed
- the CALL from X1BB4 to X30D2. This sets the
- horizontal offset to the WordStar column number
- rather than to zero in response to WordStar
- prompts.
-
-
- The following is an entire listing of the WordStar
- modifications:
-
- ;
- ; WSFAST.ASM
- ;
- ;==================================================|
- ; |
- ; Published by The Portable Companion, 1982. |
- ; Routines by Thom Hogan, OCC |
- ; Modified by Dave Radke, Osborne User |
- ;__________________________________________________|
- ;
- ; DEFINITIONS
- ;
- TRUE EQU 1
- FALSE EQU NOT TRUE
- ;
- SMOOTH EQU TRUE ;if TRUE, smooth scrolling implemented
- HILITE EQU TRUE ;if TRUE, underlined video selected for hilite
- WIDE EQU TRUE ;if TRUE, 128 character width set, else 80
- ;
- CURSOR EQU 0EF5Ah ;location of cursor position in BMRAM
- IOUT EQU 0106h ;location of output routine in WordStar 2.26
- SCREEN EQU 0F000h ;this was left out of Thom Hogan's listing
- ESCAPE EQU 27 ;ASCII CODE OF <ESC> (This must be an EQU, not a DB)
- ;
- ; Change Logo
- ;
- IF SMOOTH
- ORG 190h
- DB 'Smooth Scrolling Osborne I ';Limit LOGO to 33 characters
- ENDIF
- ;
- ; TERMINAL PATCH AREA
- ;
- ORG 248h ;origin of WordStar terminal patch area
- HITE DB 24 ;24 lines on screen
-
- IF WIDE
- WID DB 128 ;128 columns on screen
- ENDIF
- IF NOT WIDE
- WID DB 80 ;80 columns on screen
- ENDIF
-
- CLEAD1 DB 2,ESCAPE,'=' ;Cursor positioning routine
- DB 0,0,0,0,0,0 ;Room for expansion
- CLEAD2 DB 0,0,0,0,0 ;Function not used by Osborne 1
- CTAIL DB 0,0,0,0,0 ;Function not used by Osborne 1
- CB4FLG DB 0 ;Function not used by Osborne 1
- LINOFF DB 32 ;Line offset amount
- COLOFF DB 32 ;Column offset amount
- ASCUR DB 0,0,0,0 ;Function not used by Osborne 1
-
- IF SMOOTH
- UCRPOS JMP WCUR ;Get cursor position
- ENDIF
- IF NOT SMOOTH
- UCRPOS DB 0,0,0C9h ;Not used if terminal emulated
- ENDIF
-
- DW IOUT ;Wordstar output routine
- DB 0,0,0,0 ;Reserved bytes
- ERAEOL DB 2,ESCAPE,54h ;Erase to end of line sequence
- DB 0,0,0,0 ;Room for expansion
- LINDEL DB 2,ESCAPE,52h ;Delete line sequence
- DB 0,0,0,0 ;Room for expansion
- LININS DB 2,ESCAPE,45h ;Insert line sequence
- DB 0,0,0,0,0,0 ;Room for expansion
- IVON DB 2,ESCAPE,29h ;Highlighting ON sequence
- DB 0,0,0,0 ;Room for expansion
- IVOFF DB 2,ESCAPE,28h ;Highlighting OFF sequence
- DB 0,0,0,0 ;Room for expansion
- TRMINI DB 8,'O C C -1'
- TRMUNI DB 8,'O C C -1'
- INISUB DB 0,0,0C9h ;put JMP ITERM here if you like
- UNISUB JMP XTERM ; screen cleared before entering Wordstar
- USELST DB 1 ;Enable character in last position to show
- DB 0,0,0 ;Reserved bytes for expansion
- DELCUS DB 5 ;Delay after cursor set
- DELMIS DB 3 ;Delay after other functions
- ;
- ; The following section contains the primary code which implements
- ; smooth scrolling on the Osborne 1. Be careful when modifying this
- ; section.
- ;
- IF SMOOTH
- MEMAPV DB 1 ;Use memory-mapped video
- MEMADR DW SCREEN ;Screen location
- ENDIF
- IF NOT SMOOTH
- MEMAPV DB 0 ;Use terminal driver
- MEMADR DB 0,0 ;No memory address needed
- ENDIF
-
- IF HILITE
- HIBIV DB 80h ;Use underline for highlight
- ENDIF
- IF NOT HILITE
- HIBIV DB 00h ;No highlighting
- ENDIF
- HIBCUR DB 80h ;cursor set on self
- CRBLIV DB 0FFh ;blink cursor on self
- ZAFCIN DW 0 ;Not needed for Osborne 1
- RUBFXF DB 0 ;Not needed for Osborne 1
- RFIXER DB 0 ;Not needed for Osborne 1
-
- IF SMOOTH
- UCNSTA JMP 0E506h ;get console status from BIOS
- UCONI DB 0,0,0C9h ;if you put JMP INCON here, arrow keys are bypassed
- UCONO JMP OUTCON ;send console output
- ENDIF
- IF NOT SMOOTH
- UCNSTA DB 0,0,0C9h ;no special console status from BIOS
- UCONI DB 0,0,0C9h ;no special console input
- UCONO DB 0,0,0C9h ;no special console output
- ENDIF
- SWIN DB 0C9h,0,0,0,0,0 ;no special before video routine
- SWOUT DB 0C9h,0,0,0,0,0 ;no special after video routine
- DEL1 DB 3 ;short delay
- DEL2 DB 9 ;medium-short delay
- DEL3 DB 35 ;medium-long delay (25 is standard)
- DEL4 DB 64 ;long delay
- ;
- ; SPECIAL ROUTINES FOR OSBORNE 1
- ; Not part of Micro Pro patch items
- ;
- ORG 02D6h
- ;
- ; Initialization of terminal routine
- ; (Use of this routine cleans up display before starting Wordstar)
- ;
- ITERM MVI A,26 ;clear screen code in A
- CALL UCONO ;send it
- RET ;done
- ;
- ; Finalization of terminal routine
- ;
- XTERM RET ;just get out
- ;
- ; Input from console routine
- ;
- ; NOTE: if used, this routine will bypass special function keys
- ; and arrow keys.
- ;
- INCON CALL 0E509h ;get a character
- MOV A,C ;put it in A where Wordstar can use it
- RET ;done
- ;
- ; Output from console routine
- ;
- OUTCON MOV C,A ;get it in C where CP/M can use it
- JMP 0E50Ch ;send it and return directly
- ;
- ; Position the cursor by brute force in BMRAM
- ;
- WCUR LXI H,SCREEN ;put screen start in HL register
- DAD D ;add position of cursor in DE to HL
- SHLD CURSOR ;save new cursor position
- RET
- ;
- ; Special automatic scrolling routines coded in Z80 assembly language
- ;
- X1BB4 DB 0D9h,000h,000h,0AFh,018h,011h ;if used, resets screen to column 0.
- ;
- X30D2 DB 0D9h,000h,000h,03Ah,01Eh,037h ;Sets screen to Wordstar's column #.
- DB 0D6h ;Begins auto horizontal scroll
- ; at column 40
- DB 040 ;(This location sets auto scroll column #)
- DB 030h,001h,0AFh,0FEh ;
- DB 04Ch,038h,002h,03Eh,04Ch,0C6h ;
- DB 020h,032h,019h,003h,021h,016h ;if used, turn auto horizonital
- DB 003h,0CDh,01Bh,003h,0D9h,000h ; scroll feature off using SETUP.
- DB 000h,0C3h,0BBh,01Bh,01Bh,053h
- DB 020h,020h,000h,07Eh,0B7h,0C8h
- DB 023h,0E5h,0CDh,0E2h,002h,0E1h
- DB 018h,0F5h,000h,000h
- IF SMOOTH
- ORG 1BB4h ;input prompt/command response in Wordstar
- CALL X30D2 ; (use auto horizontal scroll routine)
-
- ORG 30D2h ;input data character
- JMP X30D2 ; go directly to auto horizontal scroll routine
- ENDIF
-
- END