LESSON9 - INCLUDING INFO IN THE EXE |
the method to this is almost the same as extrn/public, the way to this is using the prog "binobj" which comes with tp/bp or bc/tc and use is a following : "binobj" <InputFileName> <OutputFileName> <PublicName> lets say we have pic.dat and we want the public to be dat1 then : "binobj pic.dat pic.obj dat1" and <- lets say it was a data of screen made with pascal : program example ; uses dos,crt ; var z:file ; begin assign (z,'pic.dat') ; rewrite (z,1) ; blockwrite (z,mem[$b800:0],4000) ; close (z) ; end. this will give us a screen file, and now how to show it : sseg segment db 10 dup (?) ends cseg segment assume cs:cseg,ss:sseg,ds:cseg,es:nothing extrn dat1:far start : push ds ; we must save it mov ax,seg dat1 ; points to extrn seg mov ds,ax mov si,offset dat1 mov ax,0b800h ; adress of screen mov es,ax mov di,0 mov cx,2000 ; to speed up use movsw (4000 bytes/2) rep movsw pop ds mov ax,4c00h int 21h ends end start end this will write the pic to the screen, compiling goes like that : "binobj ...." "tasm filename.asm" "tlink filename pic.obj" and that's it, but what if we use a picture, then ???
|