Latest version

This commit is contained in:
KusaReMKN 2024-02-24 03:45:55 +09:00
commit 0ab78b427a
No known key found for this signature in database
GPG Key ID: F29DADED43FB2713

46
dumpmcb.asm Normal file
View File

@ -0,0 +1,46 @@
NAME DUMPMCB
TITLE DUMPMCB -- Dump Memory Control Block (MCB) Chain
CODE SEGMENT
ORG 0100h
ASSUME CS:CODE, DS:CODE, ES:CODE, SS:CODE
START:
INVARS:
MOV AH, 52h
INT 21h
JC ERROR
DB 26h ; ES:
MOV ES, [BX-2]
MCBNEXT:
CALL SHOWMCB
CMP [ES:0000], BYTE PTR 'Z'
JZ EXIT
MOV AX, ES
ADD AX, [ES:0003]
INC AX
MOV ES, AX
JMP SHORT MCBNEXT
EXIT:
XOR AL, AL
ERROR:
MOV AH, 4Ch
INT 21h
SHOWMCB:
PUSH ES
POP DS
CLD
XOR SI, SI
MOV CX, 16
MOV AH, 02h
SHOWLOOP:
LODSB
MOV DL, AL
INT 21h
LOOP SHOWLOOP
RET
CODE ENDS
END START