Implement CMOS registers 15h, 16h, 17h and 18h.


svn path=/branches/ntvdm/; revision=60946
This commit is contained in:
Aleksandar Andrejevic 2013-11-11 17:59:04 +00:00
parent 1d21bb125f
commit eaf248fe87
2 changed files with 17 additions and 1 deletions

View file

@ -11,6 +11,7 @@
#define NDEBUG
#include "cmos.h"
#include "bios.h"
#include "pic.h"
/* PRIVATE VARIABLES **********************************************************/
@ -135,6 +136,18 @@ BYTE CmosReadData(VOID)
return Value;
}
case CMOS_REG_BASE_MEMORY_LOW:
return Bda->MemorySize & 0xFF;
case CMOS_REG_BASE_MEMORY_HIGH:
return Bda->MemorySize >> 8;
case CMOS_REG_EXT_MEMORY_LOW:
return ((MAX_ADDRESS - 0x100000) / 1024) & 0xFF;
case CMOS_REG_EXT_MEMORY_HIGH:
return ((MAX_ADDRESS - 0x100000) / 1024) >> 8;
case CMOS_REG_STATUS_A:
case CMOS_REG_STATUS_B:
case CMOS_REG_STATUS_D:

View file

@ -67,10 +67,13 @@ typedef enum _CMOS_REGISTERS
CMOS_REG_STATUS_D,
CMOS_REG_DIAGNOSTICS,
CMOS_REG_SHUTDOWN_STATUS,
CMOS_REG_BASE_MEMORY_LOW = 0x15,
CMOS_REG_BASE_MEMORY_HIGH = 0x16,
CMOS_REG_EXT_MEMORY_LOW = 0x17,
CMOS_REG_EXT_MEMORY_HIGH = 0x18,
CMOS_REG_MAX = 0x40
} CMOS_REGISTERS, *PCMOS_REGISTERS;
/*
* CMOS Memory Map
*