Memory protecting

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
ManOfSteel

Memory protecting

Post by ManOfSteel »

Hello,
I was reading an old version of the FAQ I have on my PC and I saw in "Basic Information - Reaching Lino's level - Starting programs.", the sentence "Prevent your programs from writing directly to video memory.". How would I do so? Can it only be done with paging or what? Enlighten me (just the basic idea will suffice).
Thank you in advance for your help.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Memory protecting

Post by Pype.Clicker »

well, a very simple way would be to write all your programs yourself and write them so that they always call specific kernel services to write text to the screen.

As an alternative, your system could be providing some 'display buffer' that the program can use as some video memory but which may also be "offscreen".

Paging can indeed help here (e.g. mapping the display buffer to video memory when the program is focussed and to off-screen memory when the program is de-focussed).
Post Reply