N00b problem - no clue about file io

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.
Locked
rspencer
Posts: 18
Joined: Wed Feb 03, 2010 12:05 am

N00b problem - no clue about file io

Post by rspencer »

Hi, so here is a rather n00b problem:
I have left BIOS and am now wondering how to get hold of a FDD/HDD sector. Basically I want to be able to load a sector of data somewhere into memory. Surprisingly I cannot find an example on the web anywhere. How would one do this for a) a FDD and b) HDD? Would it use specific ports? Would these ports change depending on the system?
Many thanks in advance.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: N00b problem - no clue about file io

Post by bluemoon »

User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Re: N00b problem - no clue about file io

Post by piranha »

Surprisingly I cannot find an example on the web anywhere.
He lies! Because you either didn't search or didn't search enough. Since you've said that you've "left BIOS", I'm assuming that you're in real mode and so can execute BIOS calls. So. If you search google with a halfway decent search string, you get this as the first result: http://en.wikipedia.org/wiki/INT_13H this information is also on the wiki, as linked above.

If you aren't in real mode, then there are still ways to do it that are fairly easy, you just need to look up how. Its all on the web, and is easy to find. Please search next time.

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
Locked