2004-10-29 20:24:09 +02:00
|
|
|
.model tiny
|
|
|
|
.486
|
|
|
|
smart
|
|
|
|
.code
|
|
|
|
|
2004-11-19 18:23:06 +01:00
|
|
|
org 0h
|
2004-10-29 20:24:09 +02:00
|
|
|
|
|
|
|
include ..\include\mem.h
|
|
|
|
include ..\include\divers.h
|
|
|
|
|
|
|
|
start:
|
|
|
|
mov si,offset msg
|
|
|
|
mov ah,13
|
|
|
|
int 47h
|
|
|
|
mov ah,6
|
|
|
|
int 47h
|
2004-10-31 12:46:47 +01:00
|
|
|
mov si,offset menu
|
|
|
|
mov ah,13
|
|
|
|
int 47h
|
2004-11-10 17:50:24 +01:00
|
|
|
mov ah,6
|
2004-10-31 12:46:47 +01:00
|
|
|
int 47h
|
2004-10-29 20:24:09 +02:00
|
|
|
xor cx,cx
|
|
|
|
listmcb:
|
|
|
|
mov ah,4
|
|
|
|
int 49h
|
|
|
|
jc fino
|
|
|
|
inc cx
|
2004-11-10 17:50:24 +01:00
|
|
|
mov ah,18h
|
|
|
|
int 47h
|
2004-10-29 20:24:09 +02:00
|
|
|
push gs
|
|
|
|
pop ds
|
2004-10-31 12:46:47 +01:00
|
|
|
mov bh,0
|
2004-10-29 20:24:09 +02:00
|
|
|
mov si,MB.Names
|
2004-10-31 12:46:47 +01:00
|
|
|
mov ah,14h
|
2004-10-29 20:24:09 +02:00
|
|
|
int 47h
|
2004-10-31 12:46:47 +01:00
|
|
|
mov bh,15
|
2004-10-29 20:24:09 +02:00
|
|
|
xor edx,edx
|
|
|
|
mov dx,ds:[MB.Sizes]
|
|
|
|
shl edx,4
|
2004-10-31 12:46:47 +01:00
|
|
|
mov ah,0Fh
|
2004-10-29 20:24:09 +02:00
|
|
|
int 47h
|
2004-10-31 13:23:52 +01:00
|
|
|
mov bh,24
|
|
|
|
cmp ds:[MB.IsResident],true
|
2004-10-29 20:24:09 +02:00
|
|
|
push cs
|
|
|
|
pop ds
|
|
|
|
jne notresident
|
|
|
|
mov si,offset resident
|
2004-10-31 12:46:47 +01:00
|
|
|
mov ah,14h
|
2004-10-29 20:24:09 +02:00
|
|
|
int 47h
|
2004-10-31 12:46:47 +01:00
|
|
|
jmp suitelistmcb
|
2004-10-29 20:24:09 +02:00
|
|
|
notresident:
|
|
|
|
mov si,offset nonresident
|
2004-10-31 12:46:47 +01:00
|
|
|
mov ah,14h
|
2004-10-29 20:24:09 +02:00
|
|
|
int 47h
|
2004-10-31 12:46:47 +01:00
|
|
|
suitelistmcb:
|
|
|
|
mov bh,30
|
|
|
|
cmp gs:[MB.Reference],0
|
|
|
|
je next
|
|
|
|
cmp gs:[MB.Reference],1000h
|
|
|
|
jb next
|
|
|
|
mov ax,gs:[MB.Reference]
|
|
|
|
dec ax
|
|
|
|
dec ax
|
|
|
|
mov ds,ax
|
|
|
|
mov si,MB.Names
|
|
|
|
mov ah,14h
|
2004-10-29 20:24:09 +02:00
|
|
|
int 47h
|
2004-10-31 12:46:47 +01:00
|
|
|
next:
|
|
|
|
mov bh,46
|
|
|
|
xor edx,edx
|
|
|
|
mov dx,gs
|
|
|
|
inc dx
|
|
|
|
inc dx
|
|
|
|
push cx
|
|
|
|
mov cx,16
|
|
|
|
mov ah,11h
|
|
|
|
int 47h
|
|
|
|
pop cx
|
2004-11-10 17:50:24 +01:00
|
|
|
mov ah,6h
|
|
|
|
int 47h
|
2004-10-31 12:46:47 +01:00
|
|
|
jmp listmcb
|
|
|
|
fino:
|
2004-10-29 20:24:09 +02:00
|
|
|
db 0CBh
|
2004-10-31 12:46:47 +01:00
|
|
|
resident db 'oui',0
|
|
|
|
nonresident db 'non',0
|
2004-11-13 09:58:42 +01:00
|
|
|
msg db 'Memory manager V1.5',0
|
2004-10-31 12:46:47 +01:00
|
|
|
menu db 'Nom | Taille | Res | Parent | Mem',0
|
2004-10-29 20:24:09 +02:00
|
|
|
|
|
|
|
end start
|