delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/17/12:17:02

From: "Lucas Panian" <mpanian AT awinc DOT com>
Subject: Need help with Pointers
Newsgroups: comp.os.msdos.djgpp
Message-ID: <01bd51c3$bab15ba0$3af234d1@mpanian.awinc.com>
NNTP-Posting-Host: 209.52.242.58
Date: 17 Mar 1998 08:42:54 -0800
Lines: 21
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hi there,

How do you load a pointer, say, to a structure, into ES:DI or the likes,
using C/C++?
I don't want to do it in assembly yet, 'cause I need to get the basic idea
down. Anyway, this is for Vesa extensions, and I'm trying to call 0x4F00,
which has to have a Pointer to a structure in ES:DI. So for, I have just
used __dpmi_regs for registers, and the __dpmi_int() for calling interupts.
I init'ed all the values in the structure to 0 before putting it in, and it
came back untouched! Are there some kind of functions that you can call on
a pointer to return the Offset/Segment that it holds? I tried using the
high/low words of the pointer and loaded them into ES:DI, but that doesn't
seem to work....anybody know what's going on?

On the same note, if a pointer to a string was returned through an interupt
call, in ES:DI, how would you load it into a 'char *', using C/C++?

thanks lots,

Luke
mpanian AT awinc DOT com

- Raw text -


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