Add these function to you codeLordMage wrote:Code: Select all
bits 32 Stage3: ;-------------------------------; ; Set registers ; ;-------------------------------; mov ax, 0x10 ; set data segments to data selector (0x10) mov ds, ax mov ss, ax mov es, ax mov fs, ax mov gs, ax mov esp, 90000h ; stack begins from 90000h ;HERE IN YOU CODE DO THIS call TestRam push [ExtMemorySize] push [TotalMemoryMB]
Code: Select all
;----------------------------------------------------;
; TestRam ;
;----------------------------------------------------;
TestRam:
pushad
mov eax,dword[TotalMemoryMB]
rol eax,8
push eax
push eax
shr al,4
call hexget
mov byte [fs:0xB8090], al
pop eax
call hexget
mov byte [fs:0xB8092], al
pop eax
rol eax,8
push eax
push eax
shr al,4
call hexget
mov byte [fs:0xB8094], al
pop eax
call hexget
mov byte [fs:0xB8096], al
pop eax
rol eax,8
push eax
push eax
shr al,4
call hexget
mov byte [fs:0xB8098], al
pop eax
call hexget
mov byte [fs:0xB809A], al
pop eax
rol eax,8
push eax
push eax
shr al,4
call hexget
mov byte [fs:0xB809C], al
pop eax
call hexget
mov byte [fs:0xB809E], al
pop eax
popad
ret
;----------------------------------------------------;
; hexget ;
;----------------------------------------------------;
hexget:
and eax,0x0000000f
or eax,0x00000030
cmp eax,0x39
ja add7
ret
add7: add eax,7
ret
If you have 32mb of ram, it should print 20 .