home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / p / vlu101.lbr / PATVLU10.AZM / PATVLU10.ASM
Encoding:
Assembly Source File  |  1993-10-25  |  9.0 KB  |  269 lines

  1. ;PATVLU  version 1.0  01/11/88
  2.  
  3. ;This file patches VLU101-D.COM so that it will run on a non-ZCPR3 system.
  4. ;It was put together from Z3BASE2.LIB and SYSENV.LIB.  What it does is to
  5. ;tack the environment descriptor onto the end of VLU and patch a couple of
  6. ;addresses to keep VLU happy.  The file is currently set up for an Osborne I
  7. ;so unless that's the computer that you're using you will want to change the
  8. ;terminal stuff starting at the label 'envorg2'.  Make sure that you don't
  9. ;change the size of the code before CL string.  The code can be variable
  10. ;length after that, with a 0 terminator on each string.  You may also want
  11. ;to change things like the maximum disk and screen size.  After you've made
  12. ;the necessary changes, just ASM and MLOAD.
  13.  
  14. ;Thanks to Steve Greenberg and Ben Grey for their help.
  15. ;    enjoy
  16. ;        Bob Schultz
  17.  
  18. ; EXTERNAL PATH
  19. ;
  20. ;    The following equates define the address of the ZCPR3 External
  21. ; Path and the number of two-byte elements contained in this path (maximum).
  22. ; If there is no ZCPR3 External Path, both of these values should be set to 0.
  23. ;
  24. EXPATH    EQU    0    ; EXTERNAL PATH
  25. EXPATHS    EQU    0    ;  (PATH SIZE = EXPATHS*2 + 1)
  26.  
  27. ; WHEEL BYTE
  28. ;
  29. ;    The following equate defines the address of the ZCPR3 Wheel Byte.
  30. ; If there is no ZCPR3 Wheel Byte, this value should be set to 0.
  31. ;
  32. Z3WHL    EQU    0    ; WHEEL BYTE ADDRESS
  33.  
  34. ; RCP LOCATION
  35. ;
  36. ;    The following equates define the address of the ZCPR3 Resident
  37. ; Command Package and its size in 128-byte blocks.  If there is no
  38. ; ZCPR3 Resident Command Package, both of these values should be 0.
  39. ;
  40. RCP    EQU    00000H    ; RESIDENT COMMAND PACKAGE
  41. RCPS    EQU    00    ; 00 128-byte Blocks (0K bytes)
  42.  
  43. ; IOP LOCATION
  44. ;
  45. ;    The following equates define the address of the ZCPR3 Input/Output
  46. ; Package and its size in 128-byte blocks.  If there is no ZCPR3 Input/Output
  47. ; Package, both of these values should be 0.
  48. ;
  49. IOP    EQU    00000H    ; REDIRECTABLE I/O PACKAGE
  50. IOPS    EQU    00    ; 00 128-byte Blocks (0K bytes)
  51.  
  52. ; FCP LOCATION
  53. ;
  54. ;    The following equates define the address of the ZCPR3 Flow Command
  55. ; Package and its size in 128-byte blocks.  If there is no ZCPR3 Flow Command
  56. ; Package, both of these values should be 0.
  57. ;
  58. FCP    EQU    00000H    ; FLOW COMMAND PACKAGE
  59. FCPS    EQU    0    ; 0 128-byte Blocks (0K bytes)
  60.  
  61. ; ENV LOCATION
  62. ;
  63. ;    The following equates define the address of the ZCPR3 Environment
  64. ; Descriptor and its size in 128-byte blocks.  If there is no ZCPR3 Environment
  65. ; Descriptor, both of these values should be 0.
  66. ;
  67. ;**************************************************
  68. ;***        DON'T change this        *** 
  69. ;**************************************************
  70. Z3ENV    EQU    3e80H    ; ENVIRONMENT DESCRIPTORS
  71. Z3ENVS    EQU    2    ; SIZE OF ENVIRONMENT DESCRIPTOR IN 128-BYTE BLOCKS
  72.  
  73. ; SHELL STACK
  74. ;
  75. ;    The following equates define the address of the ZCPR3 Shell Stack,
  76. ; the number of entries permitted in the ZCPR3 Shell Stack, and the size
  77. ; of each entry in the Shell Stack in terms of bytes.  If there is no ZCPR3
  78. ; Shell Stack, all three values should be 0.
  79. ;
  80. SHSTK    EQU    0    ; ZCPR3 SHELL STACK
  81. SHSTKS    EQU    0    ; NUMBER OF SHSIZE-BYTE SHELL STACK ENTRIES
  82. SHSIZE    EQU    0    ; SIZE OF A SHELL STACK ENTRY
  83.             ;   (STACK SIZE = SHSTKS * SHSIZE)
  84.  
  85. ; ZCPR3 MESSAGES
  86. ;
  87. ;    The following equate defines the address of the ZCPR3 Message Buffer.
  88. ; This buffer is always 80 bytes long.  If there is no ZCPR3 Message Buffer,
  89. ; this address should be 0.
  90. ;
  91. Z3MSG    EQU    0    ; ZCPR3 MESSAGE BUFFER
  92.  
  93. ; EXTERNAL FCB
  94. ;
  95. ;    The following equate defines the address of the ZCPR3 External FCB.
  96. ; This buffer is always 36 bytes long.  If there is no ZCPR3 External FCB,
  97. ; this address should be 0.
  98. ;
  99. EXTFCB    EQU    0    ; ZCPR3 EXTERNAL FCB
  100.  
  101. ; NAMED DIRECTORY BUFFER
  102. ;
  103. ;    The following equates define the address and size (in terms of 18-byte
  104. ; entries) of the ZCPR3 Named Directory Buffer.  If there is no such buffer,
  105. ; both of these values should be 0.
  106. ;
  107. Z3NDIR    EQU    0    ; ZCPR3 NAMED DIRECTORY AREA
  108. Z3NDIRS    EQU    0    ; 14 18-byte Named Directory Elements permitted
  109.             ;   (NDIR SIZE = Z3NDIRS*18 + 1 for trailing 0)
  110.  
  111. ; COMMAND LINE
  112. ;
  113. ;    The following equates define the address and size (in terms of bytes)
  114. ; of the ZCPR3 Command Line Buffer (formerly called the Multiple Command Line
  115. ; Buffer under ZCPR2).  If there is no such buffer, both of these values should
  116. ; be 0.
  117. ;
  118. Z3CL    EQU    0    ; ZCPR3 COMMAND LINE BUFFER
  119. Z3CLS    EQU    0    ; SIZE OF COMMAND LINE BUFFER
  120.  
  121. ; EXTERNAL STACK
  122. ;
  123. ;    The following equate defines the address of the ZCPR3 External Stack.
  124. ; This stack is always 48 bytes in size.  If there is no such stack, this
  125. ; value should be 0.
  126. ;
  127. EXTSTK    EQU    0    ; ZCPR3 EXTERNAL STACK
  128.  
  129.  
  130.  
  131.     org    109h
  132.     dw    z3env    ;patch envptr
  133.  
  134.     org    127ch    ;patch free memory pointer
  135.     dw    z3env+z3envs*80h
  136. ;
  137. ;  Environment Descriptor
  138. ;    If inline, there is a leading JMP just before this
  139. ;
  140.     org    z3env
  141.  
  142.     ds    3
  143. envorg1:
  144.     db    'Z3ENV'        ; Environment ID
  145.     db    2        ; class 2 environment (internal)
  146.  
  147.     dw    expath        ; external path address
  148.     db    expaths        ; number of 2-byte elements in path
  149.  
  150.     dw    rcp        ; RCP address
  151.     db    rcps        ; number of 128-byte blocks in RCP
  152.  
  153.     dw    iop        ; IOP address
  154.     db    iops        ; number of 128-byte blocks in IOP
  155.  
  156.     dw    fcp        ; FCP address
  157.     db    fcps        ; number of 128-byte blocks in FCP
  158.  
  159.     dw    z3ndir        ; NDR address
  160.     db    z3ndirs        ; number of 18-byte entries in NDR
  161.  
  162.     dw    z3cl        ; ZCPR3 Command Line
  163.     db    z3cls        ; number of bytes in Command Line
  164.  
  165.     dw    z3env        ; ZCPR3 Environment Descriptor
  166.     db    z3envs        ; number of 128-byte blocks in Descriptor
  167.  
  168.     dw    shstk        ; Shell Stack address
  169.     db    shstks        ; number of shsize-byte entires in Shell Stack
  170.     db    shsize        ; size of a Shell Stack entry
  171.  
  172.     dw    z3msg        ; ZCPR3 Message buffer
  173.  
  174.     dw    extfcb        ; ZCPR3 External FCB
  175.  
  176.     dw    extstk        ; ZCPR3 External Stack
  177.  
  178.     db    0        ; quiet flag (1=quiet, 0=not quiet)
  179.  
  180.     dw    z3whl        ; address of Wheel Byte
  181.  
  182.     db    4        ; Processor Speed in MHz
  183.  
  184.     db    'B'-'@'        ; maximum disk
  185.     db    31        ; maximum user
  186.  
  187.     db    1        ; 1=OK to accept DU, 0=not OK
  188.  
  189.     db    0        ; CRT selection (0=CRT 0, 1=CRT 1)
  190.     db    0        ; Printer selection (n=Printer n)
  191.  
  192.     db    80        ; width of CRT 0
  193.     db    24        ; number of lines on CRT 0
  194.     db    24        ; number of lines of text on CRT 0
  195.  
  196.     db    128        ; width of CRT 1
  197.     db    24        ; number of lines on CRT 1
  198.     db    24        ; number of lines of text on CRT 1
  199.  
  200.     db    80        ; width of Printer 0
  201.     db    66        ; number of lines on Printer 0
  202.     db    58        ; number of lines of text on Printer 0
  203.     db    1        ; form feed flag (0=can't formfeed, 1=can)
  204.  
  205.     db    102        ; width of Printer 1
  206.     db    66        ; number of lines on Printer 1
  207.     db    58        ; number of lines of text on Printer 1
  208.     db    1        ; form feed flag (0=can't formfeed, 1=can)
  209.  
  210.     db    80        ; width of Printer 2
  211.     db    66        ; number of lines on Printer 2
  212.     db    58        ; number of lines of text on Printer 2
  213.     db    0        ; form feed flag (0=can't formfeed, 1=can)
  214.  
  215.     db    102        ; width of Printer 3
  216.     db    66        ; number of lines on Printer 3
  217.     db    58        ; number of lines of text on Printer 3
  218.     db    0        ; form feed flag (0=can't formfeed, 1=can)
  219.  
  220.     db    'SH      '    ; shell variable filename
  221.     db    'VAR'        ; shell variable filetype
  222.  
  223.     db    '        '    ; filename 1
  224.     db    '   '        ; filetype 1
  225.  
  226.     db    '        '    ; filename 2
  227.     db    '   '        ; filetype 2
  228.  
  229.     db    '        '    ; filename 3
  230.     db    '   '        ; filetype 3
  231.  
  232.     db    '        '    ; filename 4
  233.     db    '   '        ; filetype 4
  234.  
  235.     ds    80H-($-envorg1+3)    ; make exactly 80H bytes long
  236.                     ; (+3 compensates for leading JMP)
  237. ;
  238. ; Terminal Capabilities Data
  239. ;
  240. envorg2:
  241.     DB    'Osborne I       '    ;Name of Terminal
  242.     DB    'K'-'@'            ;Cursor UP
  243.     DB    'J'-'@'            ;Cursor DOWN
  244.     DB    'L'-'@'            ;Cursor RIGHT
  245.     DB    'H'-'@'            ;Cursor LEFT
  246.     DB    00            ;CL Delay
  247.     DB    00            ;CM Delay
  248.     DB    00            ;CE Delay
  249. ;**************************************************************************
  250. ;***  DON'T change the size of the code before this point        ***
  251. ;***  All string are variable length and should terminate with a 0    ***
  252. ;***  If you have any trouble get some TCAP documentation and read it!    ***
  253. ;**************************************************************************
  254.     DB    1ah,0            ;CL String   clear screen
  255. ;You MUST have cursor addressing.
  256.     DB    1bh,'=%+ %+ ',0        ;CM String   cursor addressing
  257.     DB    1bh,'T',0        ;CE String   clear to end of line
  258.     DB    1bh,')',0        ;SO String   into highlighting
  259.     DB    1bh,'(',0        ;SE String   exit highlighting
  260.     DB    0            ;TI String   terminal initialization
  261.     DB    0            ;TE String   terminal deinitialization
  262.  
  263.     ds    80H-($-envorg2)        ; make exactly 80H bytes long
  264.  
  265. ;
  266. ;  End of Environment Descriptor
  267. ;
  268.     end
  269.