Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

DPMI - how to chain user and original RM handler? (Developers)

posted by ecm Homepage E-mail, Düsseldorf, Germany, 29.04.2023, 08:43

> call es:[oldint15_handler] {DOES NOT WORK !!! (Crashes here)}
> {oldint15_handler is got from Get_rm_interrupt($15, oldint15_handler)}

You need to far call the downlink in Real/Virtual 86 Mode, not in PM. And you need a pushfw instruction before the far call.

> mov eax,ds:[esi+0] {restore return address
> (CS:IP)}
> mov es:[edi+2Ah],eax
>
> (*
> mov eax,ds:[esi+4] {do we have to do anything with flags?}
> mov es:[edi+20h],ax
> *)
>
> add word ptr es:[edi+2Eh],6 {updates SP}
> iret
> end;

You probably should restore the flags too.

---
l

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 86 users online (0 registered, 86 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum