📄 com.s
字号:
.file "c:/at91/software/projects/bench/source/com.c"
.option svr4
.option arm_code
.option inter
.ident "hc4.5a -O7 \n"
.option noswst
.seg ".text",text
.option code32,inter
.L00TEXT:
;-------------| at91_open_com |-------------------
.align 4
.global at91_open_com
at91_open_com:
.cfa_bf at91_open_com
stmdb %sp!,{%r8,%lr}
.cfa_push {%r8,%lr}
mov %r8,%r0
ldr %r0,[%r8, #0]
mov %r3,#0
bl at91_usart_open
ldr %ip,[%r8, #0]
mvn %r3,#0
ldr %ip,[%ip, #0]
str %r3,[%ip, #12]
mov %ip,#1
str %ip,[%r8, #4]
.cfa_remember_state
ldmia %sp!,{%r8,%ip}
.cfa_pop {%r8,%ip}
bx %ip
.cfa_restore_state
.cfa_ef
.type at91_open_com, @function
.size at91_open_com, . - at91_open_com
;-------------| at91_close_com |-------------------
.align 4
.global at91_close_com
at91_close_com:
.cfa_bf at91_close_com
stmdb %sp!,{%r8,%lr}
.cfa_push {%r8,%lr}
mov %r8,%r0
ldr %r0,[%r8, #0]
bl at91_usart_close
mov %ip,#1
str %ip,[%r8, #4]
.cfa_remember_state
ldmia %sp!,{%r8,%ip}
.cfa_pop {%r8,%ip}
bx %ip
.cfa_restore_state
.cfa_ef
.type at91_close_com, @function
.size at91_close_com, . - at91_close_com
;-------------| at91_print |-------------------
.align 4
.global at91_print
at91_print:
.cfa_bf at91_print
stmdb %sp!,{%r8-%r10,%lr}
.cfa_push {%r8-%r10,%lr}
mov %r10,%r1
mov %r9,#0
ldrb %ip,[%r10, %r9]
mov %r8,%r0
cmp %ip,#0
beq .L01157
.L01154:
ldr %r0,[%r8, #0]
bl at91_usart_get_status
tsts %r0,#2
bne .L01156
.L01155:
ldr %r0,[%r8, #0]
bl at91_usart_get_status
tsts %r0,#2
beq .L01155
.L01156:
ldrb %r1,[%r10, %r9]
ldr %r0,[%r8, #0]
bl at91_usart_write
add %r9,%r9,#1
ldrb %ip,[%r10, %r9]
cmp %ip,#0
bne .L01154
.L01157:
.cfa_remember_state
ldmia %sp!,{%r8-%r10,%ip}
.cfa_pop {%r8-%r10,%ip}
bx %ip
.cfa_restore_state
.cfa_ef
.type at91_print, @function
.size at91_print, . - at91_print
;-------------| at91_print_frame |-------------------
.align 4
.global at91_print_frame
at91_print_frame:
.cfa_bf at91_print_frame
stmdb %sp!,{%r8-%r10,%lr}
.cfa_push {%r8-%r10,%lr}
mov %r10,%r0
ldr %r0,[%r10, #0]
mov %r9,%r1
ldr %r3,[%r0, #0]
mov %r8,%r2
ldr %ip,[%r3, #60]
cmp %ip,#0
beq .L01165
.L01164:
ldr %ip,[%r3, #60]
cmp %ip,#0
bne .L01164
.L01165:
bl at91_usart_get_status
tsts %r0,#2
bne .L01167
.L01166:
ldr %r0,[%r10, #0]
bl at91_usart_get_status
tsts %r0,#2
beq .L01166
.L01167:
ldr %ip,[%r10, #0]
ldr %ip,[%ip, #0]
str %r9,[%ip, #56]
str %r8,[%ip, #60]
.cfa_remember_state
ldmia %sp!,{%r8-%r10,%ip}
.cfa_pop {%r8-%r10,%ip}
bx %ip
.cfa_restore_state
.cfa_ef
.type at91_print_frame, @function
.size at91_print_frame, . - at91_print_frame
;-------------| at91_print_crlf |-------------------
.align 4
.global at91_print_crlf
at91_print_crlf:
.cfa_bf at91_print_crlf
stmdb %sp!,{%lr}
.cfa_push {%lr}
sub %sp,%sp,#4
.cfa_push 4
mov %r3,#10
strb %r3,[%sp, #0]
mov %r3,#13
strb %r3,[%sp, #1]
mov %r3,#0
strb %r3,[%sp, #2]
mov %r1,%sp
bl at91_print
.cfa_remember_state
add %sp,%sp,#4
.cfa_pop 4
ldmia %sp!,{%ip}
.cfa_pop {%ip}
bx %ip
.cfa_restore_state
.cfa_ef
.type at91_print_crlf, @function
.size at91_print_crlf, . - at91_print_crlf
;-------------| at91_getch |-------------------
.align 4
.global at91_getch
at91_getch:
.cfa_bf at91_getch
stmdb %sp!,{%r8-%r10,%lr}
.cfa_push {%r8-%r10,%lr}
mov %r9,%r0
ldr %r0,[%r9, #0]
mov %r10,%r1
bl at91_usart_get_status
and %ip,%r0,#1
eors %r8,%ip,#1
ldreq %r0,[%r9, #0]
moveq %r1,%r10
bleq at91_usart_read
mov %r0,%r8
.cfa_remember_state
ldmia %sp!,{%r8-%r10,%ip}
.cfa_pop {%r8-%r10,%ip}
bx %ip
.cfa_restore_state
.cfa_ef
.type at91_getch, @function
.size at91_getch, . - at91_getch
;-------------| at91_send_byte |-------------------
.align 4
.global at91_send_byte
at91_send_byte:
.cfa_bf at91_send_byte
stmdb %sp!,{%r4,%r8,%r9,%lr}
.cfa_push {%r4,%r8,%r9,%lr}
mov %r8,%r0
ldr %r0,[%r8, #0]
mov %r9,%r1
ldr %r3,[%r0, #0]
ldr %ip,[%r3, #60]
cmp %ip,#0
beq .L01215
.L01214:
ldr %ip,[%r3, #60]
cmp %ip,#0
bne .L01214
.L01215:
bl at91_usart_get_status
tsts %r0,#2
bne .L01217
.L01216:
ldr %r0,[%r8, #0]
bl at91_usart_get_status
tsts %r0,#2
beq .L01216
.L01217:
ldr %r0,[%r8, #0]
mov %r1,%r9
bl at91_usart_write
.cfa_remember_state
ldmia %sp!,{%r4,%r8,%r9,%ip}
.cfa_pop {%r4,%r8,%r9,%ip}
bx %ip
.cfa_restore_state
.cfa_ef
.type at91_send_byte, @function
.size at91_send_byte, . - at91_send_byte
.end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -