📄 ct_func.asl
字号:
OperationRegion(\GRAM, SystemMemory, 0x00000400, 0x100)
Field(\GRAM, ByteAcc, NoLock, Preserve)
{
Offset(0x10),
FLG0, 8,
Offset(0xBA), //R04
SFLG,8 //Rga
}
OperationRegion(INFO, SystemMemory, 0x000ff840, 0x1)
Field(INFo, ByteAcc, NoLock, Preserve) {
KBDI, 1,
}
OperationRegion (BEEP, SystemIO, 0x61, 0x01)
Field (BEEP, ByteAcc, Nolock, Preserve) {
S1B, 8
}
OperationRegion (CONT, SystemIO, 0x40, 0x04)
Field (CONT, ByteAcc, Nolock, Preserve) {
CNT0, 8,
CNT1, 8,
CNT2, 8,
CTRL, 8
}
Method(SPKR,1){ //R01
Store(S1B, Local0) //save state
Store(0xB6, CTRL)
Store(0x55, CNT2)
Store(0x03, CNT2)
Store(ARG0, Local2) //Beep times //R01
While(LGreater(Local2,0))
{
Or(S1B, 0x03, S1B) //enable beep
Store(0x5FFF, Local3) //delay time
While(LGreater(Local3,0))
{
Decrement(Local3)
}
And(S1B, 0xFC, S1B) //disable beep
Store(0xEFF, Local3) //delay time
While(LGreater(Local3,0))
{
Decrement(Local3)
}
Decrement(Local2)
}
Store(Local0, S1B) //restore state
} //end of Method
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -