Page 1 of 1

print char on screen from Linux

Posted: Wed Nov 22, 2006 2:21 pm
by belhifet
Linux doesn't let me access memory address 0xb8000 and therefore, I cannot implement my own putchar() function.

How would I print a char on the screen in Linux without using any system calls or glibc?

I've seen vm86, could someone give an example and explain how it works?
Also, is it possible to do it with another way (without vm86)?

edit: Could I possibly write my own system call that writes to the memory address 0xb8000 and make it work? Or would the kernel still protect that address?

Posted: Wed Nov 22, 2006 2:27 pm
by kataklinger
Well I'm not a Linux expert (not even a user) but I think you cannot access video memory from user code becase that it's marked as a system memory, so you must be in kernel mode to use it!