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

📄 tvstub.asm

📁 X86 GX1 BOOTLOAD代码 ,支持WINCE操作系统!
💻 ASM
字号:
;**************************************************************************
;*
;*  TVCODE.ASM
;*
;*  Copyright (c) 1999 National Semiconductor Corporation.
;*  All Rights Reserved.
;*
;*  Function:
;*    TV tuner functionality.
;*
;*  $Revision:: 1   $
;*
;**************************************************************************

;.MODEL TINY
.486P

	INCLUDE MACROS.INC
	INCLUDE DEF.INC 

_TEXT SEGMENT PUBLIC use16 'CODE'

        PUBLIC  Geode_Video_Interface
;**************************************************************************
;*
;*      Geode_Video_Interface
;*
;*	Entry:
;*	Exit:
;*	Destroys:
;*
;**************************************************************************
Geode_Video_Interface PROC NEAR
	cmp	ch, MAX_FUNC
	jae	SHORT Bad_Function

	mov	bl, ch
	xor	bh, bh
	add	bx, bx
	jmp	WORD PTR cs:[TV_Routines + bx]
Geode_Video_Interface ENDP

;**************************************************************************
;*	Bad_Function
;*
;**************************************************************************
Bad_Function:
	stc
	ret

TV_Routines:
	DW	OFFSET Query_TV_Encoder 	; CH = 0 query tv encoder
	DW	OFFSET Set_TV_Mode		; CH = 1
	DW	OFFSET Adjust_TV_Position	; CH = 2
	DW	OFFSET Adjust_TV_Brightness	; CH = 3
	DW	OFFSET Adjust_TV_Output 	; CH = 4
	DW	OFFSET Reset_Encoder		; CH = 5
	DW	OFFSET Bad_Function		; CH = 6
	DW	OFFSET Bad_Function		; CH = 7
	DW	OFFSET Bad_Function		; CH = 8
	DW	OFFSET Bad_Function		; CH = 9
	DW	OFFSET Bad_Function		; CH = A
	DW	OFFSET Bad_Function		; CH = B
	DW	OFFSET Bad_Function		; CH = C
	DW	OFFSET Bad_Function		; CH = D
	DW	OFFSET Bad_Function		; CH = E
	DW	OFFSET Bad_Function		; CH = F
	DW	OFFSET Return_DDC2_Status	; CH = 10h
	DW	OFFSET Return_DDC2_Information	; CH = 11h
MAX_FUNC EQU ($-TV_Routines)/2

;**************************************************************************
;*
;*	TV_Init
;*
;*	Configure TVOUT by CMOS setting
;*	  Set TV output mode
;*	  Set TV positions
;*	  Set TV format and resolution (the resolution is 640x480)
;*
;*	Entry:
;*	  None
;*
;*	Exit:
;*	  None
;*
;*	Destroys:
;*;*	Processing:
;*
;**************************************************************************
TV_Init PROC NEAR
	ret
TV_Init	ENDP
;**************************************************************************
;*
;*	Query_TV_Encoder
;*
;*	Entry:
;*	  CH = 00
;*
;*	Exit:
;*	  DX = Encoder Type
;*	       0000h - NONE
;*	       0001h - AIT1108
;*	       0002h - CH7002
;*	       0100h - CH7001
;*
;*	Destroys:
;*
;**************************************************************************
; public Query_TV_Encoder
Query_TV_Encoder	PROC NEAR
No_TV_chip:
	mov	dx, 0000h		; Signify that no TV encoder is present
	ret
Query_TV_Encoder	ENDP

;**************************************************************************
;*
;*	Set_TV_Mode
;*
;*	Entry:
;*	  CH = 01
;*
;*	Exit:
;*	  DL: bit 0 - selects underscan (otherwise overscan)
;*	      bit 1 - selects 800x600 (otherwise 640x480)
;*	      bit 7 - selects PAL (otherwise NTSC)
;*
;*	Destroys:
;*
;**************************************************************************
Set_TV_Mode	PROC NEAR
	stc				; error
	ret

Set_TV_Mode	ENDP

;**************************************************************************
;*
;*	Adjust_TV_Position
;*
;*	This routine adjusts the registers on the TV support chip.  It is
;*	called when an application is centering the image for a certain
;*	mode.
;*
;*	Entry:
;*	  CH = 02
;*	  DL = new signed absolute horizontal position (positive left)
;*	  DH = new signed absolute vertical position (positive down)
;*
;*	Exit:
;*	Destroys:
;*
;**************************************************************************
Adjust_TV_Position	PROC NEAR
	stc				; error
	ret
Adjust_TV_Position	ENDP


;**************************************************************************
;*
;*	Adjust_TV_Brightness
;*
;*	Entry:
;*	  CH = 03
;*	  DL = brightness
;*
;*	Exit:
;*
;*	Destroys:
;*
;**************************************************************************
Adjust_TV_Brightness	PROC NEAR
	stc				; error
	ret
Adjust_TV_Brightness	ENDP

;**************************************************************************
;*
;*	Adjust_TV_Output
;*
;*	Entry:
;*	  CH = 04
;*	  DL = Bit 0: Enable S-video output
;*	       Bit 1: Enable composite output
;*	       Bit 2: Enable contrast circuitry
;*
;*	Exit:
;*
;*	Destroys:
;*
;**************************************************************************
Adjust_TV_Output	PROC NEAR
	stc				; error
	ret
Adjust_TV_Output	ENDP

;**************************************************************************
;*
;*	Reset_Encoder
;*
;*	This routine resets the encoder after changing modes, if needed.
;*
;*	Entry:
;*	  CH = 05
;*
;*	Exit:
;*	Destroys:
;*
;**************************************************************************
Reset_Encoder PROC NEAR
	stc			;error
	ret
Reset_Encoder ENDP

;**************************************************************************
;*
;*	Return_DDC2_Status
;*
;*	Note that the DDC2 supported bit should only be set if the monitor
;*	acknowledges an access to A0h across the I2C bus.
;*
;*	Entry:
;*	  CH = 10h
;*
;*	Exit:
;*	  CF set if DDC2 supported
;*
;*	Destroys:
;*
;**************************************************************************
Return_DDC2_Status	PROC NEAR
	push	ax			; save ax
	mov	ax,1
	or	ax,ax			; set non-zero
	pop	ax			; restore ax
	clc				; DDC2 not supported
	ret
Return_DDC2_Status	ENDP

;**************************************************************************
;*
;*	Return_DDC2_Information
;*
;*	This routine reads DDC data from the monitor.
;*
;*	Entry:
;*	  CH = 11h
;*	  ES:DI = DDC data buffer
;*
;*	Exit:
;*	  ES:DI = data stored in DDC buffer
;*
;*	Destroys:
;*	  AX, BX, CX, DX.
;*	  SI must be preserved.
;*
;**************************************************************************
Return_DDC2_Information PROC NEAR
	stc				; error
	ret

Return_DDC2_Information ENDP


_TEXT ENDS

END

⌨️ 快捷键说明

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