diff --git a/programs/logo.asm b/programs/logo.asm index cae2394..8f69127 100644 --- a/programs/logo.asm +++ b/programs/logo.asm @@ -1,97 +1,70 @@ -.model tiny -.486 -smart -.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,7 -mov cx,65535 -int 49h -jc problem3 -push gs -pop es -mov ah,7 -mov cx,65535 -int 49h -jc problem3 -mov si,offset logo -mov ah,4 -xor di,di -int 48h -jc problem - - -push es -pop ds -push gs -pop es -xor si,si -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] +realstart: + call [cs:mballoc],65535 + jc problem3 + push ax + pop es + call [cs:projfile],offset logo + jc problem + mov ecx,eax + call [cs:mbfind],offset logo + call [cs:decompressrle],ax,0,es,0,cx + jc problem2 + push es + pop ds + call [cs:savestate] + call [cs:setvideomode],word 8 + call [cs:clearscreen] + call [cs:loadbmppalet],word 0 + call [cs:showbmp],word 0,word 20,word 150 + jc problem4 + push cs + pop ds + push offset poper + call [cs:print] endofit: -xor ax,ax -int 16h -mov ah,29h -int 47h -retf + xor ax,ax + int 16h + call [cs:restorestate] + retf problem: -push cs -pop ds -push offset error -call [print] -jmp endofit + push cs + pop ds + call [cs:print],offset error + jmp endofit problem2: -push cs -pop ds -push offset error2 -call [print] -jmp endofit + push cs + pop ds + call [cs:print],offset error2 + jmp endofit problem3: -push cs -pop ds -push offset error3 -call [print] -jmp endofit + push cs + pop ds + call [cs:print],offset error3 + jmp endofit problem4: -push cs -pop ds -push offset error4 -call [print] -jmp endofit + push cs + pop ds + call [cs:print],offset error4 + jmp endofit poper db '\c0BC\c0CO\c0DS\c0E2\c0E0\c0E0\c0F0 en mode graphique',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 -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 +importing +use VIDEO,restorestate +use VIDEO,savestate +use VIDEO,setvideomode +use VIDEO,clearscreen +use DISQUE,decompressrle +use DISQUE,projfile +use SYSTEME,mbfind +use SYSTEME,mballoc +use VIDEO.LIB,print +use BMP.LIB,showbmp +use BMP.LIB,loadbmppalet +endi