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,97 +1,70 @@
.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 jc problem3
int 49h push ax
jc problem3 pop es
push gs call [cs:projfile],offset logo
pop es jc problem
mov ah,7 mov ecx,eax
mov cx,65535 call [cs:mbfind],offset logo
int 49h call [cs:decompressrle],ax,0,es,0,cx
jc problem3 jc problem2
mov si,offset logo push es
mov ah,4 pop ds
xor di,di call [cs:savestate]
int 48h call [cs:setvideomode],word 8
jc problem call [cs:clearscreen]
call [cs:loadbmppalet],word 0
call [cs:showbmp],word 0,word 20,word 150
push es jc problem4
pop ds push cs
push gs pop ds
pop es push offset poper
xor si,si call [cs:print]
xor di,di
mov ah,6
int 48h
jc problem2
push es
pop ds
mov ah,28h
int 47h
mov ax,0008h
int 47h
mov ah,2
int 47h
push 0
call cs:[loadbmppalet]
push 150
push 20
push 0
call cs:[showbmp]
jc problem4
push cs
pop ds
push offset poper
call [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
logo db 'cos.rip',0 logo db 'cos.rip',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