Re: Real mode int from protected mode and back



I made the int 61h call directly from the code, without DPMI 31h 300h.
Worked fine. I couldnt believe it. Even the file routines are ok. I
can log outs and ins and maniulate them as i want.
Now the only problem I have is to pass the in result to the main
application through ax. I think you all already know the problem...
pop ax before iret would destroy it. I am doing a
asm mov word ptr[bp+16], ax;
before the ISR ends, but I don´t know if this is the correct approach,
because of the stack swap, etc....
Here is the ISR code:

seg000:0291 push ax
seg000:0292 push bx
seg000:0293 push cx
seg000:0294 push dx
seg000:0295 push es
seg000:0296 push ds
seg000:0297 push si
seg000:0298 push di
seg000:0299 push bp
seg000:029A mov bp, seg dseg
seg000:029D mov ds, bp
seg000:029F mov bp, sp

....................................
mov word ptr[bp+16], ax; would be here

seg000:02B4 pop bp
seg000:02B5 pop di
seg000:02B6 pop si
seg000:02B7 pop ds
seg000:02B8 pop es
seg000:02B9 pop dx
seg000:02BA pop cx
seg000:02BB pop bx
seg000:02BC pop ax
seg000:02BD iret

.