feat: reprogrammation en utilisant la librairie video

This commit is contained in:
Nicolas Hordé 2004-11-23 20:38:58 +00:00
parent 2dbdb9c4c8
commit c461ede7f1
1 changed files with 98 additions and 143 deletions

View File

@ -4,28 +4,20 @@
org 0h org 0h
include ..\include\mem.h
start: start:
header exe <,1,0,,,offset imports,,>
realstart:
mov ah,28h mov ah,28h
int 47H
mov ax,0002
int 47H
replay:
mov ah,2
int 47h
mov ah,21
mov cl,7
int 47h int 47h
push offset msg
call [print]
mov bp,1000h
xor di,di xor di,di
xor cx,cx xor cx,cx
mov ah,20 xor edx,edx
mov bx,1D00h
mov si,offset Msg
int 47h
mov ah,20
mov bx,0231h
mov si,offset msgapp
int 47h
mov bp,1000h
VerifAll: VerifAll:
mov ah,1 mov ah,1
int 16h int 16h
@ -33,35 +25,21 @@ VerifAll:
cmp al,' ' cmp al,' '
je enend je enend
nokey: nokey:
mov dx,di
push edx
mov dx,cx
inc dx
push edx
mov ax,cx mov ax,cx
inc ax inc ax
mov si,100 mov si,100
mul si mul si
mov si,2880 mov si,2880
div si div si
xor edx,edx
mov dx,ax mov dx,ax
mov ah,15 push edx
mov bx,0A14h push offset msg2
int 47h call [print]
mov ah,13
mov si,offset po
int 47h
mov ah,15
mov dx,cx
inc dx
mov bx,0A10h
int 47h
mov ah,13
mov si,offset Msg2
int 47h
mov ah,8
mov edx,0
mov dx,di
int 47h
mov ah,13
mov si,offset Msg3
int 47h
call gauge call gauge
mov ah,2 mov ah,2
int 48h int 48h
@ -75,84 +53,61 @@ nokey:
enend: enend:
cmp di,0 cmp di,0
je noatall je noatall
mov bx,0E09h push offset error2
mov ah,20 call [print]
mov si,offset error2
int 47h
jmp someof jmp someof
noatall: noatall:
mov bx,0E09h push offset noerror
mov ah,20 call [print]
mov si,offset noerror
int 47h
someof: someof:
mov ah,0 mov ah,0
int 16h int 16h
mov ah,29h mov ah,29h
int 47H int 47H
db 0CBH retf
errors: errors:
mov ah,21 push offset error
mov cl,4 call [print]
int 47h
mov bx,0D09h
mov ah,20
mov si,offset errore
int 47h
mov ah,0 mov ah,0
int 16h int 16h
mov ah,29h mov ah,29h
int 47H int 47H
db 0CBH retf
errore db 'Erreur avec le lecteur de disquette !',0 error db '\g10,10Erreur avec le lecteur de disquette !',0
noerror db 'Pas de secteurs defectueux, appuyez sur une touche pour continuer',0 error2 db '\g10,10Le disque est defectueux, appuyez sur une touche pour quitter',0
error2 db 'Le disque est defectueux, appuyez sur une touche pour quitter',0 noerror db '\g10,10Pas de secteurs defectueux, appuyez sur une touche pour continuer',0
po db ' %',0 msg db '\m02\e\c07\g29,00- Test de surface du disque -\g02,49<Pressez espace pour quitter>',0
msgapp db '<Pressez espace pour quitter>',0 msg2 db '\g10,20%u %%\g10,16%u cluster testes. \h34%u cluster defectueux. ',0
msg db '- Test de surface du disque -',0
msg2 db ' cluster testes. ',0
msg3 db ' cluster defectueux. ',0
;->Increment CX
gauge: gauge:
push ax bx cx dx si ds push ax dx
push cs
pop ds
mov ax,cx mov ax,cx
mul sizes mul sizeof
div max div max
xor edx,edx
mov dx,sizeof
sub dx,ax
push dx
push 'Û'
mov dx,ax mov dx,ax
mov bl,oldvalue push dx
xor bh,bh push 'Û'
mov byte ptr [offset gaugetxt+bx],'Û' push offset gauges
cmp bx,0 call [print]
jnz nono2 pop dx ax
mov ah,21 retn
mov cl,8
int 47h max dw 2879
mov bx,xy sizeof dw 50
mov ah,20
mov si,offset gaugetxt gauges db '\g10,18\c05%cM\c07%cM',0
int 47h
mov ah,21 imports:
mov cl,7 db "VIDEO.LIB::print",0
int 47h print dd 0
nono2: dw 0
mov bx,dx
xor bh,bh
mov byte ptr [offset gaugetxt+bx],0
mov oldvalue,bl
mov bx,xy
mov ah,20
mov si,offset gaugetxt
int 47h
pop ds si dx cx bx ax
ret
oldvalue db 0
max dw 2880
sizes dw 50
xy dw 0A12h
gaugetxt db 'ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ',0
End Start End Start