home *** CD-ROM | disk | FTP | other *** search
- ;PATVLU version 1.0 01/11/88
-
- ;This file patches VLU101-D.COM so that it will run on a non-ZCPR3 system.
- ;It was put together from Z3BASE2.LIB and SYSENV.LIB. What it does is to
- ;tack the environment descriptor onto the end of VLU and patch a couple of
- ;addresses to keep VLU happy. The file is currently set up for an Osborne I
- ;so unless that's the computer that you're using you will want to change the
- ;terminal stuff starting at the label 'envorg2'. Make sure that you don't
- ;change the size of the code before CL string. The code can be variable
- ;length after that, with a 0 terminator on each string. You may also want
- ;to change things like the maximum disk and screen size. After you've made
- ;the necessary changes, just ASM and MLOAD.
-
- ;Thanks to Steve Greenberg and Ben Grey for their help.
- ; enjoy
- ; Bob Schultz
-
- ; EXTERNAL PATH
- ;
- ; The following equates define the address of the ZCPR3 External
- ; Path and the number of two-byte elements contained in this path (maximum).
- ; If there is no ZCPR3 External Path, both of these values should be set to 0.
- ;
- EXPATH EQU 0 ; EXTERNAL PATH
- EXPATHS EQU 0 ; (PATH SIZE = EXPATHS*2 + 1)
-
- ; WHEEL BYTE
- ;
- ; The following equate defines the address of the ZCPR3 Wheel Byte.
- ; If there is no ZCPR3 Wheel Byte, this value should be set to 0.
- ;
- Z3WHL EQU 0 ; WHEEL BYTE ADDRESS
-
- ; RCP LOCATION
- ;
- ; The following equates define the address of the ZCPR3 Resident
- ; Command Package and its size in 128-byte blocks. If there is no
- ; ZCPR3 Resident Command Package, both of these values should be 0.
- ;
- RCP EQU 00000H ; RESIDENT COMMAND PACKAGE
- RCPS EQU 00 ; 00 128-byte Blocks (0K bytes)
-
- ; IOP LOCATION
- ;
- ; The following equates define the address of the ZCPR3 Input/Output
- ; Package and its size in 128-byte blocks. If there is no ZCPR3 Input/Output
- ; Package, both of these values should be 0.
- ;
- IOP EQU 00000H ; REDIRECTABLE I/O PACKAGE
- IOPS EQU 00 ; 00 128-byte Blocks (0K bytes)
-
- ; FCP LOCATION
- ;
- ; The following equates define the address of the ZCPR3 Flow Command
- ; Package and its size in 128-byte blocks. If there is no ZCPR3 Flow Command
- ; Package, both of these values should be 0.
- ;
- FCP EQU 00000H ; FLOW COMMAND PACKAGE
- FCPS EQU 0 ; 0 128-byte Blocks (0K bytes)
-
- ; ENV LOCATION
- ;
- ; The following equates define the address of the ZCPR3 Environment
- ; Descriptor and its size in 128-byte blocks. If there is no ZCPR3 Environment
- ; Descriptor, both of these values should be 0.
- ;
- ;**************************************************
- ;*** DON'T change this ***
- ;**************************************************
- Z3ENV EQU 3e80H ; ENVIRONMENT DESCRIPTORS
- Z3ENVS EQU 2 ; SIZE OF ENVIRONMENT DESCRIPTOR IN 128-BYTE BLOCKS
-
- ; SHELL STACK
- ;
- ; The following equates define the address of the ZCPR3 Shell Stack,
- ; the number of entries permitted in the ZCPR3 Shell Stack, and the size
- ; of each entry in the Shell Stack in terms of bytes. If there is no ZCPR3
- ; Shell Stack, all three values should be 0.
- ;
- SHSTK EQU 0 ; ZCPR3 SHELL STACK
- SHSTKS EQU 0 ; NUMBER OF SHSIZE-BYTE SHELL STACK ENTRIES
- SHSIZE EQU 0 ; SIZE OF A SHELL STACK ENTRY
- ; (STACK SIZE = SHSTKS * SHSIZE)
-
- ; ZCPR3 MESSAGES
- ;
- ; The following equate defines the address of the ZCPR3 Message Buffer.
- ; This buffer is always 80 bytes long. If there is no ZCPR3 Message Buffer,
- ; this address should be 0.
- ;
- Z3MSG EQU 0 ; ZCPR3 MESSAGE BUFFER
-
- ; EXTERNAL FCB
- ;
- ; The following equate defines the address of the ZCPR3 External FCB.
- ; This buffer is always 36 bytes long. If there is no ZCPR3 External FCB,
- ; this address should be 0.
- ;
- EXTFCB EQU 0 ; ZCPR3 EXTERNAL FCB
-
- ; NAMED DIRECTORY BUFFER
- ;
- ; The following equates define the address and size (in terms of 18-byte
- ; entries) of the ZCPR3 Named Directory Buffer. If there is no such buffer,
- ; both of these values should be 0.
- ;
- Z3NDIR EQU 0 ; ZCPR3 NAMED DIRECTORY AREA
- Z3NDIRS EQU 0 ; 14 18-byte Named Directory Elements permitted
- ; (NDIR SIZE = Z3NDIRS*18 + 1 for trailing 0)
-
- ; COMMAND LINE
- ;
- ; The following equates define the address and size (in terms of bytes)
- ; of the ZCPR3 Command Line Buffer (formerly called the Multiple Command Line
- ; Buffer under ZCPR2). If there is no such buffer, both of these values should
- ; be 0.
- ;
- Z3CL EQU 0 ; ZCPR3 COMMAND LINE BUFFER
- Z3CLS EQU 0 ; SIZE OF COMMAND LINE BUFFER
-
- ; EXTERNAL STACK
- ;
- ; The following equate defines the address of the ZCPR3 External Stack.
- ; This stack is always 48 bytes in size. If there is no such stack, this
- ; value should be 0.
- ;
- EXTSTK EQU 0 ; ZCPR3 EXTERNAL STACK
-
-
-
- org 109h
- dw z3env ;patch envptr
-
- org 127ch ;patch free memory pointer
- dw z3env+z3envs*80h
- ;
- ; Environment Descriptor
- ; If inline, there is a leading JMP just before this
- ;
- org z3env
-
- ds 3
- envorg1:
- db 'Z3ENV' ; Environment ID
- db 2 ; class 2 environment (internal)
-
- dw expath ; external path address
- db expaths ; number of 2-byte elements in path
-
- dw rcp ; RCP address
- db rcps ; number of 128-byte blocks in RCP
-
- dw iop ; IOP address
- db iops ; number of 128-byte blocks in IOP
-
- dw fcp ; FCP address
- db fcps ; number of 128-byte blocks in FCP
-
- dw z3ndir ; NDR address
- db z3ndirs ; number of 18-byte entries in NDR
-
- dw z3cl ; ZCPR3 Command Line
- db z3cls ; number of bytes in Command Line
-
- dw z3env ; ZCPR3 Environment Descriptor
- db z3envs ; number of 128-byte blocks in Descriptor
-
- dw shstk ; Shell Stack address
- db shstks ; number of shsize-byte entires in Shell Stack
- db shsize ; size of a Shell Stack entry
-
- dw z3msg ; ZCPR3 Message buffer
-
- dw extfcb ; ZCPR3 External FCB
-
- dw extstk ; ZCPR3 External Stack
-
- db 0 ; quiet flag (1=quiet, 0=not quiet)
-
- dw z3whl ; address of Wheel Byte
-
- db 4 ; Processor Speed in MHz
-
- db 'B'-'@' ; maximum disk
- db 31 ; maximum user
-
- db 1 ; 1=OK to accept DU, 0=not OK
-
- db 0 ; CRT selection (0=CRT 0, 1=CRT 1)
- db 0 ; Printer selection (n=Printer n)
-
- db 80 ; width of CRT 0
- db 24 ; number of lines on CRT 0
- db 24 ; number of lines of text on CRT 0
-
- db 128 ; width of CRT 1
- db 24 ; number of lines on CRT 1
- db 24 ; number of lines of text on CRT 1
-
- db 80 ; width of Printer 0
- db 66 ; number of lines on Printer 0
- db 58 ; number of lines of text on Printer 0
- db 1 ; form feed flag (0=can't formfeed, 1=can)
-
- db 102 ; width of Printer 1
- db 66 ; number of lines on Printer 1
- db 58 ; number of lines of text on Printer 1
- db 1 ; form feed flag (0=can't formfeed, 1=can)
-
- db 80 ; width of Printer 2
- db 66 ; number of lines on Printer 2
- db 58 ; number of lines of text on Printer 2
- db 0 ; form feed flag (0=can't formfeed, 1=can)
-
- db 102 ; width of Printer 3
- db 66 ; number of lines on Printer 3
- db 58 ; number of lines of text on Printer 3
- db 0 ; form feed flag (0=can't formfeed, 1=can)
-
- db 'SH ' ; shell variable filename
- db 'VAR' ; shell variable filetype
-
- db ' ' ; filename 1
- db ' ' ; filetype 1
-
- db ' ' ; filename 2
- db ' ' ; filetype 2
-
- db ' ' ; filename 3
- db ' ' ; filetype 3
-
- db ' ' ; filename 4
- db ' ' ; filetype 4
-
- ds 80H-($-envorg1+3) ; make exactly 80H bytes long
- ; (+3 compensates for leading JMP)
- ;
- ; Terminal Capabilities Data
- ;
- envorg2:
- DB 'Osborne I ' ;Name of Terminal
- DB 'K'-'@' ;Cursor UP
- DB 'J'-'@' ;Cursor DOWN
- DB 'L'-'@' ;Cursor RIGHT
- DB 'H'-'@' ;Cursor LEFT
- DB 00 ;CL Delay
- DB 00 ;CM Delay
- DB 00 ;CE Delay
- ;**************************************************************************
- ;*** DON'T change the size of the code before this point ***
- ;*** All string are variable length and should terminate with a 0 ***
- ;*** If you have any trouble get some TCAP documentation and read it! ***
- ;**************************************************************************
- DB 1ah,0 ;CL String clear screen
- ;You MUST have cursor addressing.
- DB 1bh,'=%+ %+ ',0 ;CM String cursor addressing
- DB 1bh,'T',0 ;CE String clear to end of line
- DB 1bh,')',0 ;SO String into highlighting
- DB 1bh,'(',0 ;SE String exit highlighting
- DB 0 ;TI String terminal initialization
- DB 0 ;TE String terminal deinitialization
-
- ds 80H-($-envorg2) ; make exactly 80H bytes long
-
- ;
- ; End of Environment Descriptor
- ;
- end
-