CMOS内存信息

转载 2011年01月12日 14:10:00

The CMOS memory information

CMOS stands for: Complementary Metal Oxide Semiconductor

In the 286 and up, the CMOS memory chip holds 64 bytes of data. The data is held in the chip by the battery. This is so that when you turn your machine off, the machine can still keep track of the time, data, disk type(s) and so one.

The CMOS memory is accessed via 2 I/O ports, at addresses 70h and 71h. A program writes the config. address (00h through 3Fh) to I/O port 70h and then writes a new byte value or reads the current byte value at I/O port 71h. I strongly suggest that you don't write to these ports unless you know what you are doing. You could severely mess up your machine

The following table specifies the information in the CMOS memory:

address (hex)		Contents
	00h		Current Second   (either in BCD or hex format, see bit 2 of offset 0Bh below)
	01h		Second Alarm
	02h		Current Minute   
	03h		Minute Alarm
	04h		Current Hour     (see bit 1 of offset OBh below)
	05h		Hour Alarm
	06h		Day of the Week
	07h		Day of the Month
	08h		Month
	09h		Year (00-99)   (see offset 32h)
	0Ah		Clock Register A
	0Bh		Clock Register B
			bits:	76543210	Meaning
				X.......	1 = enable clock setting by freezing updates
				.X......	1 = enable periodic interrupt
				..X.....	1 = enable alarm interrupt
				...X....	1 = enable update-ended interrupt
				....X...	1 = enable square wave output
				.....X..	1 = Data Mode - 0: BCD, 1: Binary
				......X.	1 = 24/12 hour selection - 1 enables 24 hour mode
				.......X	1 = Daylight Savings Enable
							=1 enables automatic switching to/from DST
								in April and October

	0Ch		Clock Register C
	0Dh		Clock Register D
	0Eh		Diagnostic byte (got during Power On Self Test)
			bits:	76543210	Meaning
				X.......	1 = CMOS battery Dead
				.X......	1 = checksum incorrect
				..X.....	1 = config. byte incorrect
				...X....	1 = memory size incorrect
				....X...	1 = hard disk or controller error
				.....X..	1 = date or time incorrect
				......XX	Not used
	0Fh		Power-down system status  ?what was last boot?
	10h		Bits 4-7: first floppy disk type
				0000 = no disk drive
				0001 = 5.25" 320k or 360k
				0010 = 5.25" 1.2m
				0011 = 3.5"  720k
				0100 = 3.5"  1.44m
				0110 = 3.5"  2.88m
			Bits 0-3: second floppy disk type
				same as above
	11h		reserved
	12h		Bits 4-7: first Hard Drive type
	  		Bits 3-0: second Hard Drive type
	13h		reserved
	14h		Configuration byte
			bits:	76543210	Function		 Meaning
				XX......	number of disk drives	00 = 1 drive
								01 = 2 drives
				..XX....	Primary display type		00 = display has its own BIOS
								01 = 40-column CGA
								10 = 80-column CGA
								11 = MDA

				....XX..	not used
				......X.			1 = math coprocessor installed
				......X.			0 = no floppy drives
								1 = floppy drives available
	15h		Low byte of base memory size
				100h = 256k
				200h = 512k
				280h = 640k
	16h		High byte of 15h above
	17h		Low expansion memory byte
	18h		High expansion memory byte
				200h = 512k
				400h = 1024k
				600h-3C00h = 1536-15,360k
	19h		Extended type byte: Hard drive 1
	1Ah		Extended type byte: Hard drive 2
	1Bh-2Dh		reserved
	2Eh		check-sum for addresses 10h-2Dh  (word)
	2Fh		  see above
	30h		Low expansion memory byte
	31h		High expansion memory byte
				200h = 512k
				400h = 1024k
				600h-3C00h = 1536-15,360k
	32h		Centry in BCD (19 or 20)  (see offset 09h)
	33h		Information flag


You may also use INT 11h to get some of this data.

For more detailed information, download the following zip file: CMOSINFO.ZIP

For a sample assembler program to print the date and time, download the following asm file: cmosdt.asm (3k)

This was extracted from Peter Norton's PC Programmers Bible


All rights reserved
Legal Notice
Copyright © 1984-2010 Forever Young Software
Forever Young Software for Hire
Return to My Home Page

CMOS 内存和实时时钟

简介    系统带有一个小型的CMOS内存,其中保存着系统断电时的数据。该内存用来记录软盘的类型和数目、硬盘大小信息、内存大小以及其他重要的系统数据。CMOS芯片还含有一个实时时钟(RTC),用来保持...

清除CMOS信息

  • 2013年11月26日 20:43
  • 40KB
  • 下载

备份与恢复CMOS信息

  • 2011年11月25日 07:24
  • 46KB
  • 下载

java获取cpu、内存、硬盘信息

1 下载安装sigar-1.6.4.zip     使用java自带的包获取系统数据,容易找不到包,尤其是内存信息不够准确,所以选择使用sigar获取系统信息。        下载地址:http://...

间隔读取cmos的时间信息

  • 2013年06月23日 23:21
  • 621B
  • 下载

获取CPU、内存、磁盘、进程信息

  • 2014年09月15日 10:55
  • 17KB
  • 下载

Android系统信息(内存、cpu、sd卡、电量、版本)获取

一、内存(ram): android的总内存大小信息存放在系统的/proc/meminfo文件里面,可以通过读取这个文件来获取这些信息: public void getTotalMemor...

借助Sigar API获取获取内存信息

  • 2015年02月27日 16:10
  • 1.13MB
  • 下载

centOS7下实践查询版本/CPU/内存/硬盘容量等硬件信息

1.内核版本   uname -a 能确认是64位还是32位,其它的信息不多[root@localhost ~]# uname -a Linux localhost.localdomain 3.10....
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:CMOS内存信息
举报原因:
原因补充:

(最多只允许输入30个字)