feat: mise à jour du code pour compilation sur LZASM en stdcall
This commit is contained in:
parent
1742c77553
commit
1d17c0fc92
|
@ -1,24 +1,26 @@
|
||||||
.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
|
|
||||||
call [print]
|
|
||||||
mov bp,1000h
|
mov bp,1000h
|
||||||
xor di,di
|
xor di,di
|
||||||
xor cx,cx
|
xor cx,cx
|
||||||
xor edx,edx
|
xor edx,edx
|
||||||
VerifAll:
|
verifall:
|
||||||
mov ah,1
|
mov ah,1
|
||||||
int 16h
|
int 16h
|
||||||
jz nokey
|
jz nokey
|
||||||
|
@ -38,11 +40,9 @@ nokey:
|
||||||
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
|
||||||
mov ah,2
|
call [verifysector],cx
|
||||||
int 48h
|
|
||||||
jc errors
|
jc errors
|
||||||
je noprob
|
je noprob
|
||||||
inc di
|
inc di
|
||||||
|
@ -50,32 +50,25 @@ 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
|
||||||
mov ah,29h
|
call [restorestate]
|
||||||
int 47H
|
|
||||||
retf
|
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
|
||||||
noerror db '\g10,10Pas de secteurs defectueux, appuyez sur une touche pour continuer',0
|
noerror db '\g10,10Pas de secteurs defectueux, appuyez sur une touche pour continuer',0
|
||||||
|
@ -85,10 +78,10 @@ msg2 db '\g10,20%u %%\g10,16%u cluster testes. \h34%u cluster defectueux.
|
||||||
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 'Û'
|
||||||
|
@ -105,9 +98,9 @@ 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