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

This commit is contained in:
Nicolas Hordé 2007-03-28 15:53:56 +00:00
parent 2f20a86d11
commit e1b6696324
1 changed files with 66 additions and 89 deletions

View File

@ -1,96 +1,69 @@
.model tiny model tiny,stdcall
.486 p586N
smart locals
.code 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,7 call [cs:mballoc],65535
mov cx,65535
int 49h
jc problem3 jc problem3
push gs push ax
pop es pop es
mov ah,7 call [cs:projfile],offset logo
mov cx,65535
int 49h
jc problem3
mov si,offset logo
mov ah,4
xor di,di
int 48h
jc problem jc problem
mov ecx,eax
call [cs:mbfind],offset logo
push es call [cs:decompressrle],ax,0,es,0,cx
pop ds
push gs
pop es
xor si,si
xor di,di
mov ah,6
int 48h
jc problem2 jc problem2
push es push es
pop ds pop ds
call [cs:savestate]
mov ah,28h call [cs:setvideomode],word 8
int 47h call [cs:clearscreen]
mov ax,0008h call [cs:loadbmppalet],word 0
int 47h call [cs:showbmp],word 0,word 20,word 150
mov ah,2
int 47h
push 0
call cs:[loadbmppalet]
push 150
push 20
push 0
call cs:[showbmp]
jc problem4 jc problem4
push cs push cs
pop ds pop ds
push offset poper push offset poper
call [print] call [cs:print]
endofit: endofit:
xor ax,ax xor ax,ax
int 16h int 16h
mov ah,29h call [cs:restorestate]
int 47h
retf retf
problem: problem:
push cs push cs
pop ds pop ds
push offset error call [cs:print],offset error
call [print]
jmp endofit jmp endofit
problem2: problem2:
push cs push cs
pop ds pop ds
push offset error2 call [cs:print],offset error2
call [print]
jmp endofit jmp endofit
problem3: problem3:
push cs push cs
pop ds pop ds
push offset error3 call [cs:print],offset error3
call [print]
jmp endofit jmp endofit
problem4: problem4:
push cs push cs
pop ds pop ds
push offset error4 call [cs:print],offset error4
call [print]
jmp endofit jmp endofit
poper db '\c0BC\c0CO\c0DS\c0E2\c0E0\c0E0\c0F0 en mode graphique',0 poper db '\c0BC\c0CO\c0DS\c0E2\c0E0\c0E0\c0F0 en mode graphique',0
@ -103,12 +76,16 @@ error2 db '\c04Une erreur est apparue lors de la decompression de l''image',0
error4 db '\c0FUne erreur est apparue lors de l''affichage de l''image',0 error4 db '\c0FUne erreur est apparue lors de l''affichage de l''image',0
imports: importing
db "VIDEO.LIB::print",0 use VIDEO,restorestate
print dd 0 use VIDEO,savestate
db "BMP.LIB::showbmp",0 use VIDEO,setvideomode
showbmp dd 0 use VIDEO,clearscreen
db "BMP.LIB::loadbmppalet",0 use DISQUE,decompressrle
loadbmppalet dd 0 use DISQUE,projfile
dw 0 use SYSTEME,mbfind
end start use SYSTEME,mballoc
use VIDEO.LIB,print
use BMP.LIB,showbmp
use BMP.LIB,loadbmppalet
endi