From: "Guido Bursch" Newsgroups: comp.os.msdos.djgpp Subject: Why add 36008 to offset to reach buffer? Date: 11 Apr 1997 00:37:22 GMT Organization: Westfaelische Wilhelms-Universitaet Muenster, Germany Sender: "Guido Bursch" Message-ID: <5ik142$jro@majestix.uni-muenster.de> NNTP-Posting-Host: pppe023.uni-muenster.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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).