feat: utilisation de la librairie bmp.lib plutot que l'int 47h

This commit is contained in:
Nicolas Hordé 2004-11-30 19:27:59 +00:00
parent 1b835928d9
commit 306c0ed771
1 changed files with 52 additions and 38 deletions

View File

@ -1,10 +1,16 @@
.model tiny .model tiny
.386c .486
smart
.code .code
org 0h org 0h
include ..\include\mem.h
start: start:
header exe <,1,0,,,offset imports,,>
realstart:
mov ah,7 mov ah,7
mov cx,65535 mov cx,65535
int 49h int 49h
@ -34,7 +40,6 @@ jc problem2
push es push es
pop ds pop ds
xor si,si
mov ah,28h mov ah,28h
int 47h int 47h
@ -42,59 +47,68 @@ mov ax,0008h
int 47h int 47h
mov ah,2 mov ah,2
int 47h int 47h
mov cx,300 push 0
mov bx,30 call cs:[loadbmppalet]
mov ah,37 push 150
int 47h push 20
mov ah,15h push 0
mov cl,11 call cs:[showbmp]
int 47h jc problem4
push cs push cs
pop ds pop ds
mov ah,13 push offset poper
mov si,offset poper call [print]
int 47h endofit:
mov ax,0 xor ax,ax
int 16h int 16h
mov ah,29h mov ah,29h
int 47h int 47h
db 0CBH retf
problem: problem:
push cs push cs
pop ds pop ds
mov ah,13 push offset error
mov si,offset error call [print]
int 47h jmp endofit
mov ax,0
int 16h
db 0CBh
problem2: problem2:
push cs push cs
pop ds pop ds
mov ah,13 push offset error2
mov si,offset error2 call [print]
int 47h jmp endofit
mov ax,0
int 16h
db 0CBh
problem3: problem3:
push cs push cs
pop ds pop ds
mov ah,13 push offset error3
mov si,offset error3 call [print]
int 47h jmp endofit
mov ax,0
int 16h
db 0CBh
poper db 'COS2000 en mode graphique',0 problem4:
push cs
pop ds
push offset error4
call [print]
jmp endofit
poper db '\c0BC\c0CO\c0DS\c0E2\c0E0\c0E0\c0F0 en mode graphique',0
logo db 'cos.rip',0 logo db 'cos.rip',0
ok1 db 'Chargement de l''image OK',0 ok1 db 'Chargement de l''image OK',0
ok2 db 'Decompression de l''image OK',0 ok2 db 'Decompression de l''image OK',0
error3 db 'Une erreur est apparue lors de l''allocation de mémoire',0 error3 db '\c04Une erreur est apparue lors de l''allocation de mémoire',0
error db 'Une erreur est apparue lors du chargement de l''image',0 error db '\c04Une erreur est apparue lors du chargement de l''image',0
error2 db 'Une erreur est apparue lors de la decompression de l''image',0 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
imports:
db "VIDEO.LIB::print",0
print dd 0
db "BMP.LIB::showbmp",0
showbmp dd 0
db "BMP.LIB::loadbmppalet",0
loadbmppalet dd 0
dw 0
end start end start