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
include ..\include\mem.h
start:
mov ah,28h
int 47H
mov ax,0002
int 47H
replay:
mov ah,2
int 47h
mov ah,21
mov cl,7
int 47h
xor di,di
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
header exe <,1,0,,,offset imports,,>
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
mov ah,1
int 16h
jz nokey
cmp al,' '
je enend
nokey:
mov ax,cx
inc ax
mov si,100
mul si
mov si,2880
div si
xor edx,edx
mov dx,ax
mov ah,15
mov bx,0A14h
int 47h
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
mov ah,2
int 48h
jc errors
je noprob
inc di
noprob:
inc cx
cmp cx,2880
jnz verifall
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
noprob:
inc cx
cmp cx,2880
jnz verifall
enend:
cmp di,0
je noatall
mov bx,0E09h
mov ah,20
mov si,offset error2
int 47h
jmp someof
noatall:
mov bx,0E09h
mov ah,20
mov si,offset noerror
int 47h
someof:
mov ah,0
int 16h
mov ah,29h
int 47H
db 0CBH
errors:
mov ah,21
mov cl,4
int 47h
mov bx,0D09h
mov ah,20
mov si,offset errore
int 47h
mov ah,0
int 16h
mov ah,29h
int 47H
db 0CBH
cmp di,0
je noatall
push offset error2
call [print]
jmp someof
noatall:
push offset noerror
call [print]
someof:
mov ah,0
int 16h
mov ah,29h
int 47H
retf
errors:
push offset error
call [print]
mov ah,0
int 16h
mov ah,29h
int 47H
retf
errore db 'Erreur avec le lecteur de disquette !',0
noerror db 'Pas de secteurs defectueux, appuyez sur une touche pour continuer',0
error2 db 'Le disque est defectueux, appuyez sur une touche pour quitter',0
po db ' %',0
msgapp db '<Pressez espace pour quitter>',0
msg db '- Test de surface du disque -',0
msg2 db ' cluster testes. ',0
msg3 db ' cluster defectueux. ',0
;->Increment CX
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
gauge:
push ax bx cx dx si ds
push cs
pop ds
mov ax,cx
mul sizes
div max
mov dx,ax
mov bl,oldvalue
xor bh,bh
mov byte ptr [offset gaugetxt+bx],'Û'
cmp bx,0
jnz nono2
mov ah,21
mov cl,8
int 47h
mov bx,xy
mov ah,20
mov si,offset gaugetxt
int 47h
mov ah,21
mov cl,7
int 47h
nono2:
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
push ax dx
mov ax,cx
mul sizeof
div max
xor edx,edx
mov dx,sizeof
sub dx,ax
push dx
push 'Û'
mov dx,ax
push dx
push 'Û'
push offset gauges
call [print]
pop dx ax
retn
max dw 2879
sizeof dw 50
gauges db '\g10,18\c05%cM\c07%cM',0
imports:
db "VIDEO.LIB::print",0
print dd 0
dw 0
End Start