Analysis and reading of CMOS RAM

Source: Internet
Author: User

The cmos ram contains 64-bit real-time clock, and the internal clock circuit uses the first 14 bytes. The rest are used to save the configuration information of other devices. The detailed address allocation of cmos ram is as follows:

Address description
0 seconds
1 second alert
2 points
3-minute alert
4 hours
5-hour alert
6 weeks
7th
August
9 years
A Status Register
B Status Register B
C Status Register C
D Status Register d
E Diagnostic status byte (0 normal)
F stop status byte (0 with mains supply)

10 floppy disk drive type (bit 7-4: A drive, bit 3-0: B Drive 1-360kb; 2-1.2 MB; 6-1.44 MB; 7-720kb)
11 Reserved
12 hard drive type (7-4: C drive, 3-0: D Drive)
13 Reserved
14 device bytes (number of soft drives, display type, coprocessor)
15 low-byte basic memory
16 high-byte basic memory
17 low-byte extended memory
18 extended memory high byte
19 hard disk type bytes (less than 15 is 0)
1a-2d Reserved
2e-2f CMOS checksum (10-2d bytes and)
30 extended memory low byte
31 extended memory high byte
32 century date byte (19 h: 19th century)
33. Information Mark
34-3f reserved (34-0: no password; 35-3f-Password location)

Access to CMOS:

CMOS has two entry addresses: the port address of the address port is 70 h, and the port address of the data port is 71 h. Therefore, you only need to send the address to the address port to read the required data from the 71h.

Read the CMOS Program

Enter the following Assembly statement in debug.

MoV BX, 0

MoV Al, BL

Out 70, Al

In Al, 71

MoV [bx + 130], Al

INC BX

Cmp bx, 40

Jnz start; start is the address of the starting statement mov BX, 0

Then, you can run the debug D command to view the relevant information.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.