Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Interrupts and FAR calls from DPMI (Developers)

posted by Khusraw E-mail, Bucharest, Romania, 28.02.2012, 17:19
(edited by Khusraw on 28.02.2012, 17:38)

> I see. Thank you, I didn't know about function
> __dpmi_simulate_real_mode_procedure_retf_stack
>
> It is not in Freepascal's GO32 unit but I can code it in assembler - no
> problem.

If you can code it in assembler, better push the parameters on your PM stack (as words if their size is smaller than dword, i.e. "pushw" or "push word"), and fill CX with the total number of words pushed. Before executing the interrupt, ESP has to point to the last parameter pushed.
If you still want to use your own RM stack:
regs_ss:regs_sp has to point to the end of the DOS memory buffer minus the size of parameters, the parameter values having to be copied at its end. The buffer has to be large enough because the procedure may use stack allocated local variables etc.

---
Glory to God for all things

 

Complete thread:

Back to the forum
Board view  Mix view
22760 Postings in 2121 Threads, 402 registered users (1 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum