delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/12/18/10:15:11

Date: Fri, 18 Dec 92 08:40:43 EST
From: DJ Delorie <dj AT express DOT ctron DOT com>
To: A DOT APPLEYARD AT fs1 DOT mt DOT umist DOT ac DOT uk
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Gnu C interrupt 10hex mishandling pointer input register arg

>    (1) Compiling with NONEWDRIVER defined would cause a 'case label not in a
>switch' compile error!

We never compile that way.

>    (2) After the interrupt is called, line ZZ converts the system es:bp
>segmented address into the Gnu C epb nonsegmented address, OK. But vice-versa
>doesn't happen before the 'intr(0x10, &r);' to convert the input Gnu C ebp
>nonsegmented address into a system es:bp segmented address! I suggest, before
>the instruction 'tss2reg(&r);', inserting:-
>          rr._bp = tss_ptr->tss_ebp - 0xe0000000L; r.r_es = 0;

No.  You can't just convert that way.  When the application passes
pointers to DOS, the memory they point to must be physically copied
into a transfer buffer in real memory.  This is different for all
functions, so I did not implement it.  No int10 function that takes a
pointer will work.  The code to convert on the way back allows all
int10 functions that return pointers to BIOS data areas to work
correctly, as most do.

DJ
dj AT ctron DOT com
Life is a banana.

- Raw text -


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