delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2005/11/24/05:31:31

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Rod Pemberton" <dont_have AT bitbucket DOT cmm>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: XMS Move function(AH = 0x0B)
Date: Thu, 24 Nov 2005 05:21:11 -0500
Organization: Aioe.org NNTP Server
Lines: 61
Message-ID: <dm445q$ctf$1@domitilla.aioe.org>
References: <1132805974 DOT 565960 DOT 317470 AT g14g2000cwa DOT googlegroups DOT com> <dm442l$cp9$1 AT domitilla DOT aioe DOT org>
NNTP-Posting-Host: pCFjXAYAthfOLF6YhIh1ZA.user.domitilla.aioe.org
X-Complaints-To: abuse AT aioe DOT org
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MSMail-Priority: Normal
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"Rod Pemberton" <dont_have AT bitbucket DOT cmm> wrote in message
news:dm442l$cp9$1 AT domitilla DOT aioe DOT org...
>
> <blk5743 AT yahoo DOT com DOT tw> wrote in message
> news:1132805974 DOT 565960 DOT 317470 AT g14g2000cwa DOT googlegroups DOT com...
> > i want to move data between real mode memory and my buffer
> > how can i to do this?
> >
> > i built a structure(Move) to do this
> > what pamater should i fill
> >
> > i got transfer lenght = length
> > destinational buff = BYTE databuf[100]
> > handle(from AH=0x09)
> > phy_addr(from AH=0x0C)
> >
> > Move.length = length
> > Move.SHnd = ?
> > Move.Off = ?
> > Move.DHnd = ?
> > Move.Off = ?
> >
> > DS = ?
> > SI = ?
>
> I'm not sure why you created structure "Move"...
>
> Unlike OpenWATCOM, DJGPP has functions to transfer data between from RM to
> PM, and/or from PM to RM.  They are called "dosmemget" and "dosmemput",
> respectively.
>
> DJGPP also has pre-allocated RM memory called the "transfer buffer" which
> can be used to transfer data between RM and PM.  The transfer buffer is
> designed for to setup the data for RM DOS calls, or get the returned data
> from RM DOS calls.  The transfer buffer's size varies whether you use
> CWSDPMI or PMODEDJ (pmodetsr), but I believe it is about 32k.  It's
address
> is __tb.  It's offset is __tb_offset.  And, It's segment iis __tb_segment.
>
> Most of this information is in DJGPP's "libc.info".
>
> e.g.,
> To transfer RM memory of length "length" from RM "segment:offset" to PM
> "buffer", use this:
>
> offset32 = segment * 16 + offset;
> dosmemget(int offset32, int length, void *buffer);
>
> e.g.,
> To transfer PM memory of length "length" from PM "buffer" to RM
> "segment:offset", use this:
>
> offset32 = segment * 16 + offset;
> void dosmemput(const void *buffer, int length, int offset);

Correction:
void dosmemput(const void *buffer, int length, int offset32);



- Raw text -


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