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

📄 vsa1back.asm

📁 X86 GX1 BOOTLOAD代码 ,支持WINCE操作系统!
💻 ASM
📖 第 1 页 / 共 2 页
字号:

;**************************************************************************
;*
;*      geodePmFDTimeout
;*
;*	Read/Write PM floppy drive timeout
;*
;*	Entry:
;*	  CH = 7 (Function 7)
;*
;*	Exit:
;*	  DX = Timeout in 1 Second Time Base, 0 for Infinite Timeout
;*
;*	Destroys:
;*
;**************************************************************************
geodePmFDTimeout PROC NEAR
	xor	dx, dx
	jmp	returnDx
geodePmFDTimeout ENDP

;**************************************************************************
;*
;*      geodePmPSTimeout
;*
;*	Read/Write PM parallel/serial port timeout
;*
;*	Entry:
;*	  CH = 8 (Function 8)
;*
;*	Exit:
;*	  DX = Timeout in 1 Second Time Base, 0 for Infinite Timeout
;*
;*	Destroys:
;
;**************************************************************************
geodePmPSTimeout PROC NEAR
	xor	dx, dx
	jmp	returnDx
geodePmPSTimeout ENDP

;**************************************************************************
;*
;*      geodePmAlarmTime
;*
;*	Read/Write PM RTC Alarm Time
;*
;*	Entry:
;*	  CH = 9 (Function 9)
;*
;*	Exit:
;*	  DX = Timeout in 1 Second Time Base, 0 for Infinite Timeout
;*
;*	Destroys: 
;*
;**************************************************************************
;
geodePmAlarmTime PROC NEAR
	xor	dx, dx
	jmp	returnDx

geodePmAlarmTime ENDP

;**************************************************************************
;*
;*      geodePmWakeupMask
;*
;*	Read/Write Get Wakeup Interrupt Mask
;*
;*	Entry:
;*	  CH = 0A (Function A)
;*	  DX - Mask of events to report:
;*	       If PM is disabled, then AND input mask with Setup
;*	       settings.  Else, use mask directly.
;*	       Bit            Event
;*	       ---         -------------
;*	        0          Keyboard
;*	        1          Mouse
;*	        2          Modem Ring
;*	        3          COM (any)
;*	        4          Serial Mouse
;*	        5          LPT
;*	        6          RTC
;*	        7          Network
;*	      others       reserved
;*
;*	Exit:
;*	  DX - Mask of interrupts that should cause system to wake up
;*	  Carry Flag -  set if error
;*
;*	Destroys:
;*
;**************************************************************************
BUFFER_SIZE	EQU	100h

WAKE_KYBD	EQU	000000001b
WAKE_MOUSE	EQU	000000010b
WAKE_MODEM	EQU	000000100b
WAKE_COM	EQU	000001000b
WAKE_SMOUSE	EQU	000010000b
WAKE_LPT	EQU	000100000b
WAKE_RTC	EQU	001000000b
WAKE_NETWRK	EQU	010000000b

geodePmWakeupMask PROC NEAR
	mov	dx, 00h
	or	dx, WAKE_KYBD
	or	dx, WAKE_MOUSE
	jmp	returnDX
geodePmWakeupMask ENDP

;**************************************************************************
;*
;*      geodePmIdleTimeout
;*
;*	Read/Write Idle Timeout
;*
;*	Entry:
;*	  CH = 0B (Function B)
;*	  CL = 0 for Read
;*	       1 for Write
;*
;*	Exit:
;*	  DX - Timeout in milliseconds
;*	       0 = Infinite timeout
;*
;*	Destroys
;*
;**************************************************************************
geodePmIdleTimeout PROC NEAR
	xor	dx, dx
	jmp	returnDx
geodePmIdleTimeout ENDP

;**************************************************************************
;*
;*      geodePmS2d
;*
;*	R/W PM Save/Restore Flag
;*
;*	Entry:
;*	  CH = 0C (Fuction C)
;*	  CL = 0 to Query flag
;*	       1 to Set flag
;*	       2 to Clear flag
;*	  DL = 2 LSBs contain CRT/LCD flag
;*	       bit 0 = LCD
;*	       bit 1 = CRT
;*
;*	Exit:
;*
;*	Destroys:
;*
;**************************************************************************
geodePmS2d PROC NEAR
	xor	dx, dx
	jmp	returnDx
geodePmS2d ENDP

;**************************************************************************
;*
;*      geodePmBehavior
;*
;*	Reserved Function
;*
;*	Entry:
;*	  CH = 0D (Function D)
;*
;*	Exit:
;*	  None
;*
;*	Destroys:
;*	  None
;*
;**************************************************************************
geodePmBehavior PROC
	xor	dx, dx
	jmp	returnDx

	stc			; Not implemented
	ret
geodePmBehavior ENDP

geodePmExtTable LABEL WORD
	DW	vsaGetDelayParam
	DW	vsaSuspendEntry
	DW	vsaSuspendExit
	DW	vsaDelayParamCallback
	DW	vsaTimerCallback
	DW	vsaSuspendMask
geodePmExtTableLength EQU ($ - geodePmExtTable)/2

