Back to PC-98 architecture main page
The third is extended RAM size in the area higher than 16MB. The size in this area is stored at 0000:0x594 (real mode addressubg) in 1MB. This can be accessed via following macro:
Therefore, physical memory size can be calculated by follwoing code:
u_char under16, over16; under16 = PC98_SYSTEM_PARAMETER(0x401); over16 = PC98_SYSTEM_PARAMETER(0x594); under16 += 8; /* Conventional memory size in 128KB */ Maxmem = under16 * 128 * 1024 / PAGE_SIZE; Maxmem += (over16 * 1024 * 1024 / PAGE_SIZE);
7 0 7 4 1 0 7 0 7 6 5 4 3 0 +---------------+-------+-------+---------------+-+-+---+-------+ | S | C3 | H | C1 |T|N|BS | C2 | +---------------+-------+-------+---------------+-+-+---+-------+