diff --git a/programs/verifier.asm b/programs/verifier.asm index a662e4a..93d601e 100644 --- a/programs/verifier.asm +++ b/programs/verifier.asm @@ -1,80 +1,73 @@ -.model tiny -.386c -.code +model tiny,stdcall +p586N +locals +jumps +codeseg +option procalign:byte + +include "..\include\mem.h" +include "..\include\divers.h" + org 0h - - -include ..\include\mem.h start: -header exe <,1,0,,,offset imports,,> +header exe <"CE",1,0,0,,offset imports,,offset realstart> realstart: - mov ah,28h - int 47h - push offset msg - call [print] - mov bp,1000h - xor di,di - xor cx,cx - xor edx,edx -VerifAll: - mov ah,1 - int 16h - jz nokey - cmp al,' ' - je enend + call [savestate] + call [print],offset msg + mov bp,1000h + xor di,di + xor cx,cx + xor edx,edx +verifall: + mov ah,1 + int 16h + jz nokey + cmp al,' ' + je enend nokey: - mov dx,di - push edx - mov dx,cx - inc dx - push edx - mov ax,cx - inc ax - mov si,100 - mul si - mov si,2880 - div si - mov dx,ax - push edx - push offset msg2 - call [print] - call gauge - mov ah,2 - int 48h - jc errors - je noprob - inc di + mov dx,di + push edx + mov dx,cx + inc dx + push edx + mov ax,cx + inc ax + mov si,100 + mul si + mov si,2880 + div si + mov dx,ax + push edx + call [print],offset msg2 + call gauge + call [verifysector],cx + jc errors + je noprob + inc di noprob: - inc cx - cmp cx,2880 - jnz verifall - enend: - cmp di,0 - je noatall - push offset error2 - call [print] - jmp someof + inc cx + cmp cx,2880 + jnz verifall +enend: + cmp di,0 + je noatall + call [print],offset error2 + jmp someof noatall: - push offset noerror - call [print] + call [print],offset noerror someof: - mov ah,0 - int 16h - mov ah,29h - int 47H - retf + mov ah,0 + int 16h + call [restorestate] + retf errors: - push offset error - call [print] - mov ah,0 - int 16h - mov ah,29h - int 47H - retf - - + call [print],offset error + mov ah,0 + int 16h + call [restorestate] + retf error db '\g10,10Erreur avec le lecteur de disquette !',0 error2 db '\g10,10Le disque est defectueux, appuyez sur une touche pour quitter',0 @@ -83,31 +76,31 @@ msg db '\m02\e\c07\g29,00- Test de surface du disque -\g02,49