From 85f66f34d510ab19429a7de58fbe540590af09d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Thu, 25 Nov 2004 00:04:02 +0000 Subject: [PATCH] feat: reprogrammation en utilisant la librairie video --- programs/gestion.asm | 154 ++++++++++--------------------------------- 1 file changed, 33 insertions(+), 121 deletions(-) diff --git a/programs/gestion.asm b/programs/gestion.asm index e5361a9..b949ddb 100644 --- a/programs/gestion.asm +++ b/programs/gestion.asm @@ -5,131 +5,40 @@ smart org 0h +include ..\include\mem.h include ..\include\fat.h start: -mov ah,2 -int 47h -mov ah,25 -mov bx,0 -int 47h -mov ah,21 -mov cl,70h -int 47h -mov ah,13 -mov si,offset msg1 -int 47h -mov ah,21 -mov cl,7 -int 47h -mov ah,13 -mov si,offset prompt -int 47h -mov ah,13 -mov si,offset infos -int 47h -mov ah,13 -mov si,offset prompt -int 47h +header exe <,1,0,,,offset imports,,> + +realstart: +push offset msg1 +call [print] + mov ah,3 int 48h xor bp,bp mov di,offset bufferentry -mov si,di mov ah,7 int 48h jc nofiles go: -test [si+Entries.FileAttr],00010000b -je notdirectory -mov ah,21 -mov cl,4 -int 47h -jmp notall -notdirectory: -cmp [si+Entries.FilExt],'C' -jne notexe -cmp [si+Entries.FilExt+1],'E' -jne notexe -cmp [si+Entries.FilExt+2],' ' -jne notexe -mov ah,21 -mov cl,5 -int 47h -jmp notall -notexe: -cmp [si+Entries.FilExt],'S' -jne notsys -cmp [si+Entries.FilExt+1],'Y' -jne notsys -cmp [si+Entries.FilExt+2],'S' -jne notsys -mov ah,21 -mov cl,0Ah -int 47h -jmp notall -notsys: -mov ah,21 -mov cl,7h -int 47h -notall: -mov ah,46 -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,44 -mov dx,[si+Entries.FileDateCrea] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,45 -mov dx,[si+Entries.FileTimeCrea] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,44 -mov dx,[si+Entries.FileDate] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,45 -mov dx,[si+Entries.FileTime] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,48 -mov edx,[si+Entries.FileSize] -int 47h -mov ah,05 -int 47h -int 47h -int 47h -mov ah,47 -mov dl,[si+Entries.FileAttr] -int 47h -mov ah,6 -int 47h +push word ptr [di+Entries.FileAttr] +push dword ptr [di+Entries.FileSize] +push word ptr [di+Entries.FileTime] +push word ptr [di+Entries.FileDate] +push word ptr [di+Entries.FileTimeCrea] +push word ptr [di+Entries.FileDateCrea] +push di +push offset line +call [print] inc bp mov ah,8 int 48h jnc go nofiles: -mov ah,21 -mov cl,70h -int 47h -mov ah,13 -mov si,offset menu -int 47h +push offset menu +call [print] mov xx,1 mov xxold,2 call Select @@ -139,7 +48,7 @@ int 16h cmp ah,50h jne tre1 cmp xx,bp - je endof + ja endof inc xx call select jmp endof @@ -157,14 +66,11 @@ tre2: tre3: cmp ah,59 jne tre4 - jmp start + jmp realstart tre4: cmp ah,67 jne endof - mov ah,15h - mov cl,7 - int 47h - db 0CBh + retf ;selectionne la ligne xx Select: @@ -186,12 +92,18 @@ ret xx dw 1 xxold dw 0 -menu db '[F1] Lire disque [F9] Quitter ',0 -msg1 db ' Gestionnaire de fichier Version 1.5 ',0 -msg2 db 'Programme en cours de chargement',0 -prompt db '--------------------------------------------------------------------------------',0 -infos db 'Nom Ext. Date creation Date modification Taille Attributs',0 - +menu db '\c70 [F1] Lire disque [F9] Quitter \c07',0 +msg1 db '\e\g00,00\c70 Gestionnaire de fichier Version 1.5 ' + db '\g00,01\c07--------------------------------------------------------------------------------' + db '\g00,02Nom Ext. Date creation Date modification Taille Attributs' + db '\g00,03--------------------------------------------------------------------------------\l',0 +line db '\c07%n %d %t %d %t %z %a\l',0 bufferentry db 512 dup (0) + +imports: + db "VIDEO.LIB::print",0 +print dd 0 + dw 0 + end start