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

📄 drv_lcd.ms

📁 一款SmartPhone的驱动代码
💻 MS
📖 第 1 页 / 共 4 页
字号:
	.def	DisableClipping,	val	64,	scl	8,	type	0x91,	endef
	.def	SetClipping,	val	68,	scl	8,	type	0x94,	endef
	.def	GetClipping,	val	72,	scl	8,	type	0x94,	endef
	.def	GetBgColor,	val	76,	scl	8,	type	0x94,	endef
	.def	SetBgColor,	val	80,	scl	8,	type	0x94,	endef
	.def	GetFgColor,	val	84,	scl	8,	type	0x94,	endef
	.def	SetFgColor,	val	88,	scl	8,	type	0x94,	endef
	.def	MapColor,	val	92,	scl	8,	type	0x9e,	endef
	.def	UnmapPixel,	val	96,	scl	8,	type	0x94,	endef
	.def	PackColors,	val	100,	scl	8,	type	0x94,	endef
	.def	UnpackPixels,	val	104,	scl	8,	type	0x94,	endef
	.def	GetPalette,	val	108,	scl	8,	type	0x94,	endef
	.def	SetPalette,	val	112,	scl	8,	type	0x94,	endef
	.def	SetColorFulPalette,	val	116,	scl	8,	type	0x94,	endef
	.def	BoxSize,	val	120,	scl	8,	type	0x9e,	endef
	.def	FillBox,	val	124,	scl	8,	type	0x94,	endef
	.def	PutBox,	val	128,	scl	8,	type	0x94,	endef
	.def	GetBox,	val	132,	scl	8,	type	0x94,	endef
	.def	PutBoxMask,	val	136,	scl	8,	type	0x94,	endef
	.def	ScaleBox,	val	140,	scl	8,	type	0x94,	endef
	.def	CopyBox,	val	144,	scl	8,	type	0x94,	endef
	.def	CrossBlit,	val	148,	scl	8,	type	0x94,	endef
	.def	DrawHLine,	val	152,	scl	8,	type	0x94,	endef
	.def	PutHLine,	val	156,	scl	8,	type	0x94,	endef
	.def	GetHLine,	val	160,	scl	8,	type	0x94,	endef
	.def	DrawVLine,	val	164,	scl	8,	type	0x94,	endef
	.def	PutVLine,	val	168,	scl	8,	type	0x94,	endef
	.def	GetVLine,	val	172,	scl	8,	type	0x94,	endef
	.def	DrawPixel,	val	176,	scl	8,	type	0x94,	endef
	.def	GetPixel,	val	180,	scl	8,	type	0x94,	endef
	.def	circle,	val	184,	scl	8,	type	0x94,	endef
	.def	line,	val	188,	scl	8,	type	0x94,	endef
	.def	rectangle,	val	192,	scl	8,	type	0x94,	endef
	.def	ellipse,	val	196,	scl	8,	type	0x94,	endef
	.def	ellipsearc,	val	200,	scl	8,	type	0x94,	endef
	.def	fillellipsearc,	val	204,	scl	8,	type	0x94,	endef
	.def	arc,	val	208,	scl	8,	type	0x94,	endef
	.def	T_GAL_Output,	val	212,	scl	102,	tag	T_GAL_Output,	size	212,	endef
	.def	T_GAL_Output,	scl	13,	tag	T_GAL_Output,	size	212,	type	0x8,	endef
	.def	T_GAL_ScreenDevice,	scl	10,	type	0x8,	size	84,	endef
	.def	xRes,	val	0,	scl	8,	type	0x4,	endef
	.def	yRes,	val	4,	scl	8,	type	0x4,	endef
	.def	bpp,	val	8,	scl	8,	type	0x4,	endef
	.def	planes,	val	12,	scl	8,	type	0x4,	endef
	.def	InitScrDev,	val	16,	scl	8,	type	0x191,	endef
	.def	SetPalette,	val	20,	scl	8,	type	0x91,	endef
	.def	GetPalette,	val	24,	scl	8,	type	0x91,	endef
	.def	DrawPixel,	val	28,	scl	8,	type	0x91,	endef
	.def	ReadPixel,	val	32,	scl	8,	type	0x9e,	endef
	.def	DrawHLine,	val	36,	scl	8,	type	0x91,	endef
	.def	PutHLine,	val	40,	scl	8,	type	0x91,	endef
	.def	GetHLine,	val	44,	scl	8,	type	0x91,	endef
	.def	DrawVLine,	val	48,	scl	8,	type	0x91,	endef
	.def	PutVLine,	val	52,	scl	8,	type	0x91,	endef
	.def	GetVLine,	val	56,	scl	8,	type	0x91,	endef
	.def	Blit,	val	60,	scl	8,	type	0x91,	endef
	.def	PutBox,	val	64,	scl	8,	type	0x91,	endef
	.def	GetBox,	val	68,	scl	8,	type	0x91,	endef
	.def	PutBoxMask,	val	72,	scl	8,	type	0x91,	endef
	.def	CopyBox,	val	76,	scl	8,	type	0x91,	endef
	.def	MapColor,	val	80,	scl	8,	type	0x9e,	endef
	.def	T_GAL_ScreenDevice,	val	84,	scl	102,	tag	T_GAL_ScreenDevice,	size	84,	endef
	.def	T_GAL_ScreenDevice,	scl	13,	tag	T_GAL_ScreenDevice,	size	84,	type	0x8,	endef
	.def	T_IAL_Input,	scl	10,	type	0x8,	size	56,	endef
	.def	UpdateMouse,	val	0,	scl	8,	type	0x94,	endef
	.def	GetMouseX,	val	4,	scl	8,	type	0x94,	endef
	.def	GetMouseY,	val	8,	scl	8,	type	0x94,	endef
	.def	SetMouseXY,	val	12,	scl	8,	type	0x91,	endef
	.def	GetMouseButton,	val	16,	scl	8,	type	0x94,	endef
	.def	SetMouseRange,	val	20,	scl	8,	type	0x91,	endef
	.def	SuspendMouse,	val	24,	scl	8,	type	0x91,	endef
	.def	ResumeMouse,	val	28,	scl	8,	type	0x91,	endef
	.def	UpdateKeyboard,	val	32,	scl	8,	type	0x94,	endef
	.def	GetKeyboardState,	val	36,	scl	8,	type	0x192,	endef
	.def	SuspendKeyboard,	val	40,	scl	8,	type	0x91,	endef
	.def	ResumeKeyboard,	val	44,	scl	8,	type	0x91,	endef
	.def	SetLeds,	val	48,	scl	8,	type	0x91,	endef
	.def	WaitEvent,	val	52,	scl	8,	type	0x94,	endef
	.def	T_IAL_Input,	val	56,	scl	102,	tag	T_IAL_Input,	size	56,	endef
	.def	T_IAL_Input,	scl	13,	tag	T_IAL_Input,	size	56,	type	0x8,	endef
	.global	DISCTL_DATA1
	.code
	.align	2
