0040h:0013h           Memory Size in Kilobytes (0-640)

Length: 2 bytes

Contains the number of contiguous 1K memory blocks in the system
(up to 640K).

──────────────────────────────────────────────────────────────────

Use Int 12h to access the memory size using the ROM BIOS
interface.

This memory value is determined at power-on time by either
examining the DIP switches on the system board or using the value
stored in the CMOS battery, whichever way is appropriate according
to the type of machine.

This is the amount of memory available to the entire system. This
is not the amount of memory available to the user's program. Use
Int 21h, Function 48h, to determine the amount of memory available
to a user's program.

To determine the amount of memory above the 1024K address range,
use Int 15h, Service 88h.

If the CMOS battery memory value or the DIP switch value is
greater than the actual amount of memory, then the actual amount
of memory is returned by this interrupt.