Anonymous user
Detecting Memory (x86): Difference between revisions
→Getting an E820 Memory Map: line break
[unchecked revision] | [unchecked revision] |
m (set register di to 0x8004 so the BIOS code located in es:0 will not be overwritten by int 15) |
(→Getting an E820 Memory Map: line break) |
||
Line 372:
<source lang="asm">
; use the INT 0x15, eax= 0xE820 BIOS function to get a memory map
; note: initially di is 0, be sure to set it to a value so that the BIOS code will not be overwritten.
; The consequence of overwriting the BIOS code will lead to problems like getting stuck in `int 0x15`
; inputs: es:di -> destination buffer for 24 byte entries
; outputs: bp = entry count, trashes all registers except esi
|