well you will have to open a new segment for the extrn : newseg segment extrn dat1 ends
this way you will avoid passing the 64k, if your data passes 64k then split it or use protected mode (how, learn it, it ain't easy) ; writing a picture to screen (graphic) program example ; uses dos,crt ; var z:file ; begin assign (z,'pic.dat') ; rewrite (z,1) ; blockwrite (z,mem[$a000:0],64000) ; close (z) ; end. 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,13h int 10h ; goes to graphic mode 320*200*256 mov ax,seg dat1 ; points to extrn seg mov ds,ax mov si,offset dat1 mov ax,0a000h ; adress of screen mov es,ax mov di,0 mov cx,32000 ; and,,.... it's on the screen rep movsw mov ax,0 int 16h ; pause mov ax,3 int 10h ; goes back to text pop ds mov ax,4c00h int 21h ends end start end compiling : "binobj pic.dat pic.obj dat1" "tasm filename" "tlink filename pic" and run the program
|