China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-01 19:43
中国DOS联盟论坛 » DOS开发编程 & 发展交流 (开发室) » Who can tell me where the BIOS boot order is? View 1,355 Replies 5
Original Poster Posted 2006-11-18 03:48 ·  中国 山东 济南 教育网
高级用户
★★
Credits 506
Posts 187
Joined 2005-12-04 22:41
20-year member
UID 46500
Gender Male
Status Offline
There is a setting for their boot order in the BIOS. Now I want to read it out through a program and modify it. How should I do that?
Floor 2 Posted 2006-11-20 12:35 ·  中国 山东 济南 教育网
高级用户
★★
Credits 506
Posts 187
Joined 2005-12-04 22:41
20-year member
UID 46500
Gender Male
Status Offline
Guys, I know this can definitely be done, but I don't know how to find where it is stored, or how to rewrite the order.
I hope friends who know about this can give me some pointers.
Floor 3 Posted 2006-11-21 00:30 ·  中国 湖南 长沙 电信
中级用户
★★
Credits 282
Posts 126
Joined 2006-05-17 22:29
20-year member
UID 55724
Status Offline
It should be stored in CMOS,
but every motherboard is different.
人类存在的目的就是试图理解人类为何存在
Floor 4 Posted 2006-11-21 11:51 ·  中国 山东 济南 联通
高级用户
★★
Credits 506
Posts 187
Joined 2005-12-04 22:41
20-year member
UID 46500
Gender Male
Status Offline
I think every motherboard is different, but there ought to be some standard, like using a certain port or interrupt to read this data.
Floor 5 Posted 2006-11-21 22:47 ·  中国 湖南 长沙 电信
中级用户
★★
Credits 282
Posts 126
Joined 2006-05-17 22:29
20-year member
UID 55724
Status Offline
It's port 70.
Access the CMOS RAM



----------P0070007F--------------------------
PORT 0070-007F - CMOS RAM/RTC (REAL TIME CLOCK)
Note: the real-time clock may be either a discrete MC146814, MC146818, or
an emulation thereof built into the motherboard chipset
SeeAlso: PORT 00A0h"XT"

0070 -W CMOS RAM index register port (ISA, EISA)
bit 7 = 1 NMI disabled from reaching CPU
= 0 NMI enabled
bit 6-0 CMOS RAM index
(64 bytes in early systems, now usually 128 bytes)
Note: any write to PORT 0070h should be followed by an action to
PORT 0071h or the RTC wil be left in an unknown state.
0071 RW CMOS RAM data port (ISA, EISA) (see #P0409)

(Table P0409)
Values for Real-Time Clock register number (see also CMOS.LST):
00h-0Dh clock registers
0Eh diagnostics status byte
0Fh shutdown status byte
10h diskette drive type for A: and B:
11h reserved / IBM fixed disk / setup options
12h fixed disk drive type for drive 0 and drive 1
13h reserved / AMI Extended CMOS setup (AMI Hi-Flex BIOS)
14h equipment byte
15h LSB of system base memory in Kb
16h MSB of system base memory in Kb
17h LSB of total extended memory in Kb
18h MSB of total extended memory in Kb
19h drive C extension byte
1Ah drive D extension byte
1Bh-2Dh reserved
20h-27h commonly used for first user-configurable drive type
2Eh CMOS MSB checksum over 10-2D
2Fh CMOS LSB checksum over 10-2D
30h LSB of extended memory found above 1Mb at POST
31h MSB of extended memory found above 1Mb at POST
32h date century in BCD
33h information flags
34h-3Fh reserved
35h-3Ch commonly used for second user-configurable drive type
3Dh-3Eh word to 82335 MCR memory config register at [22] (Phoenix)
42h-4Ch AMI 1990 Hyundai super-NB368S notebook
???
54h-57h AMI 1990 Hyundai super-NB368S notebook
???
5Ch-5Dh AMI 1990 Hyundai super-NB368S notebook
???
60h-61h AMI 1990 Hyundai super-NB368S notebook
???
人类存在的目的就是试图理解人类为何存在
Floor 6 Posted 2006-11-22 11:17 ·  中国 山东 济南 教育网
高级用户
★★
Credits 506
Posts 187
Joined 2005-12-04 22:41
20-year member
UID 46500
Gender Male
Status Offline
Reading the BIOS ports should be through ports 70 and 71. But I still don't know how to modify the boot order. Still, thanks to the brother in post #5.
Forum Jump: