home *** CD-ROM | disk | FTP | other *** search
- ; Program: WSSHLOFF
- ; Author: Jay Sage
- ; Date: March 26, 1988
-
- ; This code is a configuration overlay to correct a problem in the shell
- ; handling code in WordStar Release 4.
- ;
- ; Problem: Because WordStar runs as a ZCPR3 shell, it is impossible to use
- ; WS in a multiple command line with commands intended to execute after WS is
- ; finished. One can disable this by patching the ZCPR3 environment to show
- ; zero entries in the shell stack while WS is running. This effectively
- ; disables WS4's shell capability. Unfortunately, it means that the extended
- ; features of the 'R' command under ZCPR3 are also lost.
-
- ;---- Addresses
-
- initsub equ 03bbh
- exitsub equ 03beh
- morpat equ 045bh
-
- ;---- Patch code
-
- org initsub ; Initialization subroutine
-
- init: jp initpatch
-
- ;----
-
- org exitsub ; Un-initialization subroutine
-
- exit: jp exitpatch
-
- ;----
-
- org morpat ; General patch area
-
- initpatch: ; Initialization patch
- call getshls ; Get pointer to shell stack number
- ld a,(hl) ; Get number
- ld (shstks),a ; Save it for later restoration
- ld (hl),0 ; Set it to zero to disable shells
- ret
-
- exitpatch: ; Termination patch
- call getshls ; Get pointer to shell stack number
- shstks equ $+1 ; Pointer for code modification
- ld (hl),0 ; Value supplied by INITPATCH code
- ret
-
- getshls:
- ld hl,(109h) ; Get ENV address
- ld de,20h ; Offset to number of shell entries
- add hl,de ; HL points to number of shell entries
- ret
-
- end
-