About the barebones tutorial
Posted: Fri May 02, 2014 11:22 pm
Why can we write to 0xB8000,Isn't the code segment is read-only?
The Place to Start for Operating System Developers
http://f.osdev.org/
Why do you think you're actually using the code segment for a data access?xtricman wrote:Isn't the code segment is read-only?
OK,but how can I know where's data where's code? At first I think when I use reference to memory like C pointer or assembly (%eax)it's using the %DS register by default, and when I use pop or push instruction it's using %SS as the selector, but when I use " movl $32 $start" and debug the kernel, I found it also worked.My code at start is overwrited .Why?Combuster wrote:Why do you think you're actually using the code segment for a data access?
It's always where you left it. It just appears to be a mess because you aren't conciously aware of where you left it.OK,but how can I know where's data where's code?