Advertisement
Guest User

SR disassembly WIZDOS.COM

a guest
Feb 10th, 2024
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.21 KB | None | 0 0
  1. wizdos.lst Sourcer v8.01 10-Feb-2024 4:50 pm Page 1
  2.  
  3.  
  4. PAGE 59,132
  5.  
  6. ;??????????????????????????????????????????????????????????????????????????
  7. ;?? ??
  8. ;?? WIZDOS ??
  9. ;?? ??
  10. ;?? Created: 10-Feb-24 ??
  11. ;?? Passes: 5 Analysis Options on: QRS ??
  12. ;?? ??
  13. ;??????????????????????????????????????????????????????????????????????????
  14.  
  15. .err Target Assembler set to NONE, re-assembly not recommended
  16.  
  17.  
  18. ; The following equates show data references outside the range of the program.
  19.  
  20. = 0058 data_1e equ 58h ; (0000:0058=11E0h)
  21. = 005A data_2e equ 5Ah ; (0000:005A=0F000h)
  22. = 0060 data_3e equ 60h ; (0000:0060=12C0h)
  23. = 0062 data_4e equ 62h ; (0000:0062=0F000h)
  24. = 0017 keybd_flags_1 equ 17h ; (0040:0017=0)
  25. = 005D data_5e equ 5Dh ; (2913:005D=0)
  26. = 006D data_6e equ 6Dh ; (2913:006D=0)
  27. = 0080 PSP_cmd_size equ 80h ; (2913:0080=0)
  28.  
  29. seg_a segment byte public
  30. assume cs:seg_a, ds:seg_a
  31.  
  32.  
  33. org 100h
  34.  
  35. wizdos proc far
  36.  
  37. 2913:0100 start:
  38. 2913:0100 B8 0500 mov ax,500h
  39. 2913:0103 8B E0 mov sp,ax
  40. 2913:0105 2E: A0 0080 mov al,cs:PSP_cmd_size ; (2913:0080=0)
  41. 2913:0109 3C 02 cmp al,2
  42. 2913:010B 72 29 jb loc_1 ; Jump if below
  43. 2913:010D 8C C8 mov ax,cs
  44. 2913:010F 8E D8 mov ds,ax
  45. 2913:0111 8E C0 mov es,ax
  46. 2913:0113 ?BE 005D mov si,data_5e ; (2913:005D=0)
  47. 2913:0116 ?BF 0273 mov di,offset data_11 ; (2913:0273='WIZ1 .DSK')
  48. 2913:0119 FC cld ; Clear direction
  49. 2913:011A B9 0008 mov cx,8
  50. 2913:011D F3/ A4 rep movsb ; Rep when cx >0 Mov [si] to es:[di]
  51. 2913:011F 47 inc di
  52. 2913:0120 B9 0003 mov cx,3
  53. 2913:0123 F3/ A4 rep movsb ; Rep when cx >0 Mov [si] to es:[di]
  54. 2913:0125 ?BE 006D mov si,data_6e ; (2913:006D=0)
  55. 2913:0128 ?BF 0295 mov di,offset data_12 ; (2913:0295=' . ')
  56. 2913:012B B9 0008 mov cx,8
  57. 2913:012E F3/ A4 rep movsb ; Rep when cx >0 Mov [si] to es:[di]
  58. 2913:0130 47 inc di
  59. 2913:0131 B9 0003 mov cx,3
  60.  
  61. wizdos.lst Sourcer v8.01 10-Feb-2024 4:50 pm Page 2
  62.  
  63. 2913:0134 F3/ A4 rep movsb ; Rep when cx >0 Mov [si] to es:[di]
  64. 2913:0136 loc_1: ; xref 2913:010B
  65. 2913:0136 2E: A0 0273 mov al,byte ptr cs:data_11 ; (2913:0273='WIZ1 .DSK')
  66. 2913:013A 3C 3F cmp al,3Fh ; '?'
  67. 2913:013C 74 07 je loc_2 ; Jump if equal
  68. 2913:013E 3C 2D cmp al,2Dh ; '-'
  69. 2913:0140 74 03 je loc_2 ; Jump if equal
  70. 2913:0142 EB 0E jmp short loc_3 ; (0152)
  71. 2913:0144 90 db 90h
  72. 2913:0145 loc_2: ; xref 2913:013C, 0140
  73. 2913:0145 B4 09 mov ah,9
  74. 2913:0147 ?BA 0502 mov dx,offset data_24 ; (2913:0502='Wizardry OS Emul')
  75. 2913:014A CD 21 int 21h ; DOS Services ah=function 09h
  76. ; display char string at ds:dx
  77. 2913:014C B4 4C mov ah,4Ch ; 'L'
  78. 2913:014E B0 00 mov al,0
  79. 2913:0150 CD 21 int 21h ; DOS Services ah=function 4Ch
  80. ; terminate with al=return code
  81. 2913:0152 loc_3: ; xref 2913:0142
  82. 2913:0152 B4 0F mov ah,0Fh
  83. 2913:0154 CD 10 int 10h ; Video display ah=functn 0Fh
  84. ; get state, al=mode, bh=page
  85. ; ah=columns on screen
  86. 2913:0156 2E: A2 02C7 mov cs:data_21,al ; (2913:02C7=0)
  87. 2913:015A 8C C8 mov ax,cs
  88. 2913:015C 8E C0 mov es,ax
  89. 2913:015E B4 4A mov ah,4Ah ; 'J'
  90. 2913:0160 BB FFFF mov bx,0FFFFh
  91. 2913:0163 CD 21 int 21h ; DOS Services ah=function 4Ah
  92. ; change memory allocation
  93. ; bx=bytes/16, es=mem segment
  94. 2913:0165 81 FB 4100 cmp bx,4100h
  95. 2913:0169 73 0D jae loc_4 ; Jump if above or =
  96. 2913:016B B4 09 mov ah,9
  97. 2913:016D ?BA 0235 mov dx,offset data_7 ; (2913:0235='Not enough memor')
  98. 2913:0170 CD 21 int 21h ; DOS Services ah=function 09h
  99. ; display char string at ds:dx
  100. 2913:0172 B4 4C mov ah,4Ch ; 'L'
  101. 2913:0174 B0 08 mov al,8
  102. 2913:0176 CD 21 int 21h ; DOS Services ah=function 4Ch
  103. ; terminate with al=return code
  104. 2913:0178 loc_4: ; xref 2913:0169
  105. 2913:0178 8C C8 mov ax,cs
  106. 2913:017A 05 0100 add ax,100h
  107. 2913:017D 2E: A3 02BD mov cs:data_16,ax ; (2913:02BD=0)
  108. 2913:0181 B4 3D mov ah,3Dh ; '='
  109. 2913:0183 B0 02 mov al,2
  110. 2913:0185 ?BA 0273 mov dx,offset data_11 ; (2913:0273='WIZ1 .DSK')
  111. 2913:0188 CD 21 int 21h ; DOS Services ah=function 3Dh
  112. ; open file, al=mode,name@ds:dx
  113. 2913:018A 73 14 jnc loc_5 ; Jump if carry=0
  114. 2913:018C B4 09 mov ah,9
  115. 2913:018E ?BA 0249 mov dx,offset data_8 ; (2913:0249='Cannot open [')
  116. 2913:0191 CD 21 int 21h ; DOS Services ah=function 09h
  117. ; display char string at ds:dx
  118. 2913:0193 B4 09 mov ah,9
  119. 2913:0195 ?BA 0273 mov dx,offset data_11 ; (2913:0273='WIZ1 .DSK')
  120.  
  121. wizdos.lst Sourcer v8.01 10-Feb-2024 4:50 pm Page 3
  122.  
  123. 2913:0198 CD 21 int 21h ; DOS Services ah=function 09h
  124. ; display char string at ds:dx
  125. 2913:019A B4 4C mov ah,4Ch ; 'L'
  126. 2913:019C B0 02 mov al,2
  127. 2913:019E CD 21 int 21h ; DOS Services ah=function 4Ch
  128. ; terminate with al=return code
  129. 2913:01A0 loc_5: ; xref 2913:018A
  130. 2913:01A0 2E: A3 02B7 mov cs:data_13,ax ; (2913:02B7=0)
  131. 2913:01A4 2E: A3 02BB mov cs:data_15,ax ; (2913:02BB=0)
  132. 2913:01A8 2E: A3 02B9 mov cs:data_14,ax ; (2913:02B9=0)
  133. 2913:01AC 2E: A0 0295 mov al,byte ptr cs:data_12 ; (2913:0295=' . ')
  134. 2913:01B0 3C 20 cmp al,20h ; ' '
  135. 2913:01B2 74 23 je loc_7 ; Jump if equal
  136. 2913:01B4 B4 3D mov ah,3Dh ; '='
  137. 2913:01B6 B0 02 mov al,2
  138. 2913:01B8 ?BA 0295 mov dx,offset data_12 ; (2913:0295=' . ')
  139. 2913:01BB CD 21 int 21h ; DOS Services ah=function 3Dh
  140. ; open file, al=mode,name@ds:dx
  141. 2913:01BD 73 14 jnc loc_6 ; Jump if carry=0
  142. 2913:01BF B4 09 mov ah,9
  143. 2913:01C1 ?BA 0249 mov dx,offset data_8 ; (2913:0249='Cannot open [')
  144. 2913:01C4 CD 21 int 21h ; DOS Services ah=function 09h
  145. ; display char string at ds:dx
  146. 2913:01C6 B4 09 mov ah,9
  147. 2913:01C8 ?BA 0295 mov dx,offset data_12 ; (2913:0295=' . ')
  148. 2913:01CB CD 21 int 21h ; DOS Services ah=function 09h
  149. ; display char string at ds:dx
  150. 2913:01CD B4 4C mov ah,4Ch ; 'L'
  151. 2913:01CF B0 02 mov al,2
  152. 2913:01D1 CD 21 int 21h ; DOS Services ah=function 4Ch
  153. ; terminate with al=return code
  154. 2913:01D3 loc_6: ; xref 2913:01BD
  155. 2913:01D3 2E: A3 02B9 mov cs:data_14,ax ; (2913:02B9=0)
  156. 2913:01D7 loc_7: ; xref 2913:01B2
  157. 2913:01D7 33 C0 xor ax,ax ; Zero register
  158. 2913:01D9 8E D8 mov ds,ax
  159. 2913:01DB B8 02C8 mov ax,2C8h
  160. 2913:01DE 8C CB mov bx,cs
  161. 2913:01E0 87 06 0060 xchg ds:data_3e,ax ; (0000:0060=12C0h)
  162. 2913:01E4 87 1E 0062 xchg ds:data_4e,bx ; (0000:0062=0F000h)
  163. 2913:01E8 2E: A3 02BF mov cs:data_17,ax ; (2913:02BF=0)
  164. 2913:01EC 2E: 89 1E 02C1 mov cs:data_18,bx ; (2913:02C1=0)
  165. 2913:01F1 B8 039D mov ax,39Dh
  166. 2913:01F4 8C CB mov bx,cs
  167. 2913:01F6 87 06 0058 xchg ds:data_1e,ax ; (0000:0058=11E0h)
  168. 2913:01FA 87 1E 005A xchg ds:data_2e,bx ; (0000:005A=0F000h)
  169. 2913:01FE 2E: A3 02C3 mov cs:data_19,ax ; (2913:02C3=0)
  170. 2913:0202 2E: 89 1E 02C5 mov word ptr cs:data_19+2,b; (2913:02C5=0)
  171. 2913:0207 2E: A1 02BD mov ax,cs:data_16 ; (2913:02BD=0)
  172. 2913:020B 8E C0 mov es,ax
  173. 2913:020D BB 7C00 mov bx,7C00h
  174. 2913:0210 B8 0201 mov ax,201h
  175. 2913:0213 B9 0001 mov cx,1
  176. 2913:0216 BA 0000 mov dx,0
  177. 2913:0219 CD 18 int 18h ; ROM basic
  178. 2913:021B 73 0E jnc loc_8 ; Jump if carry=0
  179. 2913:021D 8C C8 mov ax,cs
  180.  
  181. wizdos.lst Sourcer v8.01 10-Feb-2024 4:50 pm Page 4
  182.  
  183. 2913:021F 8E D8 mov ds,ax
  184. 2913:0221 B4 09 mov ah,9
  185. 2913:0223 ?BA 0257 mov dx,offset data_9 ; (2913:0257='Cannot load IPL')
  186. 2913:0226 CD 21 int 21h ; DOS Services ah=function 09h
  187. ; display char string at ds:dx
  188. 2913:0228 E9 01DE jmp loc_16 ; (0409)
  189. 2913:022B loc_8: ; xref 2913:021B
  190. 2913:022B 2E: A1 02BD mov ax,cs:data_16 ; (2913:02BD=0)
  191. 2913:022F 50 push ax
  192. 2913:0230 B8 7C00 mov ax,7C00h
  193. 2913:0233 50 push ax
  194. 2913:0234 CB retf ; Return far
  195. 2913:0235 4E 6F 74 20 65 6E data_7 db 'Not enough memory', 0Dh, 0Ah, '$' ; xref 2913:016D
  196. 2913:023B 6F 75 67 68 20 6D
  197. 2913:0241 65 6D 6F 72 79 0D
  198. 2913:0247 0A 24
  199. 2913:0249 43 61 6E 6E 6F 74 data_8 db 'Cannot open [$' ; xref 2913:018E, 01C1
  200. 2913:024F 20 6F 70 65 6E 20
  201. 2913:0255 5B 24
  202. 2913:0257 43 61 6E 6E 6F 74 data_9 db 'Cannot load IPL', 0Dh, 0Ah, '$' ; xref 2913:0223
  203. 2913:025D 20 6C 6F 61 64 20
  204. 2913:0263 49 50 4C 0D 0A 24
  205. 2913:0269 62 79 65 20 2E 2E data_10 db 'bye ...', 0Dh, 0Ah, '$; xref 2913:0468
  206. 2913:026F 2E 0D 0A 24
  207. 2913:0273 57 49 5A 31 20 20 data_11 db 'WIZ1 .DSK', 0 ; xref 2913:0116, 0136, 0185, 0195
  208. 2913:0279 20 20 2E 44 53 4B
  209. 2913:027F 00
  210. 2913:0280 5D 20 61 73 20 3C db '] as <disk1_image>', 0Dh, 0Ah, '$'
  211. 2913:0286 64 69 73 6B 31 5F
  212. 2913:028C 69 6D 61 67 65 3E
  213. 2913:0292 0D 0A 24
  214. 2913:0295 20 20 20 20 20 20 data_12 db ' . ', 0 ; xref 2913:0128, 01AC, 01B8, 01C8
  215. ; 041C
  216. 2913:029B 20 20 2E 20 20 20
  217. 2913:02A1 00
  218. 2913:02A2 5D 20 61 73 20 3C db '] as <disk2_image>', 0Dh, 0Ah, '$'
  219. 2913:02A8 64 69 73 6B 32 5F
  220. 2913:02AE 69 6D 61 67 65 3E
  221. 2913:02B4 0D 0A 24
  222. 2913:02B7 0000 data_13 dw 0 ; xref 2913:01A0, 03C2
  223. 2913:02B9 0000 data_14 dw 0 ; xref 2913:01A8, 01D3, 03EB
  224. 2913:02BB 0000 data_15 dw 0 ; xref 2913:01A4, 0338, 035A, 037E
  225. ; 03C6, 03EF
  226. 2913:02BD 0000 data_16 dw 0 ; xref 2913:017D, 0207, 022B
  227. 2913:02BF 0000 data_17 dw 0 ; xref 2913:01E8, 0436
  228. 2913:02C1 0000 data_18 dw 0 ; xref 2913:01EC, 043A
  229. 2913:02C3 0000 0000 data_19 dw 0, 0 ; xref 2913:01FE, 0402, 0446
  230. 2913:02C7 00 data_21 db 0 ; xref 2913:0156, 0458
  231. 2913:02C8 FA 50 B0 B6 E6 43 db 0FAh, 50h,0B0h,0B6h,0E6h, 43h
  232. 2913:02CE B8 00 18 E6 42 8A db 0B8h, 00h, 18h,0E6h, 42h, 8Ah
  233. 2913:02D4 C4 E6 42 E4 61 0C db 0C4h,0E6h, 42h,0E4h, 61h, 0Ch
  234. 2913:02DA 03 E6 61 58 1E 06 db 03h,0E6h, 61h, 58h, 1Eh, 06h
  235. 2913:02E0 9C 80 FC 02 74 16 db 9Ch, 80h,0FCh, 02h, 74h, 16h
  236. 2913:02E6 80 FC 03 74 11 80 db 80h,0FCh, 03h, 74h, 11h, 80h
  237. 2913:02EC FC 00 74 07 9D F9 db 0FCh, 00h, 74h, 07h, 9Dh,0F9h
  238. 2913:02F2 B4 06 E9 96 00 9D db 0B4h, 06h,0E9h, 96h, 00h, 9Dh
  239. 2913:02F8 F8 E9 91 00 80 FD db 0F8h,0E9h, 91h, 00h, 80h,0FDh
  240.  
  241. wizdos.lst Sourcer v8.01 10-Feb-2024 4:50 pm Page 5
  242.  
  243. 2913:02FE 4F 75 14 80 F9 01 db 4Fh, 75h, 14h, 80h,0F9h, 01h
  244. 2913:0304 74 05 B5 27 EB 0B db 74h, 05h,0B5h, 27h,0EBh, 0Bh
  245. 2913:030A 90 db 90h
  246. 2913:030B loc_9:
  247. 2913:030B 9D popf ; Pop flags
  248. 2913:030C B8 0400 mov ax,400h
  249. 2913:030F 3D FFFF cmp ax,0FFFFh
  250. 2913:0312 EB 79 jmp short loc_12 ; (038D)
  251. 2913:0314 90 db 90h
  252. 2913:0315 loc_10:
  253. 2913:0315 50 push ax
  254. 2913:0316 53 push bx
  255. 2913:0317 51 push cx
  256. 2913:0318 52 push dx
  257. 2913:0319 D0 E5 shl ch,1 ; Shift w/zeros fill
  258. 2913:031B 02 F5 add dh,ch
  259. 2913:031D 8A C6 mov al,dh
  260. 2913:031F 32 E4 xor ah,ah ; Zero register
  261. 2913:0321 D1 E0 shl ax,1 ; Shift w/zeros fill
  262. 2913:0323 D1 E0 shl ax,1 ; Shift w/zeros fill
  263. 2913:0325 D1 E0 shl ax,1 ; Shift w/zeros fill
  264. 2913:0327 FE C9 dec cl
  265. 2913:0329 32 ED xor ch,ch ; Zero register
  266. 2913:032B 03 C1 add ax,cx
  267. 2913:032D D1 E0 shl ax,1 ; Shift w/zeros fill
  268. 2913:032F 32 D2 xor dl,dl ; Zero register
  269. 2913:0331 8A CC mov cl,ah
  270. 2913:0333 8A F0 mov dh,al
  271. 2913:0335 B8 4200 mov ax,4200h
  272. 2913:0338 2E: 8B 1E 02BB mov bx,cs:data_15 ; (2913:02BB=0)
  273. 2913:033D CD 21 int 21h ; DOS Services ah=function 42h
  274. ; move file ptr, bx=file handle
  275. ; al=method, cx,dx=offset
  276. 2913:033F 5A pop dx
  277. 2913:0340 59 pop cx
  278. 2913:0341 5B pop bx
  279. 2913:0342 58 pop ax
  280. 2913:0343 80 FC 03 cmp ah,3
  281. 2913:0346 74 24 je loc_11 ; Jump if equal
  282. 2913:0348 53 push bx
  283. 2913:0349 51 push cx
  284. 2913:034A 52 push dx
  285. 2913:034B 32 C9 xor cl,cl ; Zero register
  286. 2913:034D 8A E8 mov ch,al
  287. 2913:034F D0 E5 shl ch,1 ; Shift w/zeros fill
  288. 2913:0351 50 push ax
  289. 2913:0352 8B D3 mov dx,bx
  290. 2913:0354 8C C3 mov bx,es
  291. 2913:0356 8E DB mov ds,bx
  292. 2913:0358 B4 3F mov ah,3Fh ; '?'
  293. 2913:035A 2E: 8B 1E 02BB mov bx,cs:data_15 ; (2913:02BB=0)
  294. 2913:035F CD 21 int 21h ; DOS Services ah=function 3Fh
  295. ; read file, bx=file handle
  296. ; cx=bytes to ds:dx buffer
  297. 2913:0361 58 pop ax
  298. 2913:0362 32 E4 xor ah,ah ; Zero register
  299. 2913:0364 5A pop dx
  300.  
  301. wizdos.lst Sourcer v8.01 10-Feb-2024 4:50 pm Page 6
  302.  
  303. 2913:0365 59 pop cx
  304. 2913:0366 5B pop bx
  305. 2913:0367 9D popf ; Pop flags
  306. 2913:0368 F8 clc ; Clear carry flag
  307. 2913:0369 EB 22 jmp short loc_12 ; (038D)
  308. 2913:036B 90 db 90h
  309. 2913:036C loc_11: ; xref 2913:0346
  310. 2913:036C 53 push bx
  311. 2913:036D 51 push cx
  312. 2913:036E 52 push dx
  313. 2913:036F 32 C9 xor cl,cl ; Zero register
  314. 2913:0371 8A E8 mov ch,al
  315. 2913:0373 D0 E5 shl ch,1 ; Shift w/zeros fill
  316. 2913:0375 50 push ax
  317. 2913:0376 8B D3 mov dx,bx
  318. 2913:0378 8C C3 mov bx,es
  319. 2913:037A 8E DB mov ds,bx
  320. 2913:037C B4 40 mov ah,40h ; '@'
  321. 2913:037E 2E: 8B 1E 02BB mov bx,cs:data_15 ; (2913:02BB=0)
  322. 2913:0383 CD 21 int 21h ; DOS Services ah=function 40h
  323. ; write file bx=file handle
  324. ; cx=bytes from ds:dx buffer
  325. 2913:0385 58 pop ax
  326. 2913:0386 32 E4 xor ah,ah ; Zero register
  327. 2913:0388 5A pop dx
  328. 2913:0389 59 pop cx
  329. 2913:038A 5B pop bx
  330. 2913:038B 9D popf ; Pop flags
  331. 2913:038C F8 clc ; Clear carry flag
  332. 2913:038D loc_12: ; xref 2913:0312, 0369
  333. 2913:038D 07 pop es
  334. 2913:038E 1F pop ds
  335. 2913:038F 50 push ax
  336. 2913:0390 9C pushf ; Push flags
  337. 2913:0391 E4 61 in al,61h ; port 61h, 8255 port B, read
  338. 2913:0393 24 FC and al,0FCh
  339. 2913:0395 E6 61 out 61h,al ; port 61h, 8255 B - spkr, etc
  340. ; al = 0, speaker off
  341. 2913:0397 9D popf ; Pop flags
  342. 2913:0398 58 pop ax
  343. 2913:0399 FB sti ; Enable interrupts
  344. 2913:039A CA 0002 retf 2
  345. ;* No entry point to code
  346. 2913:039D 9C pushf ; Push flags
  347. 2913:039E 50 push ax
  348. 2913:039F 1E push ds
  349. 2913:03A0 B8 0040 mov ax,40h
  350. 2913:03A3 8E D8 mov ds,ax
  351. 2913:03A5 A1 0017 mov ax,ds:keybd_flags_1 ; (0040:0017=0)
  352. 2913:03A8 24 0F and al,0Fh
  353. 2913:03AA 1F pop ds
  354. 2913:03AB 3C 06 cmp al,6
  355. 2913:03AD 75 25 jne loc_13 ; Jump if not equal
  356. 2913:03AF 50 push ax
  357. 2913:03B0 E4 61 in al,61h ; port 61h, 8255 port B, read
  358. 2913:03B2 0C 03 or al,3
  359. 2913:03B4 E6 61 out 61h,al ; port 61h, 8255 B - spkr, etc
  360.  
  361. wizdos.lst Sourcer v8.01 10-Feb-2024 4:50 pm Page 7
  362.  
  363. 2913:03B6 E4 61 in al,61h ; port 61h, 8255 port B, read
  364. 2913:03B8 24 FC and al,0FCh
  365. 2913:03BA E6 61 out 61h,al ; port 61h, 8255 B - spkr, etc
  366. ; al = 0, speaker off
  367. 2913:03BC E4 61 in al,61h ; port 61h, 8255 port B, read
  368. 2913:03BE 0C 03 or al,3
  369. 2913:03C0 E6 61 out 61h,al ; port 61h, 8255 B - spkr, etc
  370. 2913:03C2 2E: A1 02B7 mov ax,cs:data_13 ; (2913:02B7=0)
  371. 2913:03C6 2E: A3 02BB mov cs:data_15,ax ; (2913:02BB=0)
  372. 2913:03CA E4 61 in al,61h ; port 61h, 8255 port B, read
  373. 2913:03CC 24 FC and al,0FCh
  374. 2913:03CE E6 61 out 61h,al ; port 61h, 8255 B - spkr, etc
  375. ; al = 0, speaker off
  376. 2913:03D0 58 pop ax
  377. 2913:03D1 EB 27 jmp short loc_14 ; (03FA)
  378. 2913:03D3 90 db 90h
  379. 2913:03D4 loc_13: ; xref 2913:03AD
  380. 2913:03D4 3C 05 cmp al,5
  381. 2913:03D6 75 22 jne loc_14 ; Jump if not equal
  382. 2913:03D8 50 push ax
  383. 2913:03D9 E4 61 in al,61h ; port 61h, 8255 port B, read
  384. 2913:03DB 0C 03 or al,3
  385. 2913:03DD E6 61 out 61h,al ; port 61h, 8255 B - spkr, etc
  386. 2913:03DF E4 61 in al,61h ; port 61h, 8255 port B, read
  387. 2913:03E1 24 FC and al,0FCh
  388. 2913:03E3 E6 61 out 61h,al ; port 61h, 8255 B - spkr, etc
  389. ; al = 0, speaker off
  390. 2913:03E5 E4 61 in al,61h ; port 61h, 8255 port B, read
  391. 2913:03E7 0C 03 or al,3
  392. 2913:03E9 E6 61 out 61h,al ; port 61h, 8255 B - spkr, etc
  393. 2913:03EB 2E: A1 02B9 mov ax,cs:data_14 ; (2913:02B9=0)
  394. 2913:03EF 2E: A3 02BB mov cs:data_15,ax ; (2913:02BB=0)
  395. 2913:03F3 E4 61 in al,61h ; port 61h, 8255 port B, read
  396. 2913:03F5 24 FC and al,0FCh
  397. 2913:03F7 E6 61 out 61h,al ; port 61h, 8255 B - spkr, etc
  398. ; al = 0, speaker off
  399. 2913:03F9 58 pop ax
  400. 2913:03FA loc_14: ; xref 2913:03D1, 03D6
  401. 2913:03FA 24 0C and al,0Ch
  402. 2913:03FC 3C 0C cmp al,0Ch
  403. 2913:03FE 74 07 je loc_15 ; Jump if equal
  404. 2913:0400 58 pop ax
  405. 2913:0401 9D popf ; Pop flags
  406. 2913:0402 2E: FF 2E 02C3 jmp dword ptr cs:data_19 ; (2913:02C3=0)
  407. 2913:0407 loc_15: ; xref 2913:03FE
  408. 2913:0407 58 pop ax
  409. 2913:0408 9D popf ; Pop flags
  410. 2913:0409 loc_16: ; xref 2913:0228
  411. 2913:0409 58 pop ax
  412. 2913:040A 83 C4 06 add sp,6
  413. 2913:040D FA cli ; Disable interrupts
  414. 2913:040E B4 68 mov ah,68h ; 'h'
  415. 2913:0410 BB 02B7 mov bx,2B7h
  416. 2913:0413 CD 21 int 21h ; DOS Services ah=function 68h
  417. ; flush file buffers, bx=handle
  418. 2913:0415 B4 3E mov ah,3Eh ; '>'
  419. 2913:0417 BB 02B7 mov bx,2B7h
  420.  
  421. wizdos.lst Sourcer v8.01 10-Feb-2024 4:50 pm Page 8
  422.  
  423. 2913:041A CD 21 int 21h ; DOS Services ah=function 3Eh
  424. ; close file, bx=file handle
  425. 2913:041C 2E: A0 0295 mov al,byte ptr cs:data_12 ; (2913:0295=' . ')
  426. 2913:0420 3C 20 cmp al,20h ; ' '
  427. 2913:0422 74 0E je loc_17 ; Jump if equal
  428. 2913:0424 B4 68 mov ah,68h ; 'h'
  429. 2913:0426 BB 02B9 mov bx,2B9h
  430. 2913:0429 CD 21 int 21h ; DOS Services ah=function 68h
  431. ; flush file buffers, bx=handle
  432. 2913:042B B4 3E mov ah,3Eh ; '>'
  433. 2913:042D BB 02B9 mov bx,2B9h
  434. 2913:0430 CD 21 int 21h ; DOS Services ah=function 3Eh
  435. ; close file, bx=file handle
  436. 2913:0432 loc_17: ; xref 2913:0422
  437. 2913:0432 33 C0 xor ax,ax ; Zero register
  438. 2913:0434 8E D8 mov ds,ax
  439. 2913:0436 2E: A1 02BF mov ax,cs:data_17 ; (2913:02BF=0)
  440. 2913:043A 2E: 8B 1E 02C1 mov bx,cs:data_18 ; (2913:02C1=0)
  441. 2913:043F A3 0060 mov ds:data_3e,ax ; (0000:0060=12C0h)
  442. 2913:0442 89 1E 0062 mov ds:data_4e,bx ; (0000:0062=0F000h)
  443. 2913:0446 2E: A1 02C3 mov ax,cs:data_19 ; (2913:02C3=0)
  444. 2913:044A 2E: 8B 1E 02C5 mov bx,word ptr cs:data_19+; (2913:02C5=0)
  445. 2913:044F A3 0058 mov ds:data_1e,ax ; (0000:0058=11E0h)
  446. 2913:0452 89 1E 005A mov ds:data_2e,bx ; (0000:005A=0F000h)
  447. 2913:0456 B4 00 mov ah,0
  448. 2913:0458 2E: A0 02C7 mov al,cs:data_21 ; (2913:02C7=0)
  449. 2913:045C CD 10 int 10h ; Video display ah=functn 00h
  450. ; set display mode in al
  451. 2913:045E 8C C8 mov ax,cs
  452. 2913:0460 8E D8 mov ds,ax
  453. 2913:0462 8E C0 mov es,ax
  454. 2913:0464 8E D0 mov ss,ax
  455. 2913:0466 B4 09 mov ah,9
  456. 2913:0468 ?BA 0269 mov dx,offset data_10 ; (2913:0269='bye ...')
  457. 2913:046B CD 21 int 21h ; DOS Services ah=function 09h
  458. ; display char string at ds:dx
  459. 2913:046D B4 4C mov ah,4Ch ; 'L'
  460. 2913:046F B0 00 mov al,0
  461. 2913:0471 CD 21 int 21h ; DOS Services ah=function 4Ch
  462. ; terminate with al=return code
  463. 2913:0473 0059[00] db 89 dup (0)
  464. 2913:04CC 4D 61 69 6C 20 74 db 'Mail to Takeo Katoh(Take); KFF00'
  465. 2913:04D2 6F 20 54 61 6B 65
  466. 2913:04D8 6F 20 4B 61 74 6F
  467. 2913:04DE 68 28 54 61 6B 65
  468. 2913:04E4 29 3B 20 4B 46 46
  469. 2913:04EA 30 30
  470. 2913:04EC 36 34 32 40 6E 69 db '[email protected]'
  471. 2913:04F2 66 74 79 73 65 72
  472. 2913:04F8 76 65 2E 6F 72 2E
  473. 2913:04FE 6A 70
  474. 2913:0500 00 00 db 0, 0
  475. 2913:0502 57 69 7A 61 72 64 data_24 db 'Wizardry OS Emulator for DOS, ve' ; xref 2913:0147
  476. 2913:0508 72 79 20 4F 53 20
  477. 2913:050E 45 6D 75 6C 61 74
  478. 2913:0514 6F 72 20 66 6F 72
  479. 2913:051A 20 44 4F 53 2C 20
  480.  
  481. wizdos.lst Sourcer v8.01 10-Feb-2024 4:50 pm Page 9
  482.  
  483. 2913:0520 76 65
  484. 2913:0522 72 20 31 2E 30 30 db 'r 1.00', 0Dh, 0Ah, ' '
  485. 2913:0528 0D 0A 20 20 20 20
  486. 2913:052E 20 20 20 20 20 20
  487. 2913:0534 20 20
  488. 2913:0536 20 20 20 20 28 63 db ' (c)Takeo Katoh(Take), 1996-9'
  489. 2913:053C 29 54 61 6B 65 6F
  490. 2913:0542 20 4B 61 74 6F 68
  491. 2913:0548 28 54 61 6B 65 29
  492. 2913:054E 2C 20 31 39 39 36
  493. 2913:0554 2D 39
  494. 2913:0556 38 0D 0A 75 73 61 db '8', 0Dh, 0Ah, 'usage:', 0Dh, 0Ah
  495. 2913:055C 67 65 3A 0D 0A
  496. 2913:0561 20 20 57 49 5A 44 db ' WIZDOS [<disk1_image>] [<disk2'
  497. 2913:0567 4F 53 20 5B 3C 64
  498. 2913:056D 69 73 6B 31 5F 69
  499. 2913:0573 6D 61 67 65 3E 5D
  500. 2913:0579 20 5B 3C 64 69 73
  501. 2913:057F 6B 32
  502. 2913:0581 5F 69 6D 61 67 65 db '_image>]', 0Dh, 0Ah, 'keys:', 0Dh
  503. 2913:0587 3E 5D 0D 0A 6B 65
  504. 2913:058D 79 73 3A 0D
  505. 2913:0591 0A 20 20 5B 43 54 db 0Ah, ' [CTRL]+[ALT] to e'
  506. 2913:0597 52 4C 5D 2B 5B 41
  507. 2913:059D 4C 54 5D 20 20 20
  508. 2913:05A3 20 20 20 20 20 20
  509. 2913:05A9 74 6F 20 65
  510. 2913:05AD 78 69 74 0D 0A 20 db 'xit', 0Dh, 0Ah, ' [CTRL]+[LEFT_'
  511. 2913:05B3 20 5B 43 54 52 4C
  512. 2913:05B9 5D 2B 5B 4C 45 46
  513. 2913:05BF 54 5F
  514. 2913:05C1 53 48 49 46 54 5D db 'SHIFT] to set disk1 (default)', 0Dh
  515. 2913:05C7 20 20 74 6F 20 73
  516. 2913:05CD 65 74 20 64 69 73
  517. 2913:05D3 6B 31 20 28 64 65
  518. 2913:05D9 66 61 75 6C 74 29
  519. 2913:05DF 0D
  520. 2913:05E0 0A 20 20 5B 43 54 db 0Ah, ' [CTRL]+[RIGHT_SHIFT] to s'
  521. 2913:05E6 52 4C 5D 2B 5B 52
  522. 2913:05EC 49 47 48 54 5F 53
  523. 2913:05F2 48 49 46 54 5D 20
  524. 2913:05F8 74 6F 20 73
  525. 2913:05FC 65 74 20 64 69 73 db 'et disk2', 0Dh, 0Ah, 'warning:', 0Dh
  526. 2913:0602 6B 32 0D 0A 77 61
  527. 2913:0608 72 6E 69 6E 67 3A
  528. 2913:060E 0D
  529. 2913:060F 0A 20 20 59 6F 75 db 0Ah, ' You MUST own an original '
  530. 2913:0615 20 4D 55 53 54 20
  531. 2913:061B 6F 77 6E 20 61 6E
  532. 2913:0621 20 6F 72 69 67 69
  533. 2913:0627 6E 61 6C 20
  534. 2913:062B 57 69 7A 61 72 64 db 'Wizardry disk!', 0Dh, 0Ah, '"Wiz'
  535. 2913:0631 72 79 20 64 69 73
  536. 2913:0637 6B 21 0D 0A 22 57
  537. 2913:063D 69 7A
  538. 2913:063F 61 72 64 72 79 22 db 'ardry" is a Reg', 27h, 'd TM of '
  539. 2913:0645 20 69 73 20 61 20
  540.  
  541. wizdos.lst Sourcer v8.01 10-Feb-2024 4:50 pm Page 10
  542.  
  543. 2913:064B 52 65 67 27 64 20
  544. 2913:0651 54 4D 20 6F 66 20
  545. 2913:0657 53 69 72 2D 74 65 db 'Sir-tech Software.', 0Dh, 0Ah, '$'
  546. 2913:065D 63 68 20 53 6F 66
  547. 2913:0663 74 77 61 72 65 2E
  548. 2913:0669 0D 0A 24
  549.  
  550. wizdos endp
  551.  
  552. seg_a ends
  553.  
  554.  
  555.  
  556. end start
  557.  
  558. wizdos.lst Sourcer v8.01 10-Feb-2024 4:50 pm Page 11
  559.  
  560.  
  561. ???????????????????? CROSS REFERENCE - KEY ENTRY POINTS ???????????????????
  562.  
  563. seg:off type label
  564. ---- ---- ---- --------------------------------
  565. 2913:0100 far start
  566.  
  567. ?????????????????? Interrupt Usage Synopsis ??????????????????
  568.  
  569. Interrupt 10h : Video display ah=functn xxh
  570. Interrupt 10h : ah=00h set display mode in al
  571. Interrupt 10h : ah=0Fh get state, al=mode, bh=page
  572. Interrupt 18h : ROM basic
  573. Interrupt 21h : DOS Services ah=function xxh
  574. Interrupt 21h : ah=09h display char string at ds:dx
  575. Interrupt 21h : ah=3Dh open file, al=mode,name@ds:dx
  576. Interrupt 21h : ah=3Eh close file, bx=file handle
  577. Interrupt 21h : ah=3Fh read file, bx=file handle
  578. Interrupt 21h : ah=40h write file bx=file handle
  579. Interrupt 21h : ah=42h move file ptr, bx=file handle
  580. Interrupt 21h : ah=4Ah change memory allocation
  581. Interrupt 21h : ah=4Ch terminate with al=return code
  582. Interrupt 21h : ah=68h flush file buffers, bx=handle
  583.  
  584. ?????????????????? I/O Port Usage Synopsis ??????????????????
  585.  
  586. Port 61h : 8255 port B, read
  587. Port 61h : 8255 B - spkr, etc
  588. Port 61h : al = 0, speaker off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement