OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 5:31 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Reading from a FAT12 cluster causes an abort
PostPosted: Mon Mar 11, 2019 9:15 am 
Offline
User avatar

Joined: Sat May 26, 2018 5:32 pm
Posts: 22
Hello. I have successfully got my code to read the multiple sector FAT12 root directory, but when trying to load the kernel off of the disk, the drive gives an abort error. I've checked the images in a hex editor, and the sector it reads from seems to be the correct sector, and other reads work fine (e.g. reading from the GPT, reading the BPB, reading the root directory). Any help would be much appreciated.

Link to the line in my fat driver that goes to the abort.

Link to the code that implements da_read (there are a few tiny wrappers in between).

_________________
The maker of Foxtrot microkernels. Currently just Greyhound, which is currently smaller than 3 KiB.
Also working on osmkVII.


Top
 Profile  
 
 Post subject: Re: Reading from a FAT12 cluster causes an abort
PostPosted: Mon Mar 11, 2019 10:42 am 
Offline
Member
Member
User avatar

Joined: Sat Nov 22, 2014 6:33 pm
Posts: 934
Location: USA
Just a comment, I mean no disrespect, you have once mentioned that you wanted to code this in assembly for the challenge.

So, here is your challenge: ... You will get to do most of it yourself ...

Even those of us that are experienced assembly programmers will look at your code, find out it is assembly, and move on. Assembly, even to the person writing it, let alone to an invited seeker, is very hard to follow and not really worth the trouble to investigate.

I strongly suggest, that if you want others to look over your code and help, you move to C or another higher level language.

Just a comment, again, I mean no disrespect.

Ben
- http://www.fysnet.net/osdesign_book_series.htm


Top
 Profile  
 
 Post subject: Re: Reading from a FAT12 cluster causes an abort
PostPosted: Mon Mar 11, 2019 10:57 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4594
Location: Chichester, UK
Alternatively, take some time out to learn how to debug an operating system. This will serve you well once your code gets at all complicated.

(PS I have to concur with Ben - asking others to debug your assembly code is not a road to success. Those who are knowledgeable enough to provide useful help are knowledgeable enough to use a high-level language.)


Top
 Profile  
 
 Post subject: Re: Reading from a FAT12 cluster causes an abort
PostPosted: Mon Mar 11, 2019 4:09 pm 
Offline
User avatar

Joined: Sat May 26, 2018 5:32 pm
Posts: 22
I understand. I'll try to write the more complicated code in C from now on, and if I get too many more bugs in the low level stuff, I'll try to put in a GDB stub.

_________________
The maker of Foxtrot microkernels. Currently just Greyhound, which is currently smaller than 3 KiB.
Also working on osmkVII.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 142 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group