Re: Real mode int from protected mode and back Opções



.text:000CF2B9 mov bp, ax ; I
need the save ax
as argument to the int...
I
really don´t know if I could do this

it's useless because ...

.text:000CF2C8 mov ebx, 61h
.text:000CF2CD mov ecx, 0
.text:000CF2D2 mov edi, offset word_118F10 ;
also
taken from the code
.text:000CF2D7 mov ax, 300h
.text:000CF2DB int 31h ; DPMI

the int 31h, ax=300h will load the registers from a structure which
ES:EDI point to.

Since your real-mode int 61h handler apparently just needs e/ax and e/
dx and no segment registers, there's no need at all to use the DPMI
int 31h to execute an int 61h. Just fill eax and edx and call the int
61h directly in protected-mode. The DPMI host will automatically route
it to real-mode.



.



Relevant Pages

  • Re: amd64_set_gsbase()
    ... void my_handler(int s) ... signal(SIGSEGV, SIG_DFL); ... That does not work, i.e., %gs vs. base address mapping is not ... we don't really care about segment registers. ...
    (freebsd-questions)
  • Re: porting DOS asm code on linux
    ... The segment registers *are* part of the address, ... The int 21h should be easy to replace with a Linux function. ... offset and segment are used), but for 32-bit code, you want just "ret". ...
    (alt.lang.asm)
  • Re: 32.bit com
    ... >> The DPMI host acts just like a typical DOS extender. ... Although the DPMI host monitors for Int 21H Function 4CH in protected ...
    (alt.lang.asm)