Share screen memory

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Jane1991c
Posts: 22
Joined: Mon Oct 21, 2013 3:48 pm

Share screen memory

Post 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 ?
Nable
Member
Member
Posts: 453
Joined: Tue Nov 08, 2011 11:35 am

Re: Share screen memory

Post 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.
Post Reply