1

I have developed a small x86 'Hello World' Linux-based OS. I just created the files loader.s, linker.ld and main.c then I used the GRUB loader to boot my OS using bochs emulator in Ubuntu.

I just accessed the video memory and displayed the 'hello world' string to screen. And I debugged my OS using bochs, the cr0 PM value is set to 1, so i think my OS is directly entering to protected mode instead of entering to real mode.

And my question is how should I enter into real mode directly without entering to protected mode? After this how can I call BIOS interrupts to get the initial hardware details like HDD, RAM, Processor, etc...

pppery
  • 3,731
  • 22
  • 33
  • 46
Mohanraj
  • 4,056
  • 2
  • 22
  • 24

1 Answers1

1

I do not also have a lot of knowledge about this subject but i have a piece of code which runs from a bootable CD/DVD. at the beginning the program starts at real mode, displays my name and then switches to protected mode and displays my name again. i give a link so that it may help you. you can download it from here