?? main.lss
字號:
main.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 0000032c 00000000 00000000 00000094 2**0
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .data 00000000 00800060 0000032c 000003c0 2**0
CONTENTS, ALLOC, LOAD, DATA
2 .bss 00000000 00800060 0000032c 000003c0 2**0
ALLOC
3 .noinit 00000000 00800060 00800060 000003c0 2**0
CONTENTS
4 .eeprom 00000000 00810000 00810000 000003c0 2**0
CONTENTS
5 .stab 0000099c 00000000 00000000 000003c0 2**2
CONTENTS, READONLY, DEBUGGING
6 .stabstr 00000650 00000000 00000000 00000d5c 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 0c 94 2a 00 jmp 0x54
4: 0c 94 45 00 jmp 0x8a
8: 0c 94 45 00 jmp 0x8a
c: 0c 94 45 00 jmp 0x8a
10: 0c 94 45 00 jmp 0x8a
14: 0c 94 45 00 jmp 0x8a
18: 0c 94 45 00 jmp 0x8a
1c: 0c 94 45 00 jmp 0x8a
20: 0c 94 45 00 jmp 0x8a
24: 0c 94 45 00 jmp 0x8a
28: 0c 94 45 00 jmp 0x8a
2c: 0c 94 45 00 jmp 0x8a
30: 0c 94 45 00 jmp 0x8a
34: 0c 94 45 00 jmp 0x8a
38: 0c 94 45 00 jmp 0x8a
3c: 0c 94 45 00 jmp 0x8a
40: 0c 94 45 00 jmp 0x8a
44: 0c 94 45 00 jmp 0x8a
48: 0c 94 45 00 jmp 0x8a
4c: 0c 94 45 00 jmp 0x8a
50: 0c 94 45 00 jmp 0x8a
00000054 <__ctors_end>:
54: 11 24 eor r1, r1
56: 1f be out 0x3f, r1 ; 63
58: cf e5 ldi r28, 0x5F ; 95
5a: d4 e0 ldi r29, 0x04 ; 4
5c: de bf out 0x3e, r29 ; 62
5e: cd bf out 0x3d, r28 ; 61
00000060 <__do_copy_data>:
60: 10 e0 ldi r17, 0x00 ; 0
62: a0 e6 ldi r26, 0x60 ; 96
64: b0 e0 ldi r27, 0x00 ; 0
66: ec e2 ldi r30, 0x2C ; 44
68: f3 e0 ldi r31, 0x03 ; 3
6a: 02 c0 rjmp .+4 ; 0x70
0000006c <.do_copy_data_loop>:
6c: 05 90 lpm r0, Z+
6e: 0d 92 st X+, r0
00000070 <.do_copy_data_start>:
70: a0 36 cpi r26, 0x60 ; 96
72: b1 07 cpc r27, r17
74: d9 f7 brne .-10 ; 0x6c
00000076 <__do_clear_bss>:
76: 10 e0 ldi r17, 0x00 ; 0
78: a0 e6 ldi r26, 0x60 ; 96
7a: b0 e0 ldi r27, 0x00 ; 0
7c: 01 c0 rjmp .+2 ; 0x80
0000007e <.do_clear_bss_loop>:
7e: 1d 92 st X+, r1
00000080 <.do_clear_bss_start>:
80: a0 36 cpi r26, 0x60 ; 96
82: b1 07 cpc r27, r17
84: e1 f7 brne .-8 ; 0x7e
86: 0c 94 84 01 jmp 0x308
0000008a <__bad_interrupt>:
8a: 0c 94 00 00 jmp 0x0
0000008e <delay>:
#include <avr/delay.h>//define _delay_loop_2
#include <inttypes.h>//define uint16_t and so on
void delay(uint16_t ms)
{
8e: ac 01 movw r20, r24
uint16_t i;
for(i=0;i<ms;i++) _delay_loop_2(2765);//equal mcu freq/4000
90: 20 e0 ldi r18, 0x00 ; 0
92: 30 e0 ldi r19, 0x00 ; 0
94: 28 17 cp r18, r24
96: 39 07 cpc r19, r25
98: 48 f4 brcc .+18 ; 0xac
/* 16-bit count, 4 cycles/loop */
static inline void
_delay_loop_2(unsigned int __count)
{
9a: 8d ec ldi r24, 0xCD ; 205
9c: 9a e0 ldi r25, 0x0A ; 10
asm volatile (
9e: 01 97 sbiw r24, 0x01 ; 1
a0: f1 f7 brne .-4 ; 0x9e
a2: 2f 5f subi r18, 0xFF ; 255
a4: 3f 4f sbci r19, 0xFF ; 255
a6: 24 17 cp r18, r20
a8: 35 07 cpc r19, r21
aa: b8 f3 brcs .-18 ; 0x9a
}
ac: 08 95 ret
000000ae <beep>:
void beep(void)
{
uint16_t lasting=1500;
while(lasting--)
ae: 2b ed ldi r18, 0xDB ; 219
b0: 35 e0 ldi r19, 0x05 ; 5
{
PORTC ^= _BV(7); //取反
b2: 85 b3 in r24, 0x15 ; 21
b4: 90 e8 ldi r25, 0x80 ; 128
b6: 89 27 eor r24, r25
b8: 85 bb out 0x15, r24 ; 21
/* 16-bit count, 4 cycles/loop */
static inline void
_delay_loop_2(unsigned int __count)
{
ba: 82 e8 ldi r24, 0x82 ; 130
bc: 90 e0 ldi r25, 0x00 ; 0
asm volatile (
be: 01 97 sbiw r24, 0x01 ; 1
c0: f1 f7 brne .-4 ; 0xbe
c2: 21 50 subi r18, 0x01 ; 1
c4: 30 40 sbci r19, 0x00 ; 0
c6: 8f ef ldi r24, 0xFF ; 255
c8: 2f 3f cpi r18, 0xFF ; 255
ca: 38 07 cpc r19, r24
cc: 91 f7 brne .-28 ; 0xb2
_delay_loop_2(130);
}
}
ce: 08 95 ret
000000d0 <send>:
#define CS0 do{(PORTA &= ~(_BV(7)));}while(0)//is better than (PORTA &= ~(_BV(7)))
#define CS1 do{(PORTA |= (_BV(7)));}while(0)
#define RD0 do{(PORTA &= ~(_BV(6)));}while(0)
#define RD1 do{(PORTA |= (_BV(6)));}while(0)
#define WR0 do{(PORTA &= ~(_BV(5)));}while(0)
#define WR1 do{(PORTA |= (_BV(5)));}while(0)
#define SEND0 do{(PORTA &= ~(_BV(4)));}while(0)
#define SEND1 do{(PORTA |= (_BV(4)));}while(0)
void send(uint16_t senddata,uint8_t num)
{
d0: ff 92 push r15
d2: 0f 93 push r16
d4: 1f 93 push r17
d6: cf 93 push r28
d8: 8c 01 movw r16, r24
da: f6 2e mov r15, r22
uint8_t i;
CS1;
dc: df 9a sbi 0x1b, 7 ; 27
delay(10);
de: 8a e0 ldi r24, 0x0A ; 10
e0: 90 e0 ldi r25, 0x00 ; 0
e2: 0e 94 47 00 call 0x8e
CS0;
e6: df 98 cbi 0x1b, 7 ; 27
delay(5);
e8: 85 e0 ldi r24, 0x05 ; 5
ea: 90 e0 ldi r25, 0x00 ; 0
ec: 0e 94 47 00 call 0x8e
for(i=0;i<num;i++)
f0: c0 e0 ldi r28, 0x00 ; 0
f2: cf 15 cp r28, r15
f4: 00 f5 brcc .+64 ; 0x136
{
WR0;
f6: dd 98 cbi 0x1b, 5 ; 27
delay(5);
f8: 85 e0 ldi r24, 0x05 ; 5
fa: 90 e0 ldi r25, 0x00 ; 0
fc: 0e 94 47 00 call 0x8e
if(senddata & _BV(i))
100: 81 e0 ldi r24, 0x01 ; 1
102: 90 e0 ldi r25, 0x00 ; 0
104: 0c 2e mov r0, r28
106: 02 c0 rjmp .+4 ; 0x10c
108: 88 0f add r24, r24
10a: 99 1f adc r25, r25
10c: 0a 94 dec r0
10e: e2 f7 brpl .-8 ; 0x108
110: 80 23 and r24, r16
112: 91 23 and r25, r17
114: 89 2b or r24, r25
116: 11 f0 breq .+4 ; 0x11c
SEND1;
118: dc 9a sbi 0x1b, 4 ; 27
11a: 01 c0 rjmp .+2 ; 0x11e
else
SEND0;
11c: dc 98 cbi 0x1b, 4 ; 27
delay(10);
11e: 8a e0 ldi r24, 0x0A ; 10
120: 90 e0 ldi r25, 0x00 ; 0
122: 0e 94 47 00 call 0x8e
WR1;
126: dd 9a sbi 0x1b, 5 ; 27
delay(10);
128: 8a e0 ldi r24, 0x0A ; 10
12a: 90 e0 ldi r25, 0x00 ; 0
12c: 0e 94 47 00 call 0x8e
130: cf 5f subi r28, 0xFF ; 255
132: cf 15 cp r28, r15
134: 00 f3 brcs .-64 ; 0xf6
}
SEND1;
136: dc 9a sbi 0x1b, 4 ; 27
CS1;
138: df 9a sbi 0x1b, 7 ; 27
}
13a: cf 91 pop r28
13c: 1f 91 pop r17
13e: 0f 91 pop r16
140: ff 90 pop r15
142: 08 95 ret
00000144 <lcd_send_bit>:
#define LCD_CMD_INITIAL 0x29
#define LCD_CMD_SEL_RC 0x18
#define LCD_CMD_OP_RC 0x01
#define LCD_CMD_OP_LCD 0x03
#define LCD_CMD_CL_LCD 0x02
void lcd_send_bit(uint8_t flag)
{
144: 1f 93 push r17
146: 18 2f mov r17, r24
WR0;
148: dd 98 cbi 0x1b, 5 ; 27
delay(1);
14a: 81 e0 ldi r24, 0x01 ; 1
14c: 90 e0 ldi r25, 0x00 ; 0
14e: 0e 94 47 00 call 0x8e
if(flag)
152: 11 23 and r17, r17
154: 11 f0 breq .+4 ; 0x15a
SEND1;
156: dc 9a sbi 0x1b, 4 ; 27
158: 01 c0 rjmp .+2 ; 0x15c
else
SEND0;
15a: dc 98 cbi 0x1b, 4 ; 27
WR1;
15c: dd 9a sbi 0x1b, 5 ; 27
delay(1);
15e: 81 e0 ldi r24, 0x01 ; 1
160: 90 e0 ldi r25, 0x00 ; 0
162: 0e 94 47 00 call 0x8e
}
166: 1f 91 pop r17
168: 08 95 ret
0000016a <lcd_send_data>:
void lcd_send_data(uint8_t addr,uint8_t data)
{
16a: ff 92 push r15
16c: 0f 93 push r16
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -