⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ct_func.asl

📁 <B>Award BIOS(Basic Input/Output System)(电脑启动时所必需)的源码</B>
💻 ASL
字号:

        Name(OSFL, 1)		// Curernt OS name 1 - Win 98

        Method(STRC, 2) {

        If(LNotEqual(Sizeof(Arg0), Sizeof(Arg1))) {
                Return(0)
                           }


        Add(Sizeof(Arg0), 1, Local0)

        Name(BUF0, Buffer(Local0) {})
        Name(BUF1, Buffer(Local0) {})

        Store(Arg0, BUF0)
        Store(Arg1, BUF1)

        While(Local0) {
                Decrement(Local0)
                If(LNotEqual(Derefof(Index(BUF0, Local0)), Derefof(Index(BUF1, Local0)))) {
                        Return(Zero)
                        }
                           }
                   Return(One)		// Str1 & Str2 are match
        }
OperationRegion	(RTCM, SystemIO, 0x70, 0x2)
Field ( RTCM, ByteAcc, NoLock, Preserve) {
         CMIN,8,
                 CMDA,8 
         }
IndexField (CMIN, CMDA, ByteAcc, NoLock, Preserve) {
        Offset(0x0f),
        SHUT,8
        }	 		//end of indexed field
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 + -