feat: mise à jour du code pour compilation sur LZASM en stdcall

This commit is contained in:
Nicolas Hordé 2007-03-24 19:52:56 +00:00
parent 1742c77553
commit 1d17c0fc92
1 changed files with 82 additions and 89 deletions

View File

@ -1,24 +1,26 @@
.model tiny
.386c
.code
model tiny,stdcall
p586N
locals
jumps
codeseg
option procalign:byte
include "..\include\mem.h"
include "..\include\divers.h"
org 0h
include ..\include\mem.h
start:
header exe <,1,0,,,offset imports,,>
header exe <"CE",1,0,0,,offset imports,,offset realstart>
realstart:
mov ah,28h
int 47h
push offset msg
call [print]
call [savestate]
call [print],offset msg
mov bp,1000h
xor di,di
xor cx,cx
xor edx,edx
VerifAll:
verifall:
mov ah,1
int 16h
jz nokey
@ -38,11 +40,9 @@ nokey:
div si
mov dx,ax
push edx
push offset msg2
call [print]
call [print],offset msg2
call gauge
mov ah,2
int 48h
call [verifysector],cx
jc errors
je noprob
inc di
@ -53,29 +53,22 @@ noprob:
enend:
cmp di,0
je noatall
push offset error2
call [print]
call [print],offset error2
jmp someof
noatall:
push offset noerror
call [print]
call [print],offset noerror
someof:
mov ah,0
int 16h
mov ah,29h
int 47H
call [restorestate]
retf
errors:
push offset error
call [print]
call [print],offset error
mov ah,0
int 16h
mov ah,29h
int 47H
call [restorestate]
retf
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
@ -85,10 +78,10 @@ msg2 db '\g10,20%u %%\g10,16%u cluster testes. \h34%u cluster defectueux.
gauge:
push ax dx
mov ax,cx
mul sizeof
div max
mul [sizeof]
div [max]
xor edx,edx
mov dx,sizeof
mov dx,[sizeof]
sub dx,ax
push dx
push 'Û'
@ -105,9 +98,9 @@ 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
importing
use VIDEO.LIB,print
use VIDEO,savestate
use VIDEO,restorestate
use DISQUE,verifysector
endi