memory size

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pini

memory size

Post by pini »

I traced the function 0xE801 from int 0x15, which should give the memory size by groups :
CX gives the number of Kb between 1 and 16 Mb (15 Mb is the max <=> range [1 Mb;16 Mb[)
DX gives the number of 64 Kb blocks between 16 Mb and 4 Gb ( range [16 Mb;4 Gb])

it gives these results on my test machine : CX=0x3C00 & DX=0x100 which gives a total of 32768 Ko (+1 because of the first Meg) which is the correct amount of memory.

This functions is composed of a sequence of
[pre]DB 66h

and

CS:
DB 66h
[/pre]

Can anyone explain me what are these opcodes ? and how to use them ?
K.J.

Re:memory size

Post by K.J. »

I'm not quite sure what you are asking, but if it's how the BIOS function works, look at the Bochs BIOS sourcecode.

K.J.
Slasher

Re:memory size

Post by Slasher »

hi,
thats is needed cause the bios is using 32bit registers/data in a 16bit code segment! (correct me if I'm wrong anyone)
DarylD

Re:memory size

Post by DarylD »

Your right.

66 is the modifier for 32bit registers in a 16 bit segment and vice versa (I believe).

Would be suprised if this function works in protected mode though.
Post Reply