Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

PSP manipulation from DPMI programs (Developers)

posted by tkchia Homepage, 16.02.2023, 11:26

Hello Laaca,

> And mainly this part is confusing to me:
> The environment pointer in the client program's PSP is automatically converted to a selector during the mode switch.

Also: this part is not really that confusing, at least not to me.

It just means that the value in PSP:0x2c is a segment selector value which you can directly use in protected mode, not a real/V86 mode paragraph value.

Since your program is already running in protected mode anyway, there should not be any difficulty in copying bytes from a protected mode segment:offset address (vs. copying from a real/V86 mode segment:offset address).

E.g. 0x123:0 means you can read straight away from 0x123:0 in protected mode, rather than having to convert 0x123 to a linear address 0x00001230 and then mapping virtual memory for it etc.

Thank you!

---
https://gitlab.com/tkchia · https://codeberg.org/tkchia · 😴 "MOV AX,0D500H+CMOS_REG_D+NMI"

 

Complete thread:

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