📄 gapm12.oem
字号:
get_ac_battery_status_v12 endp
;---------------------------------------------------------------;
;*****************************************************************;
;*****************************************************************;
;** **;
;** (C)Copyright 1985-1996, American Megatrends Inc. **;
;** **;
;** All Rights Reserved. **;
;** **;
;** 6145-F, Northbelt Parkway, Norcross, **;
;** **;
;** Georgia - 30071, USA. Phone-(770)-246-8600. **;
;** **;
;*****************************************************************;
;*****************************************************************;
;---------------------------------------------------------------;
; HOOK HOOK HOOK HOOK HOOK HOOK HOOK ;
; HOOK HOOK HOOK HOOK HOOK HOOK HOOK ;
;---------------------------------------------------------------;
; GET_PCMCIA_SOCKET_POWER_DOWN_INFO ;
;---------------------------------------------------------------;
; Input : (DS) PM BIOS data segment ;
; (BX) PM event being posted (according to APM specs)
; (DX) bit map for PM event being posted ;
; STACK PRESENT ;
; Output: (CX) for normal system resume notification (bx =;
; 0003h) or critical resume system notificat-;
; ion (bx = 0004h)...... ;
; bit 0 0...pcmcia socket was powered on in ;
; suspend state ;
; bit 0 1...pcmcia socket was powered off in ;
; suspend state ;
; bits 15-1...reserved (must be 0) ;
; (CX) ignore for any other event posting ;
; Register destroyed : (EAX),(EBX),(ECX),(EDX),(ESI),(EDI);
; NOTE : ;
; * Control comes here from core smi/irq apm handler. ;
; * Control to this hook comes in response to apm get pm event;
; call (APM function # 0Bh). ;
; * It's a notification from core apm handler about the APM ;
; event being posted to APM driver to return PCMCIA socket ;
; power on/off condition in suspend state. ;
; * Knowing whether the socket was powered on or off during ;
; the suspend state allows the APM driver or operating system
; to optimize its resume handling of PCMCIA devices. This can
; be particularly important if a PCMCIA modem device is used;
; to resume the system via the resume-on-ring-indicator feature
; * You need to implement this hook for APM 1.2 compatability.;
; Default implementation is 'XOR CX,CX' ;
; 'RET' ;
;---------------------------------------------------------------;
get_pcmcia_socket_power_down_info proc near
xor cx,cx ; PCMCIA socket was powered on in the suspend state
ret
get_pcmcia_socket_power_down_info endp
;---------------------------------------------------------------;
;*****************************************************************;
;*****************************************************************;
;** **;
;** (C)Copyright 1985-1996, American Megatrends Inc. **;
;** **;
;** All Rights Reserved. **;
;** **;
;** 6145-F, Northbelt Parkway, Norcross, **;
;** **;
;** Georgia - 30071, USA. Phone-(770)-246-8600. **;
;** **;
;*****************************************************************;
;*****************************************************************;
;---------------------------------------------------------------;
; HOOK HOOK HOOK HOOK HOOK HOOK HOOK ;
; HOOK HOOK HOOK HOOK HOOK HOOK HOOK ;
;---------------------------------------------------------------;
; GET_PM_CAPABILITIES ;
;---------------------------------------------------------------;
; Input : (DS) PM BIOS data segment ;
; STACK PRESENT ;
; Output: (CX) bit 0 1 ... system can enter global standby;
; (posts standby & standby resume)
; bit 1 1 ... system can enter global suspend;
; (posts suspend & suspend resume)
; bit 2 1 ... resume timer will wake up from ;
; standby state ;
; bit 3 1 ... resume timer will wake up from ;
; suspend state ;
; bit 4 1 ... resume on ring indicator (inter-
; nal COM or modem) will wake up ;
; from standby ;
; bit 5 1 ... resume on ring indicator (inte-;
; rnal COM or modem) will wake up;
; from suspend ;
; bit 6 1 ... PCMCIA Ring indicator will wake;
; up from standby ;
; bit 7 1 ... PCMCIA Ring indicator will wake;
; up from suspend ;
; bit 15-8... reserved (must be set to 0) ;
; (BL) # of system batteries this machine supports;
; 000h means no system battery ;
; 001h means 1 system battery ;
; 002h means 2 system battery ;
; and so on ;
; Register destroyed : (EAX),(EBX),(ECX),(EDX),(ESI),(EDI);
; NOTE : ;
; * Control comes here from core smi/irq apm handler. ;
; * Control to this hook comes in response to apm get ;
; capabilities call (APM function # 10h). ;
; * Information returned in this hook should return the ;
; capabilities currently in effect, and not capabilities ;
; which have been selected but require a system restart ;
; before taking effect. ;
; * Capabilities may change as a result of changes via a setup;
; utility or by the arrival or removal of devices. If power ;
; capabilities change, the APM BIOS must post a capabilities;
; change notification. ;
; * If APM BIOS returns from this function saying that it ;
; supports global standby or global suspend power states, the
; BIOS must post the appropriate request and resume events ;
; when entering and leaving the supported power states. ;
; * If a system does not support a resume timer (ALARM resume);
; the APM BIOS must not set any resume timer capability bits;
; (bits 2,3). Similarly, if the system does not support ;
; resume on ring indicator, the APM BIOS must not set any of;
; the resume on ring indicator capability bits (bits 4,5,6,7)
; * You need to implement this hook for APM 1.2 compatability.;
; Default implementation is 'MOV CX,000Bh' ;
; 'XOR BL,BL' ;
; 'RET' ;
;---------------------------------------------------------------;
get_pm_capabilities proc near
mov cx,0000000000111111b ; system can enter global standby state
; system can enter global suspend state
; resume timer will wake up from suspend
xor bl,bl ; no system battery
ret
get_pm_capabilities endp
;---------------------------------------------------------------;
;*****************************************************************;
;*****************************************************************;
;** **;
;** (C)Copyright 1985-1996, American Megatrends Inc. **;
;** **;
;** All Rights Reserved. **;
;** **;
;** 6145-F, Northbelt Parkway, Norcross, **;
;** **;
;** Georgia - 30071, USA. Phone-(770)-246-8600. **;
;** **;
;*****************************************************************;
;*****************************************************************;
;---------------------------------------------------------------;
; HOOK HOOK HOOK HOOK HOOK HOOK HOOK ;
; HOOK HOOK HOOK HOOK HOOK HOOK HOOK ;
;---------------------------------------------------------------;
; ENABLE_DISABLE_RESUME_ON_RING_INDICATOR ;
;---------------------------------------------------------------;
; Input : (DS) PM BIOS data segment ;
; (CX) 0000h disable resume on ring indicator ;
; 0001h enable resume on ring indicator ;
; STACK PRESENT ;
; Output: NONE ;
; Register destroyed : (EAX),(EBX),(ECX),(EDX),(ESI),(EDI);
; NOTE : ;
; * Control comes here from core smi/irq apm handler. ;
; * Control to this hook comes in response to apm enable/disable
; Resume on Ring indicator call (APM function # 12h). ;
; * If resume on ring is disabled, it should disable all resume
; on ring functionality, regardless of whether the ring ;
; indication comes from mother board serial ports or modems,;
; modems inserted into PCMCIA slots, or any other modem ring;
; which the system is wired to accept as a wake up event. ;
; * You need to implement this hook for APM 1.2 compatability.;
; Default implementation is 'RET' ;
;---------------------------------------------------------------;
enable_disable_resume_on_ring_indicator proc near
;;;;;;;;;;;;;; Note >>>>
mov byte ptr ds:[modem_ring],cl
;;;;;;;;;;;;; <<<<<<
ret
enable_disable_resume_on_ring_indicator endp
;---------------------------------------------------------------;
;*****************************************************************;
;*****************************************************************;
;** **;
;** (C)Copyright 1985-1996, American Megatrends Inc. **;
;** **;
;** All Rights Reserved. **;
;** **;
;** 6145-F, Northbelt Parkway, Norcross, **;
;** **;
;** Georgia - 30071, USA. Phone-(770)-246-8600. **;
;** **;
;*****************************************************************;
;*****************************************************************;
;---------------------------------------------------------------;
; HOOK HOOK HOOK HOOK HOOK HOOK HOOK ;
; HOOK HOOK HOOK HOOK HOOK HOOK HOOK ;
;---------------------------------------------------------------;
; ENABLE_DISABLE_TIMER_BASED_REQ ;
;---------------------------------------------------------------;
; Input : (DS) PM BIOS data segment ;
; (CX) 0000h disable timer based request ;
; 0001h enable timer based request ;
; STACK PRESENT ;
; Output: NONE ;
; Register destroyed : (EAX),(EBX),(ECX),(EDX),(ESI),(EDI);
; NOTE : ;
; * Control comes here from core smi/irq apm handler. ;
; * Control to this hook comes in response to apm enable/disable
; timer based request (APM function # 13h). ;
; * If timer based request is disabled, then APM BIOS must not;
; generate any more standby or suspend request based on ;
; inactivity timers. This is desirable for the operating ;
; system to use its own techniques to determine inactivity ;
; and to generate such low power requests of its own. ;
; Once disabled, APM BIOS may still post normal system or ;
; user standby or suspend requests only in the event of a ;
; user initiated action, such as lid closings, suspend button
; pushes etc. Critical suspend requests due to imminent ;
; battery failure are also still allowed. ;
; * You need to implement this hook for APM 1.2 compatability.;
; Default implementation is 'RET' ;
;---------------------------------------------------------------;
enable_disable_timer_based_req proc near
test cx,1
jz disable_ide_timer
mov al,q_ide_time_out
call check_cmos_data_far
mov ah,0ch ; in 5 second units - so multiply with 12 to make minutes
mul ah
jnz @f
dec ax ; disabled
@@:
mov byte ptr ds:gpm_ide_idle_timeout,al
jmp short @f
disable_ide_timer:
mov byte ptr ds:gpm_ide_idle_timeout,-1
@@:
ret
enable_disable_timer_based_req endp
;---------------------------------------------------------------;
;*****************************************************************;
;*****************************************************************;
;** **;
;** (C)Copyright 1985-1996, American Megatrends Inc. **;
;** **;
;** All Rights Reserved. **;
;** **;
;** 6145-F, Northbelt Parkway, Norcross, **;
;** **;
;** Georgia - 30071, USA. Phone-(770)-246-8600. **;
;** **;
;*****************************************************************;
;*****************************************************************;
;---------------------------------------------------------------;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -