- xor eax, eax
- mov dx, 0x3D4
- in byte al, dx
- mov [esp-6], al ; save off the old VGA command
- mov al, 0xC
- out dx, al
- inc dx
- in al, dx
- mov ah, al
- dec dx
- mov al, 0xD
- out dx, al
- inc dx
- in al, dx
- shl eax, 1
- add eax, 0xB8000 ; yay
- mov byte [eax+0], '1'
- mov byte [eax+1], 0x1F
- mov byte [eax+2], '5'
- mov byte [eax+3], 0x1F
- mov byte [eax+4], '-'
- mov byte [eax+5], 0x1F
- mov byte [eax+6], '4'
- mov byte [eax+7], 0x1F
- mov byte [eax+8], '1'
- mov byte [eax+9], 0x1F
- mov byte [eax+10], '2'
- mov byte [eax+11], 0x1F
-
- mov dx, 0x3D4 ; restore the old stuff
- mov al, [esp-6]
- out dx, al
-
- mov dx, 0xCFC ; restore smramc
- mov al, [esp-5]
- out dx, al
-
- mov dx, 0xCF8 ; restore the old PCI config value
- mov eax, [esp-4]
- out dx, eax
-
- mov al, [needclear]
- cmp al, 0
- jz noclear
- mov al, 0 ; clear BSS
- mov edi, [dataptr+4]
- mov ecx, [dataptr+8]
- rep stosb
- mov [needclear], al
-
-noclear:
- mov eax, [dataptr+12] ; jump into C
- call eax
-
- mov al, 0x40 ; ack the periodic IRQ
- mov dx, 0x834
- out dx, al
-
- mov dx, 0x830 ; now ack the SMI itself
- in al, dx
- or al, 0x02
- and al, 0xBF
- out dx, al
- or al, 0x40
- out dx, al
+ mov eax, [dataptr+4] ; Load target jump address
+ call eax ; then jump into C.