delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/15/07:16:59

From: "Alvin Lau" <alvin_lau AT yahoo DOT com>
Newsgroups: comp.os.msdos.djgpp
References: <39470e99 AT newsgate DOT hknet DOT com> <200006140615 DOT LAA03124 AT midpec DOT com> <394734f0$1 AT newsgate DOT hknet DOT com> <200006141715 DOT WAA01487 AT www DOT midpec DOT com> <3947F612 DOT 784F2FCC AT phekda DOT freeserve DOT co DOT uk>
Subject: Re: How to write protected mode far call in AT&T style
Date: Thu, 15 Jun 2000 18:56:43 +0800
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2014.211
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
X-Original-NNTP-Posting-Host: ts1515.hknet.com
Message-ID: <3948b53b@newsgate.hknet.com>
NNTP-Posting-Host: news.hknet.com
X-Trace: 15 Jun 2000 19:06:49 +0800, news.hknet.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

According the definition:

typedef struct {
  unsigned long  offset32;
  unsigned short selector;
} __dpmi_paddr;

The offset32 is followed by selector.
But Prashant TR said "lcall $selector,$offset"
Should be selector first then offset second.
So, does "lcall *_oldtimer" still correct ?

Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk> wrote in message
news:3947F612 DOT 784F2FCC AT phekda DOT freeserve DOT co DOT uk...
> Hello.
>
> Prashant TR wrote:
> > I'm not sure since I haven't written such code in AT&T style
> > before. But I think this should do it:
> >
> > lcall _oldtimer   # possibly this is equivalent to
> >                   # call fword ptr [_oldtimer]?
> [snip]
> > > My selector and offset value are put in variables:
> > > __dpmi_paddr oldtimer;
> > > oldtimer.selector;
> > > oldtimer.offset32;
>
> Since oldtimer is an absolute address, you need:
>
> lcall *_oldtimer
>
> However, IIRC this will not compile with binutils 2.8.1. If you need the
> code to be compatible with binutils 2.9.5.1 beta and 2.8.1, then omit the
> asterisk (*). This syntax correction between 2.8.1 and 2.9.5.1 beta is a
> PITA.
>
> Bye,
>
> --
> Richard Dawe
> [ mailto:richdawe AT bigfoot DOT com | http://www.bigfoot.com/~richdawe/ ]


- Raw text -


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