flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > HELP!!! |
Author |
|
smiddy 09 Jun 2005, 17:05
This is a pretty open ended question. So considering the tools at your disposal: BIOS, SCSI driver (facsimile thereto in your boot code), IDE (ATA) driver facsimile, USB driver facsimile, firewire driver facsimile, and perhaps others. Each interface has its own characteristics in order to retieve information to determine the drive size. Of these BIOS is the easiest to employ but probably the least flexible and limited given today's drive sizes; using INT 13h. The others you'll have to employ a driver interface that retrieves the specific information you require. I suggest looking up INT 13h initially and see if this suffices for your needs.
|
|||
09 Jun 2005, 17:05 |
|
pelaillo 09 Jun 2005, 17:55
If you can trust in the partition information stored on bootsector, you can retrieve it from this structure:
Code: struc HDD_PART { .boot db 0 .beg_head db 0 .beg_cylsect dw 0 .par_type db 0 .end_head db 0 .end_cylsect dw 0 .lba_addr dd 0 .lba_size dd 0 } There are four of HDD_PART info just before the signature (two latest bytes on bootsector: 0AA55h) |
|||
09 Jun 2005, 17:55 |
|
Geek 16 Jun 2005, 16:23
I can understand using the partition table, but I'm looking for something that will allow my OS to create the partition table.
I other words I wont be able to use the partition table because my OS hase'nt created it yet. Any other sujections? _________________ Death is not the opposite of life, rather, it is the absence of it. |
|||
16 Jun 2005, 16:23 |
|
bogdanontanu 16 Jun 2005, 19:06
You can use IDE/ ATA Identify Device Command
or you can use BIOS functions |
|||
16 Jun 2005, 19:06 |
|
THEWizardGenius 17 Jun 2005, 04:23
Use BIOS, before entering protected mode (if your OS is a pmode OS). In fact, BIOS might store this information somewhere (not sure, have to check BIOS data area docs) in memory, but you'd have to know where to look. It probably just uses IDE/ATA functions, which if you happen to know, you could call yourself. I understand there are at least a few differences between manufacturers, but I think this is always the same. According to my notes, the function is 0ECh to the command register, base+7.
|
|||
17 Jun 2005, 04:23 |
|
T&K(r) 10 Jul 2005, 20:48
In CMOS is stored configuration of your PC , what kind of FDD,HDD you have, the BOOt sequaence, and many others.
You can just get information stred about HDD in it: I attached simple DOC about CMOS _________________ my GG ( Polish Instant Messager ) number is 8734187 Gdy widzisz kolejke - wstąp do niej - co ci szkodzi |
|||
10 Jul 2005, 20:48 |
|
T&K(r) 10 Jul 2005, 20:56
sorry - i have problems with Atach
_________________ my GG ( Polish Instant Messager ) number is 8734187 Gdy widzisz kolejke - wstąp do niej - co ci szkodzi |
|||||||||||
10 Jul 2005, 20:56 |
|
THEWizardGenius 11 Jul 2005, 19:15
AFAIK CMOS does not have information about hard drive size. However, it does have much other useful information and any would-be OS dev'er should learn how to use the CMOS.
|
|||
11 Jul 2005, 19:15 |
|
Night Rider 28 Jul 2005, 00:15
Maybe somebody knows, how to figure out PHYSICAL geometry of hdd(from hd controller?(i mean entire device's controller)
|
|||
28 Jul 2005, 00:15 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.