CHS when the boot
CHS when the boot
I have a problem ,I want to know the cylinder number,heads number and sectors number in the booting time,how to get them?who can give me a sample code?
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: CHS when the boot
I don't understand your question. Do you want the CHS of the drive (a.k.a. drive geometry) or do you want to convert LBA sector to CHS values so you can read them? In either case, this Wiki page contains information on both.Raymond wrote:I have a problem ,I want to know the cylinder number,heads number and sectors number in the booting time,how to get them?who can give me a sample code?
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Re: CHS when the boot
My booting file is using the CHS mode to load the main file called haribote.sys which has main function on it.so if i run the program on real machine i need to know the numbers of heads,sectors per cylinder,or should i use the lba mode,how to use lba mode?
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: CHS when the boot
This question says that you didn't read the article I have you in my previous post.Raymond wrote:My booting file is using the CHS mode to load the main file called haribote.sys which has main function on it.so if i run the program on real machine i need to know the numbers of heads,sectors per cylinder,or should i use the lba mode,how to use lba mode?
You know your OS is advanced when you stop using the Intel programming guide as a reference.
- Love4Boobies
- Member
- Posts: 2111
- Joined: Fri Mar 07, 2008 5:36 pm
- Location: Bucharest, Romania
Re: CHS when the boot
CHS and LBA are methods of specifying locations on a disk. As far as I understand it, your biggest problem finding the location rather than how to make use of it. The answer is that you either store your data at some fixed location or implement a file system, which is a (collection of) data structure(s) that describe(s) what and where everything is. The disk itself has no concept of files, directories, etc.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
[ Project UDI ]
Re: CHS when the boot
In fact i want to use the Standard Fixed Disk Parameter Table (FDPT) to know the info of chs,who can teach me how to use FDPT?