diff --git a/src/Spice86.Core/Emulator/InterruptHandlers/Bios/SystemBiosInt12Handler.cs b/src/Spice86.Core/Emulator/InterruptHandlers/Bios/SystemBiosInt12Handler.cs
index 47a4435d0..aa426a4f2 100644
--- a/src/Spice86.Core/Emulator/InterruptHandlers/Bios/SystemBiosInt12Handler.cs
+++ b/src/Spice86.Core/Emulator/InterruptHandlers/Bios/SystemBiosInt12Handler.cs
@@ -26,6 +26,6 @@ public SystemBiosInt12Handler(IMemory memory, Cpu cpu, BiosDataArea biosDataArea
///
public override void Run() {
- _state.AX = _biosDataArea.MemSizeKb;
+ _state.AX = _biosDataArea.ConventionalMemorySizeKb;
}
}
\ No newline at end of file
diff --git a/src/Spice86.Core/Emulator/Memory/BiosDataArea.cs b/src/Spice86.Core/Emulator/Memory/BiosDataArea.cs
index 5c58a1ded..284d9b57f 100644
--- a/src/Spice86.Core/Emulator/Memory/BiosDataArea.cs
+++ b/src/Spice86.Core/Emulator/Memory/BiosDataArea.cs
@@ -40,7 +40,10 @@ public BiosDataArea(IByteReaderWriter byteReaderWriter) : base(byteReaderWriter,
// Padding at 0x12
- public ushort MemSizeKb { get => UInt16[0x13]; set => UInt16[0x13] = value; }
+ ///
+ /// Gets or sets the amount of installed conventional memory in KB.
+ ///
+ public ushort ConventionalMemorySizeKb { get => UInt16[0x13]; init => UInt16[0x13] = value; }
// Padding at 0x15
diff --git a/src/Spice86.Core/Emulator/VM/Machine.cs b/src/Spice86.Core/Emulator/VM/Machine.cs
index e6d62336a..6d7e1a197 100644
--- a/src/Spice86.Core/Emulator/VM/Machine.cs
+++ b/src/Spice86.Core/Emulator/VM/Machine.cs
@@ -206,7 +206,7 @@ public Machine(IGui? gui, State cpuState, IOPortDispatcher ioPortDispatcher, ILo
}
IoPortDispatcher = ioPortDispatcher;
BiosDataArea = new BiosDataArea(Memory) {
- MemSizeKb = (ushort)Math.Clamp(Memory.Ram.Size / 1024, 0, 1024) // max 1mb.
+ ConventionalMemorySizeKb = (ushort)Math.Clamp(Memory.Ram.Size / 1024, 0, 640) // max 640k conventional memory
};
CpuState = cpuState;
DualPic = new(CpuState, configuration.FailOnUnhandledPort, configuration.InitializeDOS is false, loggerService);