home *** CD-ROM | disk | FTP | other *** search
- .title "WordStar Function Keys"
- .pabs
- .phex
- .xlink
- .setdat 7/1/86
- .settim 8:34:00
- .setwid 120
- ;
- ; 7/1/86 gsd morpat for 3.3 changed to 02d7h
- ; eliminated last 3.3 patch
- ;
- ;
- ; note: this code assembles with the CDL ZASM assembler
- ;
- version =\ "WordStar Version 30 or 33 "
-
- .ife version-30,[
- .sbttl "Version 3.0"
- ucnsta = 002BAH
- xtab = 00649H
- fptab = 0066EH
- nfilx = 00470H
- vtab = 00481H
- inisub = 002A4H
- morpat = 002E0H
- pbgmem = 0035CH
- patch1 = 01C04H
- epat1 = 01C2EH
- patch2 = 01E4EH
- epat2 = 01E63H
- RECR = 02121H
- patch3 = RECR
- epat3 = 0213EH
- ftchry = 01CF3H
- ftchrx = 01D14H
- CRPU = 02316H
- ecrpu = 02330H
- bioscl = 01D58H
-
- ]
- [
- .sbttl "Version 3.3"
- ucnsta = 0029AH
- xtab = 00655H
- fptab = 0067AH
- nfilx = 0047CH
- vtab = 00489H
- inisub = 00287H
- morpat = 002d7h ; formorally 002CBH
- pbgmem = 0034BH
- patch1 = 01C1AH
- epat1 = 01C44H
- patch2 = 01E68H
- epat2 = 01E7DH
- RECR = 0213BH
- patch3 = RECR
- epat3 = 02158H
- ftchry = 01D09H
- ftchrx = 01D2AH
- CRPU = 02330H
- ecrpu = 0234AH
- bioscl = 01D6EH
- ]
-
- ;*****************************
- ;patch space at end of nofile dispatch (0CH bytes)
- .loc nfilx+5
- getflg: lhld 1 ;get bios pointer
- mvi l,034H
- ret
-
- ;note that 3.3 has less space than 3.0
- .ifg .-vtab,[
- .error "NFILX Patch Overflow"
- ]
- .remark " "
- ;*****************************
- ;patch space at end of edit dispatch (20H bytes)
- .loc xtab+5
- ;***
- ;set bios flag
- ninit: call getflg
- set 7,m ;get function keys raw
- ret ;6 bytes
- ;***
- ;reset bios flag
- dinit: call getflg
- res 7,m ;switch of function raw
- ret ;6 bytes
- ;***********
- ;new console input routine
- bconin: call bcnsta
- ora a
- jrz bconin ;loop until ready
- nxtchr = .+1
- mvi a,0 ;in line buffer
- lxi h,nxtchr
- mvi m,0 ;clear buffer
- ret ;13 bytes
- ;*********
-
- .ifg .-fptab,[
- .error "XTAB Patch Overflow"
- ]
- .remark " "
- ;*****************************
- ;new init and de-init jumps
- .loc inisub
- jmp ninit
- jmp dinit
-
- ;****************************
- ;new console status and input jumps
- .loc ucnsta
- jmp bcnsta
- jmp bconin
-
- ;*****************************
- ;main user patch area (07CH bytes)
- .loc morpat
- ;use this area to store the actual tables as we neeed
- ;a reasonable contiguous area
-
- strptr: .byte str0- . ;use self relative pointer
- .byte str1- .
- .byte str2- .
- .byte str3- .
- .byte str4- .
- .byte str5- .
- .byte str6- .
- .byte str7- .
- .byte str8- .
- .byte str9- .
- .byte strA- .
- .byte strB- .
- .byte strC- .
- .byte strD- .
- .byte strE- .
- .byte strF- .
- .byte str10- .
- .byte str11- .
- str0: .byte 'E'-'@' ! 80H
- str1: .byte 'X'-'@' ! 80H
- str2: .byte 'S'-'@' ! 80H
- str3: .byte 'D'-'@' ! 80H
- str4: .ascis '0'
- str5: .ascis '1'
- str6: .ascis '2'
- str7: .ascis '3'
- str8: .ascis '4'
- str9: .ascis '5'
- strA: .ascis '6'
- strB: .ascis '7'
- strC: .ascis '8'
- strD: .ascis '9'
- strE: .ascis '-'
- strF: .ascis ','
- str10: .byte 'M'-'@' ! 80H
- str11: .ascis '.'
-
-
- ;space for bigger strings --average 5 bytes per key
-
- .ifg .-pbgmem,[
- .error "MORPAT Patch Overflow"
- ]
- .remark " "
- ;*****************************
- ; (017H bytes)
- .loc patch2
- ;continued constat routine
- ;
- ;***********
- ;new console status routine
- bcnsta: lda nxtchr ;see if char in buff
- ora a
- rnz ;already set
- morchr = .+1
- mvi a,0 ;inline flag
- ora a ;test if we are sending string
- jz notstr
- rentry: push psw ;save exit flag
- call getstr
- rlc
- srlr a ;crunch and get hi bit in cy
- jmp cnsta1
-
- .ifg .-epat2,[
- .error "Patch2 Area Overflow"
- ]
- .remark " "
- ;******************************
- ; (02AH bytes)
- .loc patch1
- notstr: mvi a,3
- call bioscl ;direct bioscall
- ora a ;test if ready
- rz ;return if not
- xra a
- dcr a
- push psw
- mvi a,6
- call bioscl ;go get character
- ora a ;set flags
- sta nxtchr ;save it in conin
- jp notlst ;if not > 7FH
- ani 07FH ;crunch hi bit
- lxi h,strptr
- call addahl ;get offset to ptr
- mov a,m ;get offset to string
- call addahl ;add in offset
- shld cptr ;save the pointer
- jmp cnsta2
-
- .ifg .-epat1,[
- .error "Patch1 Area Overflow"
- ]
- .remark " "
- ;*****************************
- ; (01FH bytes)
- .loc ftchry
- jmpr ftchrx
- ;*****
- cptr: .word 0
- ;*****
- addahl: add l
- mov l,a
- rnc
- inr h
- ret
- ;*****
- getstr: lhld cptr
- mov a,m ;get char
- inx h
- shld cptr ;save it again
- ret
- ;*****
-
- cnsta1: sta nxtchr
- jrnc notlst ;if not end of str
- xra a
- sta morchr ;mark end of string
- notlst: pop psw
- ret
-
- .ifg .-ftchrx,[
- .error "RUBFX Patch Overflow"
- ]
- .remark " "
- ;*****************************
- ; (01EH bytes)
- .loc patch3
- ret
- ;***
- ;******
- cnsta2: pop psw
- sta morchr ;mark start of string
- jmp rentry ;use start of routine
-
-
-
-
- .ifg .-epat3,[
- .error "RECR Patch Area Overflow"
- ]
- .remark " "
- ;*****************************
- ; (01AH bytes)
- .loc CRPU
-
-
-
-
- .ifg .-ecrpu,[
- .error "CRPU Patch Area Overflow"
- ]
- .remark " "
- ;******************************
- ;patches needed to fix some of the strange wordstars
- ;that kaypro has distributed
- .ife version-33,[
- .loc 03EE3H
- call inisub
- ;
- ; this code eliminated 7/1/86 gsd
- ; .loc 03C57H
- ; call 03EA0H
- ]
-
- .end