feat: mise à jour du code pour compilation sur LZASM en stdcall
This commit is contained in:
parent
1742c77553
commit
1d17c0fc92
|
@ -1,80 +1,73 @@
|
||||||
.model tiny
|
model tiny,stdcall
|
||||||
.386c
|
p586N
|
||||||
.code
|
locals
|
||||||
|
jumps
|
||||||
|
codeseg
|
||||||
|
option procalign:byte
|
||||||
|
|
||||||
|
include "..\include\mem.h"
|
||||||
|
include "..\include\divers.h"
|
||||||
|
|
||||||
org 0h
|
org 0h
|
||||||
|
|
||||||
|
|
||||||
include ..\include\mem.h
|
|
||||||
|
|
||||||
start:
|
start:
|
||||||
header exe <,1,0,,,offset imports,,>
|
header exe <"CE",1,0,0,,offset imports,,offset realstart>
|
||||||
|
|
||||||
realstart:
|
realstart:
|
||||||
mov ah,28h
|
call [savestate]
|
||||||
int 47h
|
call [print],offset msg
|
||||||
push offset msg
|
mov bp,1000h
|
||||||
call [print]
|
xor di,di
|
||||||
mov bp,1000h
|
xor cx,cx
|
||||||
xor di,di
|
xor edx,edx
|
||||||
xor cx,cx
|
verifall:
|
||||||
xor edx,edx
|
mov ah,1
|
||||||
VerifAll:
|
int 16h
|
||||||
mov ah,1
|
jz nokey
|
||||||
int 16h
|
cmp al,' '
|
||||||
jz nokey
|
je enend
|
||||||
cmp al,' '
|
|
||||||
je enend
|
|
||||||
nokey:
|
nokey:
|
||||||
mov dx,di
|
mov dx,di
|
||||||
push edx
|
push edx
|
||||||
mov dx,cx
|
mov dx,cx
|
||||||
inc dx
|
inc dx
|
||||||
push edx
|
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
|
||||||
mov dx,ax
|
mov dx,ax
|
||||||
push edx
|
push edx
|
||||||
push offset msg2
|
call [print],offset msg2
|
||||||
call [print]
|
call gauge
|
||||||
call gauge
|
call [verifysector],cx
|
||||||
mov ah,2
|
jc errors
|
||||||
int 48h
|
je noprob
|
||||||
jc errors
|
inc di
|
||||||
je noprob
|
|
||||||
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
|
||||||
push offset error2
|
call [print],offset error2
|
||||||
call [print]
|
jmp someof
|
||||||
jmp someof
|
|
||||||
noatall:
|
noatall:
|
||||||
push offset noerror
|
call [print],offset noerror
|
||||||
call [print]
|
|
||||||
someof:
|
someof:
|
||||||
mov ah,0
|
mov ah,0
|
||||||
int 16h
|
int 16h
|
||||||
mov ah,29h
|
call [restorestate]
|
||||||
int 47H
|
retf
|
||||||
retf
|
|
||||||
errors:
|
errors:
|
||||||
push offset error
|
call [print],offset error
|
||||||
call [print]
|
mov ah,0
|
||||||
mov ah,0
|
int 16h
|
||||||
int 16h
|
call [restorestate]
|
||||||
mov ah,29h
|
retf
|
||||||
int 47H
|
|
||||||
retf
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
error db '\g10,10Erreur avec le lecteur de disquette !',0
|
error db '\g10,10Erreur avec le lecteur de disquette !',0
|
||||||
error2 db '\g10,10Le disque est defectueux, appuyez sur une touche pour quitter',0
|
error2 db '\g10,10Le disque est defectueux, appuyez sur une touche pour quitter',0
|
||||||
|
@ -83,31 +76,31 @@ msg db '\m02\e\c07\g29,00- Test de surface du disque -\g02,49<Pressez espace pou
|
||||||
msg2 db '\g10,20%u %%\g10,16%u cluster testes. \h34%u cluster defectueux. ',0
|
msg2 db '\g10,20%u %%\g10,16%u cluster testes. \h34%u cluster defectueux. ',0
|
||||||
|
|
||||||
gauge:
|
gauge:
|
||||||
push ax dx
|
push ax dx
|
||||||
mov ax,cx
|
mov ax,cx
|
||||||
mul sizeof
|
mul [sizeof]
|
||||||
div max
|
div [max]
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
mov dx,sizeof
|
mov dx,[sizeof]
|
||||||
sub dx,ax
|
sub dx,ax
|
||||||
push dx
|
push dx
|
||||||
push 'Û'
|
push 'Û'
|
||||||
mov dx,ax
|
mov dx,ax
|
||||||
push dx
|
push dx
|
||||||
push 'Û'
|
push 'Û'
|
||||||
push offset gauges
|
push offset gauges
|
||||||
call [print]
|
call [print]
|
||||||
pop dx ax
|
pop dx ax
|
||||||
retn
|
retn
|
||||||
|
|
||||||
max dw 2879
|
max dw 2879
|
||||||
sizeof dw 50
|
sizeof dw 50
|
||||||
|
|
||||||
gauges db '\g10,18\c05%cM\c07%cM',0
|
gauges db '\g10,18\c05%cM\c07%cM',0
|
||||||
|
|
||||||
imports:
|
importing
|
||||||
db "VIDEO.LIB::print",0
|
use VIDEO.LIB,print
|
||||||
print dd 0
|
use VIDEO,savestate
|
||||||
dw 0
|
use VIDEO,restorestate
|
||||||
|
use DISQUE,verifysector
|
||||||
End Start
|
endi
|
||||||
|
|
Loading…
Reference in New Issue