Page 1 of 1

Share screen memory

Posted: Tue Nov 12, 2013 2:37 pm
by Jane1991c
Hey, I have got ES segment for 80x25 video memory

I have a TASK with 3 privilege level. How to access video memory by this TASK ?

Re: Share screen memory

Posted: Tue Nov 12, 2013 2:45 pm
by Nable
You've provided too little information, so try harder, please.
Ok, from `TASK with 3 privilege level' one can assume that you're using x86 in 32-bit protected mode. Then if you don't use paging (btw, this isn't a good idea), so you just need to properly configure LDT/GDT (base address, limit, granularity, access rights) for the selector pointed by ES register.
If you use paging, then you also need to properly (caching type = uncached) map that video memory region into task's address space. It's also a good idea to set base=0 and limit=-1 (flat address space) for your segment selectors in this case.