flat assembler
Message board for the users of flat assembler.

Index > Main > bios and hard drive

Author
Thread Post new topic Reply to topic
b1528932



Joined: 21 May 2010
Posts: 287
b1528932 25 Jun 2010, 10:58
how do i detect if i have hard drive using bios?
about reading and writing i can find info, what about detection?
Post 25 Jun 2010, 10:58
View user's profile Send private message Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 25 Jun 2010, 11:01
to detect a drive, use the drive ID command for bios.
Code:
        mov ah,8
        mov dl,[.drivenumber]
        int 13h
        jc error
    

this command returns drive info, carry set if error
Post 25 Jun 2010, 11:01
View user's profile Send private message Visit poster's website Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 796
Location: Massachusetts, USA
bitshifter 25 Jun 2010, 11:11
Post 25 Jun 2010, 11:11
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 25 Jun 2010, 14:55
b1528932,

HDD doesn't know about BIOS, and it doesn't have to.

To get properties of modern HDDs you'll have to use ATA specs (IDENTIFY) of some revision.
Post 25 Jun 2010, 14:55
View user's profile Send private message Reply with quote
b1528932



Joined: 21 May 2010
Posts: 287
b1528932 25 Jun 2010, 20:17
when executing bios code, i must locate suitable device and load its bootloader into memory. then start executing it.

how do i locate FDD/HD/CD?
Post 25 Jun 2010, 20:17
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1903
DOS386 27 Jun 2010, 10:53
> HDD doesn't know about BIOS, and it doesn't have to.

But BIOS usually knows about HD's installed Smile

> To get properties of modern HDDs you'll have to use
> ATA specs (IDENTIFY) of some revision.

NO. You can use the BIOS (may have outdated info Wink ) or the hardware directly.

> how do i locate FDD/HD/CD?

Again, use BIOS or hardware access (legacy ISA HD ports, PCI).
Post 27 Jun 2010, 10:53
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.