delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/10/29/08:42:07

Date: Sat, 29 Oct 1994 11:08:31 GMT
From: mark AT samson DOT demon DOT co DOT uk (Mark Simmons)
Reply-To: mark AT samson DOT demon DOT co DOT uk
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: accessing real mode regs from gcc
Lines: 47

Newsgroups: comp.os.msdos.programmer
From: mark AT samson DOT demon DOT co DOT uk (Mark Simmons)
Path: samson.demon.co.uk!demon!samson.demon.co.uk!mark
Subject: accessing real mode registers from gcc
Organization: at home
Reply-To: mark AT samson DOT demon DOT co DOT uk
X-Newsreader: Simple NEWS 2.0 (ka9q DIS 1.24)
Lines: 34
Date: Thu, 27 Oct 1994 21:29:45 +0000
Message-ID: <783293385snz AT samson DOT demon DOT co DOT uk>
Sender: usenet AT demon DOT co DOT uk

I have recently started using gcc and I am converting a MSC program
to run under protected mode so that I may do some extended memory 
addressing. Fine, but this program uses routines in a commercial TSR 
via interupt 80h and causes a segmentation fault. I'm told
this is because a different interupt vector table is used when in
protected mode. So the question is what are the magic incantations
required to convert these int86x calls - given my ignorance of 
Intel/DOS arcane ?

For example, the following is a fragment of the MSC version:-

unsigned int IntrNum=0x80; 
 union   REGS     regs;
 struct  SREGS    segregs;
{
    regs.x.bx = 0x01;
    int86x(IntrNum, &regs, &regs, &segregs); /* problem for gcc */
    if (regs.x.cflag)
    {
       printf("Error!");
       exit(1);
    }
    return (0);
}

What are the equivalent _go32 calls or do I have to switch back to 
real mode somehow ?

Any help via email would be appreciated.

-- 
Mark Simmons Email: mark AT samson DOT demon DOT co DOT uk  Voice: +44 (0)483 714946




- Raw text -


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