1
0
Fork 0

Added CMOS_SetRegister

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1285
This commit is contained in:
Ulf Wohlers 2003-09-30 15:42:12 +00:00
parent efd7d24b2e
commit 7ce6f66865

View file

@ -175,6 +175,7 @@ static Bit8u cmos_readreg(Bit32u port) {
case 0x18: /* Extended memory in KB High Byte */
case 0x30: /* Extended memory in KB Low Byte */
case 0x31: /* Extended memory in KB High Byte */
// LOG(LOG_BIOS,LOG_NORMAL)("CMOS:Read from reg %F : %04X",cmos.reg,cmos.regs[cmos.reg]);
return cmos.regs[cmos.reg];
default:
LOG(LOG_BIOS,LOG_NORMAL)("CMOS:Read from reg %F",cmos.reg);
@ -182,6 +183,11 @@ static Bit8u cmos_readreg(Bit32u port) {
}
}
void CMOS_SetRegister(Bitu regNr, Bit8u val)
{
cmos.regs[regNr] = val;
};
void CMOS_Init(Section* sec) {
IO_RegisterWriteHandler(0x70,cmos_selreg,"CMOS");
IO_RegisterWriteHandler(0x71,cmos_writereg,"CMOS");