www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/03/01/22:45:26

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Lines: 37
X-Admin: news AT aol DOT com
From: captainpita AT aol DOT com (Captainpita)
Newsgroups: comp.os.msdos.djgpp
Date: 02 Mar 2002 03:31:26 GMT
Organization: AOL http://www.aol.com
Subject: Questions about using __dpmi_int()
Message-ID: <20020301223126.15546.00000921@mb-fi.aol.com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello,

  I have abandoned "segread" and int86 and have gone thru section 18.2 to
understand what is going on so I can migrate my program to DJGPP. The example
in 18.2 shows how to get data FROM a DOS interrupt, but how do you pass data TO

a DOS interrrupt? Section 18.2 states that the "transfer buffer" is what all
data must pass thru.
   I looked at the doc for the TSR I am using and here is a brief overview of
how to interface with it....

AX ===> usual interrupt setup stuff
CX ===> number of chars to send
DS:DX ===> address of data to send (transfer buffer?)

Here is the portion of my code that configures the interrupt and sets how many
chars to send, that I understand.

inregs.x.ax = 0x0101;   /* setup int */
inregs.x.cx = length;    /* number of bytes to send */

So here some the questions.......
1.) How do I get the data to send into the "transfer buffer"  which points to
DS:DX. My program has the data to send contained in a char pointer. 

inregs.x.ds = __tb >>4;      
inregs.x.dx = __tb & 0X0f;

2.)  The data segment (DS) appears to be the transfer buffer shifted to the
right by        four bits. Is this true forever?
3.)  The offset (DX) appears to be the transfer buffer "anded" with 0X0F. Is
this also       true forever? 

Thanks for your help!

  

- Raw text -


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