DISCTL_DATA1:
	.half	248
	.half	0
	.half	240
	.half	0
	.half	2
	.global	DISCTL_DATA2
	.align	2
DISCTL_DATA2:
	.half	207
	.half	1
	.half	6
	.half	24
	.half	4
	.half	0
	.global	GCP64
	.align	2
GCP64:
	.half	65
	.half	0
	.half	129
	.half	2
	.half	1
	.half	1
	.half	2
	.half	4
	.half	8
	.half	8
	.half	32
	.half	129
	.half	8
	.half	66
	.half	8
	.half	137
	.half	18
	.half	37
	.half	41
	.half	85
	.half	42
	.half	169
	.half	42
	.half	171
	.half	255
	.half	254
	.half	0
	.half	0
	.half	0
	.half	0
	.half	0
	.half	0
	.global	pVRAM
	.data
	.align	2
pVRAM:
	.word	VRAM
	.code
	.align	1
	.def	halDelayUS,	val	halDelayUS,	scl	2,	type	0x21,	endef
	.global	halDelayUS

	.loc	30
	.def	ent,	scl	101,	type	0x0,	endef
halDelayUS:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0

	.loc	31
	.def	begin,	scl	100,	type	0x0,	endef
	.def	i,	val	11,	scl	4,	type	0x4,	endef
	.def	j,	val	10,	scl	4,	type	0x4,	endef

	.loc	32
	ld.w	%r11,0x0
	ext	0x3		; 	xld.w	%r12,0x000000c7		; 199
	ld.w	%r12,0x7
	ext	0x2		; 	xld.w	%r13,0x000000b3		; 179
	ld.w	%r13,0x33
__LX5:				; __L5:

	.loc	34
	ld.w	%r10,0x0
__LX9:				; __L9:

	.loc	35
; APP
	nop
; NO_APP

	.loc	34
	add	%r10,0x1	; 	xadd	%r10,%r10,1
	cmp	%r10,%r12
	jrle	__LX9		; 	xjrle	__L9

	.loc	32
	add	%r11,0x1	; 	xadd	%r11,%r11,1
	cmp	%r11,%r13
	jrle	__LX5		; 	xjrle	__L5

	.loc	37
	.def	bend,	scl	110,	type	0x0,	endef
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	init_dlcd_hardware,	val	init_dlcd_hardware,	scl	2,	type	0x21,	endef
	.global	init_dlcd_hardware

	.loc	40
	.def	ent,	scl	101,	type	0x0,	endef
