My machine support APM in 32bit PMode, checked by flag output of check installation function.
Code: Select all
ApmCheck16:
call Power_CheckApmInstallation
jc ApmNotSupport16
mov word[BOOT_INFO_OFFSET + SBootInfo.ApmFlags], cx
call Power_ConnectApm32BitInterface
jc ApmNotSupport16
mov word[BOOT_INFO_OFFSET + SBootInfo.Apm32BitCodeSegment], ax
mov word[BOOT_INFO_OFFSET + SBootInfo.Apm32BitDataSegment], dx
mov dword[BOOT_INFO_OFFSET + SBootInfo.ApmEntryPointAddress], ebx
mov word[BOOT_INFO_OFFSET + SBootInfo.Apm32BitCodeLength], si
mov word[BOOT_INFO_OFFSET + SBootInfo.Apm32BitDataLength], di
mov al, 1
mov byte[BOOT_INFO_OFFSET + SBootInfo.ApmConnected], al
jmp ApmDone16
ApmNotSupport16:
xor ax, ax
mov byte[BOOT_INFO_OFFSET + SBootInfo.ApmConnected], al
ApmDone16:
Then, how can I use them in 32bit PMode?
In real mode, can use interrupt but protected mode.
I think, maybe AMP segments are clues.
but cannot figure out exactly how.
APM Wiki has not any content about that.
Can I see any example? or pseudo code?
Thanks!