From 819d3e819cf0ad335401abae1000f6f5b78446fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Fri, 29 Oct 2004 18:24:09 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20petit=20programme=20de=20gestion=20de?= =?UTF-8?q?=20la=20m=C3=A9moire,=20pour=20l'instant=20en=20visualisation?= =?UTF-8?q?=20seulement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- programs/memoire.asm | 70 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 programs/memoire.asm diff --git a/programs/memoire.asm b/programs/memoire.asm new file mode 100644 index 0000000..8c09652 --- /dev/null +++ b/programs/memoire.asm @@ -0,0 +1,70 @@ +.model tiny +.486 +smart +.code + +org 0100h + +include ..\include\mem.h +include ..\include\divers.h + +start: +mov si,offset msg +mov ah,13 +int 47h +mov ah,6 +int 47h +mov ah,0 +int 49h + +xor cx,cx +listmcb: +mov ah,06h +int 47h +mov ah,4 +int 49h +jc fino +inc cx +push gs +pop ds +mov si,MB.Names +mov ah,0Dh +int 47h +mov ah,05h +int 47h +xor edx,edx +mov dx,ds:[MB.Sizes] +shl edx,4 +mov ah,08 +int 47h +mov ah,05h +int 47h +push cs +pop ds +cmp ds:[MB.Sizes],true +jne notresident +mov si,offset resident +mov ah,0Dh +int 47h +mov ah,05h +int 47h +jmp listmcb +notresident: +mov si,offset nonresident +mov ah,0Dh +int 47h +fino: +push cs +pop ds +mov si,offset findesprog +mov ah,0Dh +int 47h +mov ax,0 +int 16h +db 0CBh +findesprog db '********* FIN ***********',0 +resident db 'Resident',0 +nonresident db 'Volatile',0 +msg db 'Memory manager V1.0',0 + +end start