Mail Archives: djgpp/1996/04/18/03:33:47
I noticed some strange things doing this sequence:
() allocate some memory
() setup a code selector for it
() set its limit to 0xffffffff
() put a RETF opcode to its offset 0
() issue a far call to the selector's offset 0
whenver I do this I get a protection fault at eip=0. However, if
I change the segment limit to 0xfffeffff, the problem goes away. Well,
this is not a solution for me, so I found out the following: if I put
the RETF opcode (0xcb) to the offset 16 of the segment and make a far call
to it's offset 16, everything works, even with a segment limit of 0xffffffff.
How come? My only guess is this could be alignment problem, but I think
alignment controll flag is off under most DPMIS. Ah, I forgot. The above
behaviour happens under most DPMIs: CWSDPMI, QDPMI, OS/2 and Win31. Thus I
guess this might be a CPU problem.
Martynas
- Raw text -