Mail Archives: djgpp/2000/06/15/18:01:00
Hello.
Alvin Lau wrote:
> 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 ?
Please note that my knowledge of assembly is a bit limited. The way I
understand it, the form "lcall _oldtimer" retrieves the selector and
offset from the memory address 'oldtimer'. I think the form "lcall
$selector, $offset" uses registers instead. If you use the __dpmi_paddr
structure, then you have to use the form with 'oldtimer'. As I suggested
in my previous post, you'd be better off using 'lcall _oldtimer' to be
compatible with binutils 2.8.1 & binutils 2.9.5.1 beta.
I think you are confused because of the order. The structure is the way
things are stored in memory. The second form ("lcall $selector, $offset")
is independent of how things are stored, since you're using mnemonics -
for instance, AT&T syntax and Intel syntax have different parameter orders
for some instructions, but the same code will be generated.
HTH, bye,
--
Richard Dawe
[ mailto:richdawe AT bigfoot DOT com | http://www.bigfoot.com/~richdawe/ ]
- Raw text -