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 ?
memory size
-
K.J.
Re:memory size
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.
K.J.
-
Slasher
Re:memory size
hi,
thats is needed cause the bios is using 32bit registers/data in a 16bit code segment! (correct me if I'm wrong anyone)
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
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.
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.