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 int 47h
mov ah,21 push offset msg
mov cl,7 call [print]
int 47h 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,126 +25,89 @@ 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
jc errors jc errors
je noprob je noprob
inc di inc di
noprob: noprob:
inc cx inc cx
cmp cx,2880 cmp cx,2880
jnz verifall jnz verifall
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 someof:
int 47h
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 ah,0
mov bx,0D09h int 16h
mov ah,20
mov si,offset errore
int 47h
mov ah,0
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 mov ax,cx
pop ds mul sizeof
mov ax,cx div max
mul sizes xor edx,edx
div max mov dx,sizeof
mov dx,ax sub dx,ax
mov bl,oldvalue push dx
xor bh,bh push 'Û'
mov byte ptr [offset gaugetxt+bx],'Û' mov dx,ax
cmp bx,0 push dx
jnz nono2 push 'Û'
mov ah,21 push offset gauges
mov cl,8 call [print]
int 47h pop dx ax
mov bx,xy retn
mov ah,20
mov si,offset gaugetxt max dw 2879
int 47h sizeof dw 50
mov ah,21
mov cl,7 gauges db '\g10,18\c05%cM\c07%cM',0
int 47h
nono2: imports:
mov bx,dx db "VIDEO.LIB::print",0
xor bh,bh print dd 0
mov byte ptr [offset gaugetxt+bx],0 dw 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