Welcome to OSDev forum!
Strong214356 wrote:
when my machine start there is an blue screen which is normal
No it's not normal. With bochs, you should see messages in white on black background.
Strong214356 wrote:
but my machine is rebooting again and again
That's because you made an error which causes an exception, but you haven't set up exception handlers yet, which cause another exception, so you end up with a triple fault, that reboots the CPU.
Strong214356 wrote:
I am on linux I use BOCHS os emulator
You can configure bochs to drop you in the debugger in case of a triple fault. It can also print the exceptions, so you can see where the first exception happens. Add these to your bochs.rc file:
Code:
info: action=report
error: action=report
panic: action=ask
If you really are on linux, then
these won't work:
Code:
config_interface: win32config
display_library: win32
Replace them with correct drivers.
Strong214356 wrote:
Yeah, watching a youtube tutorial is not something that you do with OSDev. This isn't a user space application usage kind of thing, developing an OS is very very HARD, and
requires lots and lots of knowledge and experience. Watching some video won't substitute that experience.
You probably should start by reading our wiki instead of watching youtube. Here are some links:
-
Introduction-
Beginner Mistakes-
Getting Started-
Using BochsNow, about your
bootloader.asm, there are so many things wrong with it.
- you assume that your code is loaded and executed at 0:0x7C00 (requires ORG 0x7C00), but it could be 0x7C0:0 (requires ORG 0) as well (read more about real mode segmentation to learn why these two result in the same linear address).
- you should start your code with a short jump, some BIOS checks for this
- you haven't set up the segment registers (you can't access data otherwise, and you haven't set up code segment either)
- you haven't set up a stack (you can't use the "call" instruction otherwise)
- you haven't set the CPU flags (most notably the direction and interrupt flags)
Cheers,
bzt