www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/07/13:12:42

Message-Id: <199608071705.KAA08835@bluesky>
Comments: Authenticated sender is <kbaca AT bluesky>
From: "Kevin Baca" <kbaca AT bluesky DOT com>
To: singerb AT expert DOT cc DOT purdue DOT edu (Bryan Singer), djgpp AT delorie DOT com
Date: Wed, 7 Aug 1996 10:07:59 +0000
MIME-Version: 1.0
Subject: Re: Inline ASM -- video buffer help!

> I have a question about this code that was posted here.
> What is the variable "DosBase"?
> Everything else works, but I don't know what DosBase is.
> 
> 
> Here's the code:
> 
> void bitmap_to_video(struct MemBuf Buffer){
> 
> 	__asm__ __volatile__ ("
> 	pushw %%es;
> 	pushw %%ds;
>    pushl %%esi;
> 	pushl %%edi;
> 	movw  %0, %%es;
> 	movl  %1, %%ds;
> 	xorl  %%esi, %%esi;
> 	movl  $16000, %%ecx;
> 	movl  $0xa0000, %%edi;
> 	repz;
> 	movsl;
> 	popl  %%edi;
> 	popl  %%esi;
> 	popw  %%ds;
> 	popw  %%es"
> 	:

I don't see any DosBase here in this code but I assume it's the 
segment selector for conventional DOS memory.  This value is also 
stored in _go32_info_block.selctor_for_linear_memory.  You can get at 
_go32_info_block by including go32.h in your program.

-Kevin

- Raw text -


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