i386 call gates in 32-bit segments ... 
Author Message
 i386 call gates in 32-bit segments ...

Hi everybody, I'm back again... Thanks to nice people I got my call gate
proc return to work. It was located in a 16-bit segment and was called from
the same segment by "callf gate_selector" and it returned by "db 66h" and
"retf". Now I have the call gate proc in a 32-bit (use32) segment and it
works all right when calling from a 16-bit segment (PL0) as before, but when
calling in the same way from any 32-bit segment (PL0 too) I get an exception.

None of the proc code runs when called from a 32bit seg, so I assume
something is wrong with the calling operation. Btw, now that I have the proc
in a 32bit segment, I don't need that "db 66h" prefixing the ret op anymore,
I suppose.

The 32-bit segment runs fine otherwise (default op size bit is set in the
descriptor but it is otherwise identical with the 16-bit one).

I checked the call op codes by a de{*filter*} and noticed that they were exactly
the same in both cases, 16 and 32 bit (9A 0000 5800). I thought that there
would be a longer argument in the 32 bit version (pword instead of dword).
I also tried appending another 4 zeroes to the code without success.

Do I have to use a different syntax (I used ideal mode) or what am I doing
wrong? I wish there were better examples in "i386/i486 adv. programming".

Thank you again.. Hope this is the last time I have to ask this basic
questions.

--
-----------------------------------------------------------------------------
     Ville Salmensuu  *  Juggernaut of The Ancients  *  IRC nick JUGGER

          Ancients WHQ    Strange Visions PCB +358-0-3464174 (v.32)



Mon, 07 Oct 1996 05:47:38 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. TASM and far jumps from 16-bit segment to 32-bit segment

2. Calling 32-bit FORTRAN dlls from 32-bit VB

3. 32-bit addr in 16-bit segments - help!!!

4. 16-bit to 32-bit segments

5. Division 32-Bit/32-Bit with 16-Bit Register

6. 16 bit Int21 call from 32 bit code?

7. Help Micro Focus 32 bit calling 16 bit c

8. Calling 32-bit DLLs from 16-bit code

9. 32 bit segments; multitasking

10. dumb me (i386 call gates)

11. i386 call gate return

12. i386 call gate ...

 

 
Powered by phpBB® Forum Software