init_dlcd_hardware:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0

	.loc	41
	.def	begin,	scl	100,	type	0x0,	endef

	.loc	43
	ext	0x0		; 	xld.w	%r11,0x000402dc		; 262876
	ext	0x100b
	ld.w	%r11,0x1c
	bclr	[%r11],0x5	; 	xbclr	[%r11],0x5

	.loc	44
	ext	0x0		; 	xld.w	%r11,0x000402de		; 262878
	ext	0x100b
	ld.w	%r11,0x1e
	bset	[%r11],0x5	; 	xbset	[%r11],0x5

	.loc	45
	ext	0x0		; 	xld.w	%r11,0x000402dd		; 262877
	ext	0x100b
	ld.w	%r11,0x1d
	bset	[%r11],0x5	; 	xbset	[%r11],0x5

	.loc	47
	ld.w	%r12,0x0
	ext	halInitController@rh	; 	xcall	halInitController
	ext	halInitController@rm
	call	halInitController@rl

	.loc	50
	ext	0x0		; 	xld.w	%r11,0x000402d4		; 262868
	ext	0x100b
	ld.w	%r11,0x14
	bclr	[%r11],0x6	; 	xbclr	[%r11],0x6

	.loc	51
	ext	0x0		; 	xld.w	%r11,0x000402d6		; 262870
	ext	0x100b
	ld.w	%r11,0x16
	bset	[%r11],0x6	; 	xbset	[%r11],0x6

	.loc	52
	ext	0x0		; 	xld.w	%r11,0x000402d5		; 262869
	ext	0x100b
	ld.w	%r11,0x15
	bclr	[%r11],0x6	; 	xbclr	[%r11],0x6

	.loc	53
	bset	[%r11],0x6	; 	xbset	[%r11],0x6

	.loc	55
	ld.w	%r12,0x0
	ext	SetOutputPort@rh	; 	xcall	SetOutputPort
	ext	SetOutputPort@rm
	call	SetOutputPort@rl

	.loc	57
	ld.w	%r12,0x0
	ext	SetPanelIfType@rh	; 	xcall	SetPanelIfType
	ext	SetPanelIfType@rm
	call	SetPanelIfType@rl

	.loc	59
	ld.w	%r12,0x4	; 	xld.w	%r12,0x00000004		; 4
	ext	SetLcdPClkDivide@rh	; 	xcall	SetLcdPClkDivide
	ext	SetLcdPClkDivide@rm
	call	SetLcdPClkDivide@rl

	.loc	60
	ld.w	%r12,0x1	; 	xld.w	%r12,0x00000001		; 1
	ext	SetRGBPanelClkPol@rh	; 	xcall	SetRGBPanelClkPol
	ext	SetRGBPanelClkPol@rm
	call	SetRGBPanelClkPol@rl

	.loc	61
	ld.w	%r12,0x12	; 	xld.w	%r12,0x00000012		; 18
	ext	SetRGBPanelDataWidth@rh	; 	xcall	SetRGBPanelDataWidth
	ext	SetRGBPanelDataWidth@rm
	call	SetRGBPanelDataWidth@rl

	.loc	62
	ld.w	%r12,0x0
	ext	SetRGBPanelType@rh	; 	xcall	SetRGBPanelType
	ext	SetRGBPanelType@rm
	call	SetRGBPanelType@rl

	.loc	64
	ext	0x3		; 	xld.w	%r12,0x000000d0		; 208
	ld.w	%r12,0x10
	ext	0x3		; 	xld.w	%r13,0x000000fa		; 250
	ld.w	%r13,0x3a
	ext	SetLcdHVTotal@rh	; 	xcall	SetLcdHVTotal
	ext	SetLcdHVTotal@rm
	call	SetLcdHVTotal@rl

	.loc	65
	ld.w	%r12,0x0
	ext	0x2		; 	xld.w	%r13,0x000000b0		; 176
	ld.w	%r13,0x30
	ext	0x3		; 	xld.w	%r14,0x000000f0		; 240
	ld.w	%r14,0x30
	ext	SetLcdHVDispPer@rh	; 	xcall	SetLcdHVDispPer
	ext	SetLcdHVDispPer@rm
	call	SetLcdHVDispPer@rl

	.loc	66
	ld.w	%r12,0xe	; 	xld.w	%r12,0x0000000e		; 14
	ld.w	%r13,0x1	; 	xld.w	%r13,0x00000001		; 1
	ext	SetLcdHVStartPos@rh	; 	xcall	SetLcdHVStartPos
	ext	SetLcdHVStartPos@rm
	call	SetLcdHVStartPos@rl

	.loc	67
	ld.w	%r12,0x0
	ld.w	%r13,0xa	; 	xld.w	%r13,0x0000000a		; 10
	ld.w	%r14,0xe	; 	xld.w	%r14,0x0000000e		; 14
	ext	SetLcdFpline@rh	; 	xcall	SetLcdFpline
	ext	SetLcdFpline@rm
	call	SetLcdFpline@rl

⌨️ 快捷键说明

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