home *** CD-ROM | disk | FTP | other *** search
- ;
- ; 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