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

📄 timer.s

📁 ARM入门的好帮手.包含了从简单到相对较复杂的程序.
💻 S
字号:
	.file	"c:/at91/software/projects/bench/source/timer.c"
	.option	svr4
	.option	thumb_code
	.option	inter
	.ident	"hc4.5a -O7 \n"
	.option	noswst
	.seg	".text",text
	.option	code16,inter
.L00TEXT:
;-------------| at91_tc_open_count |-------------------
	.global	at91_tc_open_count
at91_tc_open_count:
	.cfa_bf	at91_tc_open_count
	push	{%r4,%r5,%r7,%lr}
	.cfa_push	{%r4,%r5,%r7,%lr}
	mov	%r5,%r0
	ldr	%r0,[%r5, #0]
	ldr	%r7,[%r0, #0]
	ldr	%r4,[%pc, #.LC01-.-4]
	mov	%r1,%r4
	mov	%r2,#1
	mov	%r3,#0
	bl	at91_tc_open
	ldr	%r0,[%r5, #4]
	mov	%r1,%r4
	mov	%r2,#1
	mov	%r3,#0
	bl	at91_tc_open
	ldr	%r0,[%r5, #8]
	mov	%r1,%r4
	mov	%r2,#1
	mov	%r3,#0
	bl	at91_tc_open
	mov	%r3,#2
	str	%r3,[%r7, #28]
	mov	%r0,#1
	str	%r0,[%r7, #0]
	str	%r3,[%r7, #0x5c]
	str	%r0,[%r7, #64]
	mov	%r1,%r7
	add	%r1,#128
	str	%r3,[%r1, #28]
	mov	%r2,#128
	str	%r0,[%r7, %r2]
	str	%r0,[%r1, #64]
	mov	%r3,#56
	str	%r3,[%r1, #0x44]
	ldr	%r3,[%pc, #.LC01+4-.-4]
	str	%r3,[%r7, #4]
	mov	%r4,#250
	lsl	%r4,#2
	str	%r4,[%r7, #28]
	mov	%r5,#250
	lsl	%r5,#1
	str	%r5,[%r7, #20]
	str	%r0,[%r7, #0]
	ldr	%r3,[%pc, #.LC01+8-.-4]
	str	%r3,[%r7, #0x44]
	str	%r4,[%r7, #0x5c]
	str	%r5,[%r7, #0x54]
	str	%r0,[%r7, #64]
	ldr	%r3,[%pc, #.LC01+12-.-4]
	str	%r3,[%r1, #4]
	ldr	%r3,[%pc, #.LC01+16-.-4]
	str	%r3,[%r1, #28]
	str	%r0,[%r7, %r2]
	ldr	%r3,[%r7, #32]
	ldr	%r3,[%r7, #0x60]
	ldr	%r3,[%r1, #32]
	mov	%r3,#4
	str	%r3,[%r7, %r2]
	str	%r3,[%r7, #64]
	.cfa_remember_state
	pop	{%r4,%r5,%r7}
	.cfa_pop	{%r4,%r5,%r7}
	pop	{%r3}
	.cfa_pop	{%r3}
	bx	%r3
	.cfa_restore_state
	.cfa_ef
	.type at91_tc_open_count, @function
	.size at91_tc_open_count, . - at91_tc_open_count
;-------------| at91_tc_start |-------------------
	.global	at91_tc_start
at91_tc_start:
	.cfa_bf	at91_tc_start
	mov	%r2,#4
	ldr	%r3,[%r0, #0]
	ldr	%r3,[%r3, #0]
	str	%r2,[%r3, #0]
	bx	%lr
	.cfa_ef
	.type at91_tc_start, @function
	.size at91_tc_start, . - at91_tc_start
;-------------| at91_tc_stop |-------------------
	.global	at91_tc_stop
at91_tc_stop:
	.cfa_bf	at91_tc_stop
	push	{%r5,%r7,%lr}
	.cfa_push	{%r5,%r7,%lr}
	sub	%sp,#4
	.cfa_push	4
	mov	%r7,%r0
	ldr	%r0,[%r7, #0]
	ldr	%r2,[%r0, #0]
	mov	%r3,#2
	str	%r3,[%r2, #0]
	ldr	%r5,[%r2, #16]
	ldr	%r1,[%r2, #0x50]
	mov	%r3,#250
	lsl	%r3,#2
	mul	%r3,%r1
	add	%r1,%r3,%r5
	add	%r2,#128
	ldr	%r2,[%r2, #16]
	ldr	%r3,[%pc, #.LC01+20-.-4]
	mul	%r3,%r2
	add	%r5,%r3,%r1
	lsl	%r5,#1
	bl	at91_tc_close
	ldr	%r0,[%r7, #4]
	bl	at91_tc_close
	ldr	%r0,[%r7, #8]
	bl	at91_tc_close
	mov	%r0,%r5
	.cfa_remember_state
	add	%sp,#4
	.cfa_pop	4
	pop	{%r5,%r7}
	.cfa_pop	{%r5,%r7}
	pop	{%r3}
	.cfa_pop	{%r3}
	bx	%r3
	.cfa_restore_state
	.cfa_ef
	.type at91_tc_stop, @function
	.size at91_tc_stop, . - at91_tc_stop
	.align	4
.LC01:
	.long	0x808040
	.long	0x46c000
	.long	0x46c006
	.long	0x46c007
	.long	0xffff
	.long	0xf4240
	.end

⌨️ 快捷键说明

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