delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/14/13:00:58

From: "Guido Bursch" <bursch AT uni-muenster DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Why add 36008 to offset to reach buffer?
Date: 11 Apr 1997 00:36:59 GMT
Organization: Westfaelische Wilhelms-Universitaet Muenster, Germany
Sender: "Guido Bursch" <bursch AT uni-muenster DOT de>
Message-ID: <5ik13b$jro@majestix.uni-muenster.de>
NNTP-Posting-Host: pppe023.uni-muenster.de
Mime-Version: 1.0
Lines: 29
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi all!

I have a question for my little virtual screen program.
I made up a virtual scree in mode 13h with:

unsigned char virtscreen[64000];

Then I try to access it via inline-asm:

__asm__("
  pushl %%eax\n
  movl $36008, %%eax\n  ?????
  movb $15, %0(,%%eax,1)\n
  popl %%eax"
  :
  : "m"(&virtscreen)
);

and then copy it with dosmemput or movedata to video memory.
It changes the first pixel to white (what I want).
But why I have to add 36008 to the 'offset' (eax) to
reach the first pixel?
It would be great, if anyone would tell me what I'm
doing wrong.

               Thanks alot!!

BTW: Please dont't email me personally (it may cause problems).

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019