home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / lan / pcwatch.upd < prev    next >
Text File  |  1994-03-07  |  4KB  |  178 lines

  1. To: booth
  2. Subject: PCWATCH Patch
  3. Date: Thu, 09 Oct 86 08:29:41 -0500
  4. From: jac@mimsy.umd.edu
  5.  
  6. Here is the patch for PCWATCH in it's final form.
  7. Please feel free to post it to TRN-digest if you see fit.
  8.  
  9. ** Delete this line and those preceeding **
  10. n pcwatch.com
  11. l
  12. a 1e49
  13. ;
  14. ; This debug script will patch the IBM PDS program PCWATCH
  15. ; to properly format Token Ring CCBs when processing a 5C interrupt.
  16. ; Previously, PCWATCH would only handle NETBIOS NCBs.
  17. ;
  18. ; The output will be a new version of PCWATCH, named PCWCCB.
  19. ;
  20. ; To run the script enter the following line to DOS in the directory
  21. ; where PCWATCH.COM is located:        DEBUG <UPD.SCR
  22. ;
  23. ; This has been tested with PCWATCH version 1.00, dated 07-01-85,
  24. ; 34,892 bytes long.
  25. ;
  26. ; Patch version 1.00, 24 Sept 86, by Joseph A. Cimmino, Jr.
  27. ; University of Maryland, (301) 454-2946, ARPA: jac@maryland.
  28. ;
  29. ; Refer to the IBM Token-Ring Network PC Adapter Technical Reference,
  30. ; 6165876, for information on CCBs.
  31. ;
  32. ; A CCB is displayed in the following format:
  33. ;
  34. ; Offset       Field_Name              Displayed as
  35. ;
  36. ;  0           CCB_Adapter             Byte
  37. ;  1           CCB_Command             Byte
  38. ;  2           CCB_RetCode             Byte
  39. ;  3           CCB_Work                Byte
  40. ;  4           CCB_Pointer             Address (Word:Word)
  41. ;  8           CCB_Appendage           Address (Word:Word)
  42. ; 0Ch          CCB_ParmTab             Address (Word:Word)
  43. ;
  44. ; Note:  ParmTab is often a pointer to a parameter table.  Sometimes,
  45. ;       however, it contains data values - so be careful of byte ordering!
  46. ;
  47. jmp 224                        ; go to the patch area
  48. nop                    ; be clean
  49. nop
  50. nop
  51.  
  52. a 224
  53. mov    di,cs           ; establish addressability to PCWatch's data
  54. mov    es,di
  55. cs:
  56. mov    ds,[bx+1e]      ; get user's ES
  57. cs:
  58. mov    si,[bx+14]      ; get user's BX
  59. mov    al,[si]         ; ES:BX points to NCB/CCB
  60. cmp    al,04           ; is this a CCB or NCB?
  61. mov    ds,di           ; leave with addressability
  62. jb     23b             ; CCB, continue with our code.
  63. jmp    1e4f            ; NCB, return to PCW's routine.
  64. ;
  65. ; Copy the "    CCB [" header to the output buffer
  66. ;
  67. mov    si,2E0          ; our header
  68. mov    di,1930         ; the output buffer
  69. mov    cx,8            ; length
  70. cld
  71. repz
  72. movsb
  73. ;
  74. ; Clear output buffer
  75. ;
  76. push   di              ; save start address
  77. mov    cx,48           ; (80 bytes - 8 byte header)
  78. mov    al,20           ; to blank
  79. repz
  80. stosb
  81. pop    di              ; restore start address
  82. ;
  83. ; Now set our DS:SI to user's ES:BX (CCB)
  84. ;
  85. cs:
  86. mov    ds,[bx+1e]
  87. cs:
  88. mov    si,[bx+14]
  89. ;
  90. ; format the adapter number (CCB + 0)
  91. ;
  92. mov    al,[si]
  93. call   136E            ; HEX_BYTE
  94. inc    di              ; add a blank
  95. ;
  96. ; format the command (CCB + 1)
  97. ;
  98. mov    al,[si+1]
  99. call   136E            ; HEX_BYTE
  100. inc    di
  101. ;
  102. ; format the return code (CCB + 2)
  103. ;
  104. mov    al,[si+2]
  105. call   136E            ; HEX_BYTE
  106. inc    di
  107. ;
  108. ; format the work area (CCB + 3)
  109. ;
  110. mov    al,[si+3]
  111. call   136E            ; HEX_BYTE
  112. inc    di
  113. ;
  114. ; format the queue pointer (CCB + 4)
  115. ;
  116. mov    dx,[si+6]
  117. call   1340            ; HEX_WORD
  118. mov    al,3A           ; ':'
  119. stosb
  120. mov    dx,[si+4]
  121. call   1340            ; HEX_WORD
  122. inc    di
  123. ;
  124. ; format the command complete appendage pointer (CCB + 8)
  125. ;
  126. mov    dx,[si+0A]
  127. call   1340            ; HEX_WORD
  128. mov    al,3A           ; ':'
  129. stosb
  130. mov    dx,[si+8]
  131. call   1340            ; HEX_WORD
  132. inc    di
  133. ;
  134. ; format the Parameters or Parm table pointer (CCB + 0C)
  135. ;
  136. mov    dx,[si+0E]
  137. call   1340            ; HEX_WORD
  138. mov    al,3A           ; ':'
  139. stosb
  140. mov    dx,[si+0C]
  141. call   1340            ; HEX_WORD
  142. inc    di
  143. ;
  144. ; finish up the line
  145. ;
  146. mov    al,5D           ; ']'
  147. stosb
  148. ;
  149. ; restore regs
  150. ;
  151. pop    di
  152. pop    si
  153. pop    es
  154. pop    ds
  155. ;
  156. ; display the line (1930) with attributes (103E) for 50h chars.
  157. ;
  158. lea    si,[1930]
  159. mov    cx,50
  160. lea    bx,[103E]
  161. call   119D
  162. ;
  163. ; clear carry and return
  164. ;
  165. clc
  166. ret
  167.  
  168. a 2e0
  169. ;
  170. ; output line header
  171. ;
  172. db "   CCB ["
  173.  
  174. n pcwccb.com
  175. w
  176. q
  177.  
  178.