Detecting Memory (x86): Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
int 0x12, clear CF |
|||
Line 32: | Line 32: | ||
Usage: |
Usage: |
||
<source lang="asm"> |
<source lang="asm"> |
||
; Clear carry flag |
|||
⚫ | |||
clc |
|||
⚫ | |||
int 0x12 |
int 0x12 |
||
; The carry flag is set if it failed |
|||
jc .Error |
|||
; AX = amount of continuous memory in KB starting from 0. |
; AX = amount of continuous memory in KB starting from 0. |
||
</source> |
</source> |
||
Note: this function always |
Note: this function is supposed to be always present, and may not modify the carry flag. If an emulator doesn't support it, the carry flag will be set, indicating error. |
||
Alternately, you can just use INT 0x15, EAX = 0xE820 (see below). |
Alternately, you can just use INT 0x15, EAX = 0xE820 (see below). |