2007-03-24 20:52:56 +01:00
|
|
|
|
model tiny,stdcall
|
|
|
|
|
p586N
|
|
|
|
|
locals
|
|
|
|
|
jumps
|
|
|
|
|
codeseg
|
|
|
|
|
option procalign:byte
|
|
|
|
|
|
|
|
|
|
include "..\include\mem.h"
|
|
|
|
|
include "..\include\divers.h"
|
|
|
|
|
|
2004-11-19 18:23:06 +01:00
|
|
|
|
org 0h
|
2004-11-23 21:38:58 +01:00
|
|
|
|
|
2004-06-12 23:34:04 +02:00
|
|
|
|
start:
|
2007-03-24 20:52:56 +01:00
|
|
|
|
header exe <"CE",1,0,0,,offset imports,,offset realstart>
|
2004-11-23 21:38:58 +01:00
|
|
|
|
|
|
|
|
|
realstart:
|
2007-03-24 20:52:56 +01:00
|
|
|
|
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
|
2004-11-05 02:01:37 +01:00
|
|
|
|
nokey:
|
2007-03-24 20:52:56 +01:00
|
|
|
|
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
|
2004-11-23 21:38:58 +01:00
|
|
|
|
noprob:
|
2007-03-24 20:52:56 +01:00
|
|
|
|
inc cx
|
|
|
|
|
cmp cx,2880
|
|
|
|
|
jnz verifall
|
|
|
|
|
enend:
|
|
|
|
|
cmp di,0
|
|
|
|
|
je noatall
|
|
|
|
|
call [print],offset error2
|
|
|
|
|
jmp someof
|
2004-11-23 21:38:58 +01:00
|
|
|
|
noatall:
|
2007-03-24 20:52:56 +01:00
|
|
|
|
call [print],offset noerror
|
2004-11-23 21:38:58 +01:00
|
|
|
|
someof:
|
2007-03-24 20:52:56 +01:00
|
|
|
|
mov ah,0
|
|
|
|
|
int 16h
|
|
|
|
|
call [restorestate]
|
|
|
|
|
retf
|
2004-11-23 21:38:58 +01:00
|
|
|
|
errors:
|
2007-03-24 20:52:56 +01:00
|
|
|
|
call [print],offset error
|
|
|
|
|
mov ah,0
|
|
|
|
|
int 16h
|
|
|
|
|
call [restorestate]
|
|
|
|
|
retf
|
2004-06-12 23:34:04 +02:00
|
|
|
|
|
2004-11-23 21:38:58 +01:00
|
|
|
|
error db '\g10,10Erreur avec le lecteur de disquette !',0
|
|
|
|
|
error2 db '\g10,10Le disque est defectueux, appuyez sur une touche pour quitter',0
|
|
|
|
|
noerror db '\g10,10Pas de secteurs defectueux, appuyez sur une touche pour continuer',0
|
|
|
|
|
msg db '\m02\e\c07\g29,00- Test de surface du disque -\g02,49<Pressez espace pour quitter>',0
|
|
|
|
|
msg2 db '\g10,20%u %%\g10,16%u cluster testes. \h34%u cluster defectueux. ',0
|
2004-06-12 23:34:04 +02:00
|
|
|
|
|
|
|
|
|
gauge:
|
2007-03-24 20:52:56 +01:00
|
|
|
|
push ax dx
|
|
|
|
|
mov ax,cx
|
|
|
|
|
mul [sizeof]
|
|
|
|
|
div [max]
|
|
|
|
|
xor edx,edx
|
|
|
|
|
mov dx,[sizeof]
|
|
|
|
|
sub dx,ax
|
|
|
|
|
push dx
|
|
|
|
|
push '<27>'
|
|
|
|
|
mov dx,ax
|
|
|
|
|
push dx
|
|
|
|
|
push '<27>'
|
|
|
|
|
push offset gauges
|
|
|
|
|
call [print]
|
|
|
|
|
pop dx ax
|
|
|
|
|
retn
|
2004-11-23 21:38:58 +01:00
|
|
|
|
|
|
|
|
|
max dw 2879
|
|
|
|
|
sizeof dw 50
|
|
|
|
|
|
|
|
|
|
gauges db '\g10,18\c05%cM\c07%cM',0
|
|
|
|
|
|
2007-03-24 20:52:56 +01:00
|
|
|
|
importing
|
|
|
|
|
use VIDEO.LIB,print
|
|
|
|
|
use VIDEO,savestate
|
|
|
|
|
use VIDEO,restorestate
|
|
|
|
|
use DISQUE,verifysector
|
|
|
|
|
endi
|