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,155 +4,110 @@
org 0h org 0h
include ..\include\mem.h
start: start:
mov ah,28h header exe <,1,0,,,offset imports,,>
int 47H
mov ax,0002 realstart:
int 47H mov ah,28h
replay: int 47h
mov ah,2 push offset msg
int 47h call [print]
mov ah,21 mov bp,1000h
mov cl,7 xor di,di
int 47h xor cx,cx
xor di,di xor edx,edx
xor cx,cx
mov ah,20
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
jz nokey jz nokey
cmp al,' ' cmp al,' '
je enend je enend
nokey: nokey:
mov ax,cx mov dx,di
inc ax push edx
mov si,100 mov dx,cx
mul si inc dx
mov si,2880 push edx
div si mov ax,cx
xor edx,edx inc ax
mov dx,ax mov si,100
mov ah,15 mul si
mov bx,0A14h mov si,2880
int 47h div si
mov ah,13 mov dx,ax
mov si,offset po push edx
int 47h push offset msg2
mov ah,15 call [print]
mov dx,cx call gauge
inc dx mov ah,2
mov bx,0A10h int 48h
int 47h jc errors
mov ah,13 je noprob
mov si,offset Msg2 inc di
int 47h noprob:
mov ah,8 inc cx
mov edx,0 cmp cx,2880
mov dx,di jnz verifall
int 47h
mov ah,13
mov si,offset Msg3
int 47h
call gauge
mov ah,2
int 48h
jc errors
je noprob
inc di
noprob:
inc cx
cmp cx,2880
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 jmp someof
int 47h noatall:
jmp someof push offset noerror
noatall: call [print]
mov bx,0E09h someof:
mov ah,20 mov ah,0
mov si,offset noerror int 16h
int 47h mov ah,29h
someof: int 47H
mov ah,0 retf
int 16h errors:
mov ah,29h push offset error
int 47H call [print]
db 0CBH mov ah,0
errors: int 16h
mov ah,21 mov ah,29h
mov cl,4 int 47H
int 47h retf
mov bx,0D09h
mov ah,20
mov si,offset errore
int 47h
mov ah,0
int 16h
mov ah,29h
int 47H
db 0CBH
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