memory
RE:memory
What exactly happens when probing memory directly? When you probe an address that is not backed by physical memory, do you get an exception? Does a write just dissappear into the ether and a read just return garbage? What about the memory hole that may exist at 15MB-16MB, does it just mimic the behavior of non-existant memory even if you have more that 16MB of memory?
I have been trying to determine memory size using INT 15 function E820 but I have found that it is not very well supported. (I have tried it on 8 different computers, all of which are less that 1 year old, and none of them supports it) I have also had limited success with INT 15 function E801. I may be using the BIOS calls incorrectly but I don't think so. I could use INT 15 fuction 88 (it has worked consistently on every computer I have tried) but I then have to deal with the 64MB limit on what it can report.
If anyone has had experience with directly probing memory, or has seen that INT 15 functions E820 and E801 works on most machines, I would be interested in finding out about it.
I have been trying to determine memory size using INT 15 function E820 but I have found that it is not very well supported. (I have tried it on 8 different computers, all of which are less that 1 year old, and none of them supports it) I have also had limited success with INT 15 function E801. I may be using the BIOS calls incorrectly but I don't think so. I could use INT 15 fuction 88 (it has worked consistently on every computer I have tried) but I then have to deal with the 64MB limit on what it can report.
If anyone has had experience with directly probing memory, or has seen that INT 15 functions E820 and E801 works on most machines, I would be interested in finding out about it.
RE:memory
Hello Garf,
Here u have my system routines which direct probe your ram resources.
;=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=
; system_routine_05 - GetAmountOfRam
;
; IN - AL= 5,
; OUT - EAX= Bytes available (Ram)
;=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-= ; all non input registers are safe ))
system_routine_05:
push ebx
push ecx
push edx
push es
mov ax, flat32_select
mov es, ax
xor eax, eax
cli
@loop05:
add eax, 100000H ; 1MB
mov ebx, [es:eax]
mov edx, ebx
not ebx
mov [es:eax], ebx
mov ecx, [es:eax]
mov [es:eax], edx
cmp ebx, ecx
je @loop05
sti
pop es
pop edx
pop ecx
pop ebx
iret
I`m using this functions succesfully on all my testing machine (from 80486 to 80686).
You will get exception if u will use a descriptor which doesn`t cover all probed memory. Memory hole at 15-16M is used as memory buffer by some vga chips (at least I think is it true) - similar to memory at 0xa0000. Above that (in most cases) you can simply switch this function off in BIOS.
I`ve been studing INT 15 - and I noticed that this function depends on chips version of mother board - so that`s why I decided to write my function
Hope that helps,
SebS
Here u have my system routines which direct probe your ram resources.
;=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=
; system_routine_05 - GetAmountOfRam
;
; IN - AL= 5,
; OUT - EAX= Bytes available (Ram)
;=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-= ; all non input registers are safe ))
system_routine_05:
push ebx
push ecx
push edx
push es
mov ax, flat32_select
mov es, ax
xor eax, eax
cli
@loop05:
add eax, 100000H ; 1MB
mov ebx, [es:eax]
mov edx, ebx
not ebx
mov [es:eax], ebx
mov ecx, [es:eax]
mov [es:eax], edx
cmp ebx, ecx
je @loop05
sti
pop es
pop edx
pop ecx
pop ebx
iret
I`m using this functions succesfully on all my testing machine (from 80486 to 80686).
You will get exception if u will use a descriptor which doesn`t cover all probed memory. Memory hole at 15-16M is used as memory buffer by some vga chips (at least I think is it true) - similar to memory at 0xa0000. Above that (in most cases) you can simply switch this function off in BIOS.
I`ve been studing INT 15 - and I noticed that this function depends on chips version of mother board - so that`s why I decided to write my function
Hope that helps,
SebS