;**************************************************************************
;*
;*      geodePmExt
;*
;*	Entry:
;*	  CL = sub function to execute
;*
;*	Exit:
;*	Destroys:
;*
;**************************************************************************
geodePmExt PROC
        cmp     cl, LOW OFFSET geodePmExtTableLength ; Test if within range
	jae	badPmParam

; Parse function number and call it
;
	mov	di, cx
	shl	di, 1			; Move function number to place with WORD adjustment
	and	di, 00FEh		; Mask Most Significant Byte for safty

        call    geodePmExtTable[di]     ; Call the corresponding function

	ret
geodePmExt ENDP

;**************************************************************************
;*
;*      geodePmExtDflt
;*
;*	A default return
;*
;*	Entry:
;*
;*	Exit:
;*	  DX = 0
;*
;*	Destroys:
;*
;**************************************************************************
geodePmExtDflt PROC
	mov	dx, 0
	jmp	ReturnDX
geodePmExtDflt ENDP

;**************************************************************************
;*
;*	vsaGetDelayParam
;*
;*	Called to get a delay paramater in seconds that will be used by
;*	VSA to call back SUBFUNCTION = 3 after suspend is entered.
;*
;*	Entry:
;*
;*	Exit:
;*	  Set DX = #seconds desired
;*
;*	Destroys:
;*
;**************************************************************************
vsaGetDelayParam PROC
	mov	dx, 5		; Assume good
	jmp	ReturnDX
vsaGetDelayParam ENDP

;**************************************************************************
;*
;*	vsaSuspendEntry
;*
;*	Called when either Standby or Suspend is entered
;*
;*	Entry:
;*	  CL = subfunction to execute
;*	  DX = APM Event code
;*
;*	Exit:
;*	Destroys:
;*;*
;**************************************************************************
vsaSuspendEntry PROC
	; Suspend ON LED
	mov	eax, CX55x0_ID
	mov	al, CX5530_REG90
	mov	dl, 3
	NOSTACK	bx, cy55x0RegWrite8
	mov	eax, CX55x0_ID
	mov	al, CX5530_REG91
	mov	dl, 1
	NOSTACK	bx, cy55x0RegWrite8
	; Suspend ON LED END
	mov	dx, 0			; Assume good

	jmp	ReturnDX
vsaSuspendEntry ENDP

;**************************************************************************
;*
;*	vsaSuspendExit
;*
;*	Called when either Standby or Suspend is exited
;*
;*	Entry:
;*	  DX = 0
;*
;*	Exit:
;*	Destroys:
;*
;**************************************************************************
vsaSuspendExit PROC
	; Power ON LED
	mov	eax, CX55x0_ID
	mov	al, CX5530_REG90
	mov	dl, 3
	NOSTACK	bx, cy55x0RegWrite8
	mov	eax, CX55x0_ID
	mov	al, CX5530_REG91
	mov	dl, 2
	NOSTACK	bx, cy55x0RegWrite8
	; Power ON LED END
	mov	dx, 0
	jmp	ReturnDX
vsaSuspendExit ENDP

;**************************************************************************
;*
;*	vsaDelayParamCallback
;*
;*	Called after Suspend has been entered and the time specified in
;*	Function 0 has expired.
;*
;*	Entry:
;*	  DX=0
;*
;*	Exit:
;*	Destroys:
;*
;**************************************************************************
vsaDelayParamCallback PROC
	mov	dx, 1
	jmp	ReturnDX
vsaDelayParamCallback ENDP

;**************************************************************************
;*
;*	vsaTimerCallback
;*
;*	Called every 8ms while in Standby/Suspend
;*
;*	Have OEM function set AX to 0 to stay in Standby/Suspend or non 0
;*	to exit Standby/Suspend.  We want to preserve DX in case the OEM
;*	function wants to perform some routine based on every Nth callback.
;*
;*	Never Called in a 5530 system
;*
;*	Entry:
;*	  DX= # times this function has called
;*
;*	Exit:
;*	  DX = 0 to remain in Standby/Suspend
;*	       Non 0 to wakeup
;*	Destroys:
;*
;**************************************************************************
vsaTimerCallback PROC
	mov	dx, 0
	jmp	ReturnDX
vsaTimerCallback ENDP

;**************************************************************************
;*
;*	vsaSuspendMask
;*
;*	In DX place the 5520 GPIO that the Suspend switch is hooked too.
;*	For example, GPIO1 DX=02h.  Return 0 if none used.
;*	NOTE: AS OF 11/07/97 ONLY 5520 GPIO1 IS SUPPORTED.
;*
;*	Entry:
;*	Exit:
;*	Destroys:
;*
;**************************************************************************
vsaSuspendMask PROC
	mov	dx, 0
	Jmp	ReturnDX
vsaSuspendMask ENDP

;**************************************************************************
;*
;*	virtualRegInit
;*
;*	A stub routine.  This routine has meaning only for VSA2, but it
;*	needs to exist because a CALL to it occurs in ROMINIT.ASM
;*
;*	Entry:
;*	Exit:
;*	Destroys:
;*
;**************************************************************************
virtualRegInit PROC NEAR PUBLIC
	ret
virtualRegInit ENDP

_TEXT ENDS

END

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -