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

📄 guiial.ps

📁 一款SmartPhone的驱动代码
💻 PS
📖 第 1 页 / 共 3 页
字号:
	add	%r12,%r10
	add	%r13,%r15
	ld.w	%r10,%r13
	xsrl	%r10,31
	add	%r13,%r10
	xsra	%r12,1
	xsra	%r13,1
	xcall	SetMouseXY

	.loc	206
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	SuspendMouse,	val	SuspendMouse,	scl	3,	type	0x21,	endef

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

	.loc	226
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	ResumeMouse,	val	ResumeMouse,	scl	3,	type	0x21,	endef

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

	.loc	247
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	UpdateKeyboard,	val	UpdateKeyboard,	scl	3,	type	0x24,	endef

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

	.loc	268
	.def	begin,	scl	100,	type	0x0,	endef
	.def	buf,	val	0,	scl	1,	type	0xc,	endef

	.loc	270
	ld.w	%r12,%sp
	xcall	fnIHL_ReadKeyboard
	cmp	%r10,0x0
	xjreq	__L25

	.loc	273
	xld.w	%r10,[IsKeyDown]
	cmp	%r10,0x0
	xjreq	__L23

	.loc	275
	xld.ub	%r11,[%sp]
	xld.w	%r10,0x00000001		; 1
	xld.b	[%r11+ubState],%r10

	.loc	276
	xjp	__L24
__L23:

	.loc	279
	xld.ub	%r10,[%sp]
	ld.w	%r13,0x0
	xld.b	[%r10+ubState],%r13
__L24:

	.loc	282
	xld.w	%r10,0x00000001		; 1
__L25:

	.loc	283
	.def	bend,	scl	110,	type	0x0,	endef
	xadd	%sp,%sp,4
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	GetKeyboardState,	val	GetKeyboardState,	scl	3,	type	0x62,	endef

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

	.loc	302
	xld.w	%r10,ubState

	.loc	303
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	SetLeds,	val	SetLeds,	scl	3,	type	0x21,	endef

	.loc	322
	.def	ent,	scl	101,	type	0x0,	endef
SetLeds:
;	.frame	%sp,4,$31		# vars= 0, regs= 1/0, args= 0, extra= 0
;	.mask	0x80000000,-4
;	.fmask	0x00000000,0
	.def	leds,	val	12,	scl	17,	type	0xe,	endef

	.loc	323
	xcall	fnIHL_WriteKeyboard

	.loc	324
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	SuspendKeyboard,	val	SuspendKeyboard,	scl	3,	type	0x21,	endef

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

	.loc	344
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	ResumeKeyboard,	val	ResumeKeyboard,	scl	3,	type	0x21,	endef

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

	.loc	365
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.align	1
	.def	WaitEvent,	val	WaitEvent,	scl	2,	type	0x24,	endef
	.global	WaitEvent

	.loc	389
	.def	ent,	scl	101,	type	0x0,	endef
WaitEvent:
;	.frame	%sp,32,$31		# vars= 8, regs= 5/0, args= 4, extra= 0
;	.mask	0x800f0000,-4
;	.fmask	0x00000000,0
	pushn	%r3
	xsub	%sp,%sp,12
	xld.w	[%sp+8],%r12
	.def	IsReturn,	val	8,	scl	9,	type	0xe,	endef

	.loc	391
	.def	begin,	scl	100,	type	0x0,	endef
	.def	retvalue,	val	1,	scl	4,	type	0x4,	endef
	.def	PenEvent,	val	2,	scl	4,	type	0xe,	endef
	.def	KeyEvent,	val	0,	scl	4,	type	0xe,	endef
	.def	IsTimeOut,	val	3,	scl	4,	type	0xe,	endef
	.def	p_flgptn,	val	4,	scl	1,	type	0xe,	endef
	ld.w	%r1,0x0
__L33:

	.loc	398
	ld.w	%r0,0x0

	.loc	399
	ld.w	%r2,%r0

	.loc	400
	ld.w	%r3,%r0

	.loc	403
	xld.w	%r10,[IsPenDown]
	cmp	%r10,0x0
	xjrne	__L42

	.loc	405
	xld.w	%r11,[%sp+8]
	cmp	%r11,0x0
	xjreq	__L35

	.loc	407
	xld.w	%r10,0x0000000a		; 10
	xjp	__L49
__L35:

	.loc	409
	xld.w	%r10,-1			; 0xffffffff
__L49:
	xld.w	[%sp],%r10
	xadd	%r12,%sp,4
	xld.w	%r13,0x00000001		; 1
	xld.w	%r14,0x00000111		; 273
	xld.w	%r15,0x00000002		; 2
	xcall	twai_flg

	.loc	411
	xld.w	%r10,[%sp+4]
	xand	%r10,%r10,0x00000001
	xjreq	__L37

	.loc	413
	xld.w	%r2,0x00000001		; 1

	.loc	414
	ld.w	%r12,%r2
	xld.w	%r13,0x00000110		; 272
	xcall	clr_flg

	.loc	415
	xjp	__L34
