How to debug the read sector

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
gaiety

How to debug the read sector

Post by gaiety »

Ok, so far my bootstrap has able to boot and print a welcome message. So, now it is time to read the kernel image file. I have a few question.

CPU: Pentium 433hz
Compiler: Nasm

#1 How to debug the sector we read is the correct sector. I am new to OS and asm and it is the first time I use bios read. Any idea how to debug it. I am planing to read multi sector by using al = number of sector to read.

#2 I am using bochs. However, I need to create a floppy image, how to manage the file in the image. Any software that is free(If easy to use is the better) for use. I have download winimage but it is a limit time software.

#3 there is any example for simple os that I can download, the os I have is freedos, but the code is too hard for me. Any simple OS that is still in developing? I found some example of os but most of it is bootstrap. Thank you.

Thank you for answer my question.
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:How to debug the read sector

Post by Pype.Clicker »

gaiety wrote:
#1 How to debug the sector we read is the correct sector. I am new to OS and asm and it is the first time I use bios read. Any idea how to debug it. I am planing to read multi sector by using al = number of sector to read.
A simple trick is to load the sector in video memory first, then move it somewhere else.
A more evolved trick consist of checksumming the sectors you've loaded once the load is complete.
#2 I am using bochs. However, I need to create a floppy image, how to manage the file in the image. Any software that is free(If easy to use is the better) for use. I have download winimage but it is a limit time software.
all we have has been collected in the "Working with Disk Images" page on the Wiki.
#3 there is any example for simple os that I can download, the os I have is freedos, but the code is too hard for me. Any simple OS that is still in developing? I found some example of os but most of it is bootstrap. Thank you.

Thank you for answer my question.
Here again, we have the "small OS with source" page on the wiki.

http://www.osdev.org/osfaq2/
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re:How to debug the read sector

Post by bubach »

As you are developing in asm at the moment, maybe my small OS can be of any service? (current realesed version does not have any user input.. :-( )
Check the URL in my signature.
As for my "new" version 0.03 that should be up with the new page http://bos.asmhackers.net/ in a couple of days or so, a small shell is included.
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
Post Reply