__L37:

	.loc	416
	xld.w	%r10,[%sp+4]
	xand	%r10,%r10,0x00000010
	xjreq	__L39

	.loc	418
	xld.w	%r0,0x00000001		; 1

	.loc	419
	ld.w	%r12,%r0
	xld.w	%r13,0x00000101		; 257
	xcall	clr_flg

	.loc	420
	xjp	__L34
__L39:

	.loc	422
	xld.w	%r3,0x00000001		; 1
__L34:

	.loc	426
	xld.w	%r10,[IsPenDown]
	cmp	%r10,0x0
	xjrne	__L42
	cmp	%r2,0x0
	xjreq	__L41
__L42:

	.loc	428
	xcall	UpdateMouse
	cmp	%r10,0x0
	xjreq	__L41

	.loc	431
	ld.w	%r10,%r1
	xoor	%r10,%r10,0x00000001
	xjp	__L48
__L41:

	.loc	436
	cmp	%r0,0x0
	xjreq	__L44

	.loc	438
	xcall	UpdateKeyboard
	cmp	%r10,0x0
	xjreq	__L44

	.loc	441
	ld.w	%r10,%r1
	xoor	%r10,%r10,0x00000002
	xjp	__L48
__L44:

	.loc	445
	cmp	%r3,0x0
	xjreq	__L33

	.loc	447
	ld.w	%r10,0x0

	.loc	449
__L48:

	.loc	450
	.def	bend,	scl	110,	type	0x0,	endef
	xadd	%sp,%sp,12
	popn	%r3
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.global	tIAL_Input
	.data
	.align	2
tIAL_Input:
	.word	UpdateMouse
	.word	GetMouseX
	.word	GetMouseY
	.word	SetMouseXY
	.word	GetMouseButton
	.word	SetMouseRange
	.word	SuspendMouse
	.word	ResumeMouse
	.word	UpdateKeyboard
	.word	GetKeyboardState
	.word	SuspendKeyboard
	.word	ResumeKeyboard
	.word	SetLeds
	.word	WaitEvent
	.code
	.align	1
	.def	fnIAL_InitInput,	val	fnIAL_InitInput,	scl	2,	type	0x21,	endef
	.global	fnIAL_InitInput

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

	.loc	487
	ld.w	%r15,0x0
	xld.w	[IsPenDown],%r15

	.loc	488
	xld.w	[IsKeyDown],%r15

	.loc	490
	xld.w	%r10,tIAL_Input
	xld.w	[tpIAL_Input],%r10

	.loc	492
	xcall	fnIHL_InitMouse

	.loc	493
	xcall	fnIHL_InitKeyboard

	.loc	496
	ld.w	%r15,0x0
	xld.w	[wXPos],%r15

	.loc	497
	xld.w	[wButtons],%r15

	.loc	498
	xld.w	[wMinX],%r15

	.loc	499
	xld.w	%r11,[tpGAL_Output]
	xld.w	%r10,[%r11+12]
	xsub	%r10,%r10,2
	xld.w	[wMaxX],%r10

	.loc	500
	xld.w	[wMinY],%r15

	.loc	501
	xld.w	%r10,[%r11+16]
	xsub	%r10,%r10,2
	xld.w	[wMaxY],%r10

	.loc	503
	xld.w	%r12,ubState
	ld.w	%r13,0x0
	xld.w	%r14,0x00000080		; 128
	xcall	memset

	.loc	504
	ret
	.def	end,	scl	111,	type	0x0,	endef
	.def	tpIAL_Input,	val	tpIAL_Input,	scl	2,	tag	T_IAL_Input,	size	56,	type	0x18,	endef

	.comm	tpIAL_Input 4
	.def	wXPos,	val	wXPos,	scl	3,	type	0x4,	endef

	.lcomm	wXPos 4
	.def	wYPos,	val	wYPos,	scl	3,	type	0x4,	endef

	.lcomm	wYPos 4
	.def	wMinX,	val	wMinX,	scl	3,	type	0x4,	endef

	.lcomm	wMinX 4
	.def	wMaxX,	val	wMaxX,	scl	3,	type	0x4,	endef

	.lcomm	wMaxX 4
	.def	wMinY,	val	wMinY,	scl	3,	type	0x4,	endef

	.lcomm	wMinY 4
	.def	wMaxY,	val	wMaxY,	scl	3,	type	0x4,	endef

	.lcomm	wMaxY 4
	.def	wButtons,	val	wButtons,	scl	3,	type	0x4,	endef

	.lcomm	wButtons 4
	.def	IsPenDown,	val	IsPenDown,	scl	2,	type	0xe,	endef

	.comm	IsPenDown 4
	.def	IsKeyDown,	val	IsKeyDown,	scl	2,	type	0xe,	endef

	.comm	IsKeyDown 4
	.def	ubState,	val	ubState,	scl	3,	dim	128,	size	128,	type	0x3c,	endef

	.lcomm	ubState 128
	.def	tIAL_Input,	val	tIAL_Input,	scl	2,	tag	T_IAL_Input,	size	56,	type	0x8,	endef


	.endfile

⌨️ 快捷键说明

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