|
|
|
|
@@ -3,89 +3,93 @@ opdracht 2.5.elf: file format elf32-avr
|
|
|
|
|
|
|
|
|
|
Sections:
|
|
|
|
|
Idx Name Size VMA LMA File off Algn
|
|
|
|
|
0 .data 00000000 00800100 00800100 00000210 2**0
|
|
|
|
|
0 .data 00000000 00800100 00800100 00000274 2**0
|
|
|
|
|
ALLOC, LOAD, DATA
|
|
|
|
|
1 .text 000000a4 00000000 00000000 00000054 2**1
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
|
2 .comment 0000002f 00000000 00000000 00000210 2**0
|
|
|
|
|
2 .comment 0000002f 00000000 00000000 00000274 2**0
|
|
|
|
|
CONTENTS, READONLY
|
|
|
|
|
3 .debug_aranges 00000060 00000000 00000000 0000023f 2**0
|
|
|
|
|
3 .debug_aranges 00000078 00000000 00000000 000002a3 2**0
|
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
|
4 .debug_info 00000dbf 00000000 00000000 0000029f 2**0
|
|
|
|
|
4 .debug_info 00000ed8 00000000 00000000 0000031b 2**0
|
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
|
5 .debug_abbrev 00000878 00000000 00000000 0000105e 2**0
|
|
|
|
|
5 .debug_abbrev 00000890 00000000 00000000 000011f3 2**0
|
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
|
6 .debug_line 000003d5 00000000 00000000 000018d6 2**0
|
|
|
|
|
6 .debug_line 00000463 00000000 00000000 00001a83 2**0
|
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
|
7 .debug_frame 000000cc 00000000 00000000 00001cac 2**2
|
|
|
|
|
7 .debug_frame 000000fc 00000000 00000000 00001ee8 2**2
|
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
|
8 .debug_str 0000027d 00000000 00000000 00001d78 2**0
|
|
|
|
|
8 .debug_str 00000283 00000000 00000000 00001fe4 2**0
|
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
|
9 .debug_loc 000001b4 00000000 00000000 00001ff5 2**0
|
|
|
|
|
9 .debug_loc 00000242 00000000 00000000 00002267 2**0
|
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
|
10 .debug_ranges 00000050 00000000 00000000 000021a9 2**0
|
|
|
|
|
10 .debug_ranges 00000068 00000000 00000000 000024a9 2**0
|
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
|
11 .text 00000004 000001b8 000001b8 0000020c 2**1
|
|
|
|
|
11 .text 00000004 0000021c 0000021c 00000270 2**1
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
|
12 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 000021fc 2**2
|
|
|
|
|
12 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00002514 2**2
|
|
|
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
|
13 .text.sbi_portc 00000016 0000018e 0000018e 000001e2 2**1
|
|
|
|
|
13 .text.sbi_porta 00000016 000001f8 000001f8 0000024c 2**1
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
|
14 .text.cbi_portc 00000018 00000176 00000176 000001ca 2**1
|
|
|
|
|
14 .text.cbi_porta 00000018 000001e0 000001e0 00000234 2**1
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
|
15 .text.lcd_strobe_lcd_e 0000002a 00000124 00000124 00000178 2**1
|
|
|
|
|
15 .text.lcd_strobe_lcd_e 0000002a 0000012c 0000012c 00000180 2**1
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
|
16 .text.lcd_add_character 00000028 0000014e 0000014e 000001a2 2**1
|
|
|
|
|
16 .text.lcd_write_character 00000028 00000156 00000156 000001aa 2**1
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
|
17 .text.lcd_write_string 0000002e 000000f6 000000f6 0000014a 2**1
|
|
|
|
|
17 .text.lcd_write_command 00000028 0000017e 0000017e 000001d2 2**1
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
|
18 .progmemx.data 0000000a 000000a4 000000a4 000000f8 2**0
|
|
|
|
|
18 .text.lcd_clear 0000001a 000001c6 000001c6 0000021a 2**1
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
|
19 .text.init_4bits_mode 00000050 000000ae 000000ae 00000102 2**1
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
|
20 .text.lcd_write_string 0000002e 000000fe 000000fe 00000152 2**1
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
|
21 .progmemx.data 0000000a 000000a4 000000a4 000000f8 2**0
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, PROGMEMX
|
|
|
|
|
19 .text.init_4bits_mode 00000048 000000ae 000000ae 00000102 2**1
|
|
|
|
|
22 .text.main 00000020 000001a6 000001a6 000001fa 2**1
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
|
20 .text.main 00000006 000001b2 000001b2 00000206 2**1
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
|
21 .text.libgcc 0000000e 000001a4 000001a4 000001f8 2**1
|
|
|
|
|
23 .text.libgcc 0000000e 0000020e 0000020e 00000262 2**1
|
|
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
|
|
|
|
|
|
|
|
|
Disassembly of section .text:
|
|
|
|
|
|
|
|
|
|
00000000 <__vectors>:
|
|
|
|
|
0: 0c 94 46 00 jmp 0x8c ; 0x8c <__ctors_end>
|
|
|
|
|
4: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
8: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
c: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
10: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
14: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
18: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
1c: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
20: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
24: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
28: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
2c: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
30: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
34: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
38: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
3c: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
40: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
44: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
48: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
4c: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
50: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
54: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
58: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
5c: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
60: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
64: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
68: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
6c: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
70: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
74: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
78: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
7c: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
80: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
84: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
88: 0c 94 dc 00 jmp 0x1b8 ; 0x1b8 <__bad_interrupt>
|
|
|
|
|
4: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
8: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
c: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
10: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
14: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
18: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
1c: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
20: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
24: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
28: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
2c: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
30: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
34: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
38: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
3c: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
40: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
44: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
48: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
4c: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
50: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
54: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
58: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
5c: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
60: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
64: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
68: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
6c: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
70: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
74: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
78: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
7c: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
80: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
84: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
88: 0c 94 0e 01 jmp 0x21c ; 0x21c <__bad_interrupt>
|
|
|
|
|
|
|
|
|
|
0000008c <__ctors_end>:
|
|
|
|
|
8c: 11 24 eor r1, r1
|
|
|
|
|
@@ -94,7 +98,7 @@ Disassembly of section .text:
|
|
|
|
|
92: d0 e1 ldi r29, 0x10 ; 16
|
|
|
|
|
94: de bf out 0x3e, r29 ; 62
|
|
|
|
|
96: cd bf out 0x3d, r28 ; 61
|
|
|
|
|
98: 0e 94 d9 00 call 0x1b2 ; 0x1b2 <main>
|
|
|
|
|
98: 0e 94 d3 00 call 0x1a6 ; 0x1a6 <main>
|
|
|
|
|
9c: 0c 94 50 00 jmp 0xa0 ; 0xa0 <_exit>
|
|
|
|
|
|
|
|
|
|
000000a0 <_exit>:
|
|
|
|
|
@@ -105,224 +109,214 @@ Disassembly of section .text:
|
|
|
|
|
|
|
|
|
|
Disassembly of section .text:
|
|
|
|
|
|
|
|
|
|
000001b8 <__bad_interrupt>:
|
|
|
|
|
1b8: 0c 94 00 00 jmp 0 ; 0x0 <__TEXT_REGION_ORIGIN__>
|
|
|
|
|
0000021c <__bad_interrupt>:
|
|
|
|
|
21c: 0c 94 00 00 jmp 0 ; 0x0 <__TEXT_REGION_ORIGIN__>
|
|
|
|
|
|
|
|
|
|
Disassembly of section .text.sbi_portc:
|
|
|
|
|
Disassembly of section .text.sbi_porta:
|
|
|
|
|
|
|
|
|
|
0000018e <sbi_portc>:
|
|
|
|
|
cbi_portc(LCD_E); // E low
|
|
|
|
|
_delay_ms(1);
|
|
|
|
|
000001f8 <sbi_porta>:
|
|
|
|
|
void cbi_portc(int index){
|
|
|
|
|
PORTC &= ~(1<<index);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void sbi_portc(int index){
|
|
|
|
|
void sbi_porta(int index){
|
|
|
|
|
PORTA |= (1<<index);
|
|
|
|
|
1f8: 9b b3 in r25, 0x1b ; 27
|
|
|
|
|
1fa: 21 e0 ldi r18, 0x01 ; 1
|
|
|
|
|
1fc: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
|
1fe: 02 c0 rjmp .+4 ; 0x204 <sbi_porta+0xc>
|
|
|
|
|
200: 22 0f add r18, r18
|
|
|
|
|
202: 33 1f adc r19, r19
|
|
|
|
|
204: 8a 95 dec r24
|
|
|
|
|
206: e2 f7 brpl .-8 ; 0x200 <sbi_porta+0x8>
|
|
|
|
|
208: 29 2b or r18, r25
|
|
|
|
|
20a: 2b bb out 0x1b, r18 ; 27
|
|
|
|
|
20c: 08 95 ret
|
|
|
|
|
|
|
|
|
|
Disassembly of section .text.cbi_porta:
|
|
|
|
|
|
|
|
|
|
000001e0 <cbi_porta>:
|
|
|
|
|
PORTC |= (1<<index);
|
|
|
|
|
18e: 95 b3 in r25, 0x15 ; 21
|
|
|
|
|
190: 21 e0 ldi r18, 0x01 ; 1
|
|
|
|
|
192: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
|
194: 02 c0 rjmp .+4 ; 0x19a <sbi_portc+0xc>
|
|
|
|
|
196: 22 0f add r18, r18
|
|
|
|
|
198: 33 1f adc r19, r19
|
|
|
|
|
19a: 8a 95 dec r24
|
|
|
|
|
19c: e2 f7 brpl .-8 ; 0x196 <sbi_portc+0x8>
|
|
|
|
|
19e: 29 2b or r18, r25
|
|
|
|
|
1a0: 25 bb out 0x15, r18 ; 21
|
|
|
|
|
1a2: 08 95 ret
|
|
|
|
|
|
|
|
|
|
Disassembly of section .text.cbi_portc:
|
|
|
|
|
|
|
|
|
|
00000176 <cbi_portc>:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void cbi_portc(int index){
|
|
|
|
|
PORTC &= ~(1<<index);
|
|
|
|
|
176: 95 b3 in r25, 0x15 ; 21
|
|
|
|
|
178: 21 e0 ldi r18, 0x01 ; 1
|
|
|
|
|
17a: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
|
17c: 02 c0 rjmp .+4 ; 0x182 <cbi_portc+0xc>
|
|
|
|
|
17e: 22 0f add r18, r18
|
|
|
|
|
180: 33 1f adc r19, r19
|
|
|
|
|
182: 8a 95 dec r24
|
|
|
|
|
184: e2 f7 brpl .-8 ; 0x17e <cbi_portc+0x8>
|
|
|
|
|
186: 20 95 com r18
|
|
|
|
|
188: 29 23 and r18, r25
|
|
|
|
|
18a: 25 bb out 0x15, r18 ; 21
|
|
|
|
|
18c: 08 95 ret
|
|
|
|
|
1e0: 9b b3 in r25, 0x1b ; 27
|
|
|
|
|
1e2: 21 e0 ldi r18, 0x01 ; 1
|
|
|
|
|
1e4: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
|
1e6: 02 c0 rjmp .+4 ; 0x1ec <cbi_porta+0xc>
|
|
|
|
|
1e8: 22 0f add r18, r18
|
|
|
|
|
1ea: 33 1f adc r19, r19
|
|
|
|
|
1ec: 8a 95 dec r24
|
|
|
|
|
1ee: e2 f7 brpl .-8 ; 0x1e8 <cbi_porta+0x8>
|
|
|
|
|
1f0: 20 95 com r18
|
|
|
|
|
1f2: 29 23 and r18, r25
|
|
|
|
|
1f4: 2b bb out 0x1b, r18 ; 27
|
|
|
|
|
1f6: 08 95 ret
|
|
|
|
|
|
|
|
|
|
Disassembly of section .text.lcd_strobe_lcd_e:
|
|
|
|
|
|
|
|
|
|
00000124 <lcd_strobe_lcd_e>:
|
|
|
|
|
//TODO:: Please write your application code
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
0000012c <lcd_strobe_lcd_e>:
|
|
|
|
|
12c: 86 e0 ldi r24, 0x06 ; 6
|
|
|
|
|
12e: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
130: 0e 94 fc 00 call 0x1f8 ; 0x1f8 <sbi_porta>
|
|
|
|
|
134: 83 ec ldi r24, 0xC3 ; 195
|
|
|
|
|
136: 99 e0 ldi r25, 0x09 ; 9
|
|
|
|
|
138: 01 97 sbiw r24, 0x01 ; 1
|
|
|
|
|
13a: f1 f7 brne .-4 ; 0x138 <lcd_strobe_lcd_e+0xc>
|
|
|
|
|
13c: 00 c0 rjmp .+0 ; 0x13e <lcd_strobe_lcd_e+0x12>
|
|
|
|
|
13e: 00 00 nop
|
|
|
|
|
140: 86 e0 ldi r24, 0x06 ; 6
|
|
|
|
|
142: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
144: 0e 94 f0 00 call 0x1e0 ; 0x1e0 <cbi_porta>
|
|
|
|
|
148: 83 ec ldi r24, 0xC3 ; 195
|
|
|
|
|
14a: 99 e0 ldi r25, 0x09 ; 9
|
|
|
|
|
14c: 01 97 sbiw r24, 0x01 ; 1
|
|
|
|
|
14e: f1 f7 brne .-4 ; 0x14c <lcd_strobe_lcd_e+0x20>
|
|
|
|
|
150: 00 c0 rjmp .+0 ; 0x152 <lcd_strobe_lcd_e+0x26>
|
|
|
|
|
152: 00 00 nop
|
|
|
|
|
154: 08 95 ret
|
|
|
|
|
|
|
|
|
|
void lcd_strobe_lcd_e(void) {
|
|
|
|
|
sbi_portc(LCD_E); // E high
|
|
|
|
|
124: 83 e0 ldi r24, 0x03 ; 3
|
|
|
|
|
126: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
128: 0e 94 c7 00 call 0x18e ; 0x18e <sbi_portc>
|
|
|
|
|
#else
|
|
|
|
|
//round up by default
|
|
|
|
|
__ticks_dc = (uint32_t)(ceil(fabs(__tmp)));
|
|
|
|
|
#endif
|
|
|
|
|
Disassembly of section .text.lcd_write_character:
|
|
|
|
|
|
|
|
|
|
__builtin_avr_delay_cycles(__ticks_dc);
|
|
|
|
|
12c: 83 ec ldi r24, 0xC3 ; 195
|
|
|
|
|
12e: 99 e0 ldi r25, 0x09 ; 9
|
|
|
|
|
130: 01 97 sbiw r24, 0x01 ; 1
|
|
|
|
|
132: f1 f7 brne .-4 ; 0x130 <lcd_strobe_lcd_e+0xc>
|
|
|
|
|
134: 00 c0 rjmp .+0 ; 0x136 <lcd_strobe_lcd_e+0x12>
|
|
|
|
|
136: 00 00 nop
|
|
|
|
|
_delay_ms(1);
|
|
|
|
|
cbi_portc(LCD_E); // E low
|
|
|
|
|
138: 83 e0 ldi r24, 0x03 ; 3
|
|
|
|
|
13a: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
13c: 0e 94 bb 00 call 0x176 ; 0x176 <cbi_portc>
|
|
|
|
|
140: 83 ec ldi r24, 0xC3 ; 195
|
|
|
|
|
142: 99 e0 ldi r25, 0x09 ; 9
|
|
|
|
|
144: 01 97 sbiw r24, 0x01 ; 1
|
|
|
|
|
146: f1 f7 brne .-4 ; 0x144 <lcd_strobe_lcd_e+0x20>
|
|
|
|
|
148: 00 c0 rjmp .+0 ; 0x14a <lcd_strobe_lcd_e+0x26>
|
|
|
|
|
14a: 00 00 nop
|
|
|
|
|
14c: 08 95 ret
|
|
|
|
|
00000156 <lcd_write_character>:
|
|
|
|
|
156: cf 93 push r28
|
|
|
|
|
158: c8 2f mov r28, r24
|
|
|
|
|
15a: 85 bb out 0x15, r24 ; 21
|
|
|
|
|
15c: 84 e0 ldi r24, 0x04 ; 4
|
|
|
|
|
15e: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
160: 0e 94 fc 00 call 0x1f8 ; 0x1f8 <sbi_porta>
|
|
|
|
|
164: 0e 94 96 00 call 0x12c ; 0x12c <lcd_strobe_lcd_e>
|
|
|
|
|
168: c2 95 swap r28
|
|
|
|
|
16a: c0 7f andi r28, 0xF0 ; 240
|
|
|
|
|
16c: c5 bb out 0x15, r28 ; 21
|
|
|
|
|
16e: 84 e0 ldi r24, 0x04 ; 4
|
|
|
|
|
170: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
172: 0e 94 fc 00 call 0x1f8 ; 0x1f8 <sbi_porta>
|
|
|
|
|
176: 0e 94 96 00 call 0x12c ; 0x12c <lcd_strobe_lcd_e>
|
|
|
|
|
17a: cf 91 pop r28
|
|
|
|
|
17c: 08 95 ret
|
|
|
|
|
|
|
|
|
|
Disassembly of section .text.lcd_add_character:
|
|
|
|
|
Disassembly of section .text.lcd_write_command:
|
|
|
|
|
|
|
|
|
|
0000014e <lcd_add_character>:
|
|
|
|
|
lcd_strobe_lcd_e();
|
|
|
|
|
|
|
|
|
|
lcd_write_string("Pintebaas");
|
|
|
|
|
}
|
|
|
|
|
0000017e <lcd_write_command>:
|
|
|
|
|
17e: cf 93 push r28
|
|
|
|
|
180: c8 2f mov r28, r24
|
|
|
|
|
182: 85 bb out 0x15, r24 ; 21
|
|
|
|
|
184: 84 e0 ldi r24, 0x04 ; 4
|
|
|
|
|
186: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
188: 0e 94 f0 00 call 0x1e0 ; 0x1e0 <cbi_porta>
|
|
|
|
|
18c: 0e 94 96 00 call 0x12c ; 0x12c <lcd_strobe_lcd_e>
|
|
|
|
|
190: c2 95 swap r28
|
|
|
|
|
192: c0 7f andi r28, 0xF0 ; 240
|
|
|
|
|
194: c5 bb out 0x15, r28 ; 21
|
|
|
|
|
196: 84 e0 ldi r24, 0x04 ; 4
|
|
|
|
|
198: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
19a: 0e 94 f0 00 call 0x1e0 ; 0x1e0 <cbi_porta>
|
|
|
|
|
19e: 0e 94 96 00 call 0x12c ; 0x12c <lcd_strobe_lcd_e>
|
|
|
|
|
1a2: cf 91 pop r28
|
|
|
|
|
1a4: 08 95 ret
|
|
|
|
|
|
|
|
|
|
void lcd_add_character(unsigned char byte){
|
|
|
|
|
14e: cf 93 push r28
|
|
|
|
|
150: c8 2f mov r28, r24
|
|
|
|
|
|
|
|
|
|
//upper nibble
|
|
|
|
|
PORTC = byte;
|
|
|
|
|
152: 85 bb out 0x15, r24 ; 21
|
|
|
|
|
sbi_portc(LCD_RS);
|
|
|
|
|
154: 82 e0 ldi r24, 0x02 ; 2
|
|
|
|
|
156: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
158: 0e 94 c7 00 call 0x18e ; 0x18e <sbi_portc>
|
|
|
|
|
lcd_strobe_lcd_e();
|
|
|
|
|
15c: 0e 94 92 00 call 0x124 ; 0x124 <lcd_strobe_lcd_e>
|
|
|
|
|
|
|
|
|
|
//lower nibble
|
|
|
|
|
PORTC = (byte<<4);
|
|
|
|
|
160: c2 95 swap r28
|
|
|
|
|
162: c0 7f andi r28, 0xF0 ; 240
|
|
|
|
|
164: c5 bb out 0x15, r28 ; 21
|
|
|
|
|
sbi_portc(LCD_RS);
|
|
|
|
|
166: 82 e0 ldi r24, 0x02 ; 2
|
|
|
|
|
168: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
|
16a: 0e 94 c7 00 call 0x18e ; 0x18e <sbi_portc>
|
|
|
|
|
lcd_strobe_lcd_e();
|
|
|
|
|
16e: 0e 94 92 00 call 0x124 ; 0x124 <lcd_strobe_lcd_e>
|
|
|
|
|
}
|
|
|
|
|
172: cf 91 pop r28
|
|
|
|
|
174: 08 95 ret
|
|
|
|
|
Disassembly of section .text.lcd_clear:
|
|
|
|
|
|
|
|
|
|
Disassembly of section .text.lcd_write_string:
|
|
|
|
|
|
|
|
|
|
000000f6 <lcd_write_string>:
|
|
|
|
|
PORTC = (byte<<4);
|
|
|
|
|
cbi_portc(LCD_RS);
|
|
|
|
|
lcd_strobe_lcd_e();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void lcd_write_string(const char *str) {
|
|
|
|
|
f6: cf 92 push r12
|
|
|
|
|
f8: df 92 push r13
|
|
|
|
|
fa: ef 92 push r14
|
|
|
|
|
fc: 6b 01 movw r12, r22
|
|
|
|
|
fe: e8 2e mov r14, r24
|
|
|
|
|
|
|
|
|
|
for(;*str; str++){
|
|
|
|
|
100: 07 c0 rjmp .+14 ; 0x110 <lcd_write_string+0x1a>
|
|
|
|
|
lcd_add_character(*str);
|
|
|
|
|
102: 86 2f mov r24, r22
|
|
|
|
|
104: 0e 94 a7 00 call 0x14e ; 0x14e <lcd_add_character>
|
|
|
|
|
lcd_strobe_lcd_e();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void lcd_write_string(const char *str) {
|
|
|
|
|
|
|
|
|
|
for(;*str; str++){
|
|
|
|
|
108: 8f ef ldi r24, 0xFF ; 255
|
|
|
|
|
10a: c8 1a sub r12, r24
|
|
|
|
|
10c: d8 0a sbc r13, r24
|
|
|
|
|
10e: e8 0a sbc r14, r24
|
|
|
|
|
110: f6 01 movw r30, r12
|
|
|
|
|
112: 5e 2d mov r21, r14
|
|
|
|
|
114: 0e 94 d2 00 call 0x1a4 ; 0x1a4 <__xload_1>
|
|
|
|
|
118: 61 11 cpse r22, r1
|
|
|
|
|
11a: f3 cf rjmp .-26 ; 0x102 <lcd_write_string+0xc>
|
|
|
|
|
lcd_add_character(*str);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
11c: ef 90 pop r14
|
|
|
|
|
11e: df 90 pop r13
|
|
|
|
|
120: cf 90 pop r12
|
|
|
|
|
122: 08 95 ret
|
|
|
|
|
000001c6 <lcd_clear>:
|
|
|
|
|
1c6: 81 e0 ldi r24, 0x01 ; 1
|
|
|
|
|
1c8: 0e 94 bf 00 call 0x17e ; 0x17e <lcd_write_command>
|
|
|
|
|
1cc: 87 e8 ldi r24, 0x87 ; 135
|
|
|
|
|
1ce: 93 e1 ldi r25, 0x13 ; 19
|
|
|
|
|
1d0: 01 97 sbiw r24, 0x01 ; 1
|
|
|
|
|
1d2: f1 f7 brne .-4 ; 0x1d0 <lcd_clear+0xa>
|
|
|
|
|
1d4: 00 c0 rjmp .+0 ; 0x1d6 <lcd_clear+0x10>
|
|
|
|
|
1d6: 00 00 nop
|
|
|
|
|
1d8: 80 e8 ldi r24, 0x80 ; 128
|
|
|
|
|
1da: 0e 94 bf 00 call 0x17e ; 0x17e <lcd_write_command>
|
|
|
|
|
1de: 08 95 ret
|
|
|
|
|
|
|
|
|
|
Disassembly of section .text.init_4bits_mode:
|
|
|
|
|
|
|
|
|
|
000000ae <init_4bits_mode>:
|
|
|
|
|
|
|
|
|
|
//lower nibble
|
|
|
|
|
PORTC = (byte<<4);
|
|
|
|
|
cbi_portc(LCD_RS);
|
|
|
|
|
lcd_strobe_lcd_e();
|
|
|
|
|
}
|
|
|
|
|
ae: cf 93 push r28
|
|
|
|
|
b0: 8f ef ldi r24, 0xFF ; 255
|
|
|
|
|
b2: 84 bb out 0x14, r24 ; 20
|
|
|
|
|
b4: 15 ba out 0x15, r1 ; 21
|
|
|
|
|
b6: c0 e2 ldi r28, 0x20 ; 32
|
|
|
|
|
b8: c5 bb out 0x15, r28 ; 21
|
|
|
|
|
ba: 0e 94 92 00 call 0x124 ; 0x124 <lcd_strobe_lcd_e>
|
|
|
|
|
be: c5 bb out 0x15, r28 ; 21
|
|
|
|
|
c0: 0e 94 92 00 call 0x124 ; 0x124 <lcd_strobe_lcd_e>
|
|
|
|
|
c4: 80 e8 ldi r24, 0x80 ; 128
|
|
|
|
|
c6: 85 bb out 0x15, r24 ; 21
|
|
|
|
|
c8: 0e 94 92 00 call 0x124 ; 0x124 <lcd_strobe_lcd_e>
|
|
|
|
|
cc: 15 ba out 0x15, r1 ; 21
|
|
|
|
|
ce: 0e 94 92 00 call 0x124 ; 0x124 <lcd_strobe_lcd_e>
|
|
|
|
|
d2: 80 ef ldi r24, 0xF0 ; 240
|
|
|
|
|
d4: 85 bb out 0x15, r24 ; 21
|
|
|
|
|
d6: 0e 94 92 00 call 0x124 ; 0x124 <lcd_strobe_lcd_e>
|
|
|
|
|
da: 15 ba out 0x15, r1 ; 21
|
|
|
|
|
dc: 0e 94 92 00 call 0x124 ; 0x124 <lcd_strobe_lcd_e>
|
|
|
|
|
e0: 80 e6 ldi r24, 0x60 ; 96
|
|
|
|
|
e2: 85 bb out 0x15, r24 ; 21
|
|
|
|
|
e4: 0e 94 92 00 call 0x124 ; 0x124 <lcd_strobe_lcd_e>
|
|
|
|
|
e8: 64 ea ldi r22, 0xA4 ; 164
|
|
|
|
|
ea: 70 e0 ldi r23, 0x00 ; 0
|
|
|
|
|
ec: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
|
ee: 0e 94 7b 00 call 0xf6 ; 0xf6 <lcd_write_string>
|
|
|
|
|
f2: cf 91 pop r28
|
|
|
|
|
f4: 08 95 ret
|
|
|
|
|
b4: 85 bb out 0x15, r24 ; 21
|
|
|
|
|
b6: 81 bb out 0x11, r24 ; 17
|
|
|
|
|
b8: 8a bb out 0x1a, r24 ; 26
|
|
|
|
|
ba: 15 ba out 0x15, r1 ; 21
|
|
|
|
|
bc: 1b ba out 0x1b, r1 ; 27
|
|
|
|
|
be: c0 e2 ldi r28, 0x20 ; 32
|
|
|
|
|
c0: c5 bb out 0x15, r28 ; 21
|
|
|
|
|
c2: 0e 94 96 00 call 0x12c ; 0x12c <lcd_strobe_lcd_e>
|
|
|
|
|
c6: c5 bb out 0x15, r28 ; 21
|
|
|
|
|
c8: 0e 94 96 00 call 0x12c ; 0x12c <lcd_strobe_lcd_e>
|
|
|
|
|
cc: 80 e8 ldi r24, 0x80 ; 128
|
|
|
|
|
ce: 85 bb out 0x15, r24 ; 21
|
|
|
|
|
d0: 0e 94 96 00 call 0x12c ; 0x12c <lcd_strobe_lcd_e>
|
|
|
|
|
d4: 15 ba out 0x15, r1 ; 21
|
|
|
|
|
d6: 0e 94 96 00 call 0x12c ; 0x12c <lcd_strobe_lcd_e>
|
|
|
|
|
da: 80 ef ldi r24, 0xF0 ; 240
|
|
|
|
|
dc: 85 bb out 0x15, r24 ; 21
|
|
|
|
|
de: 0e 94 96 00 call 0x12c ; 0x12c <lcd_strobe_lcd_e>
|
|
|
|
|
e2: 15 ba out 0x15, r1 ; 21
|
|
|
|
|
e4: 0e 94 96 00 call 0x12c ; 0x12c <lcd_strobe_lcd_e>
|
|
|
|
|
e8: 80 e6 ldi r24, 0x60 ; 96
|
|
|
|
|
ea: 85 bb out 0x15, r24 ; 21
|
|
|
|
|
ec: 0e 94 96 00 call 0x12c ; 0x12c <lcd_strobe_lcd_e>
|
|
|
|
|
f0: 82 e0 ldi r24, 0x02 ; 2
|
|
|
|
|
f2: 0e 94 bf 00 call 0x17e ; 0x17e <lcd_write_command>
|
|
|
|
|
f6: 0e 94 96 00 call 0x12c ; 0x12c <lcd_strobe_lcd_e>
|
|
|
|
|
fa: cf 91 pop r28
|
|
|
|
|
fc: 08 95 ret
|
|
|
|
|
|
|
|
|
|
Disassembly of section .text.lcd_write_string:
|
|
|
|
|
|
|
|
|
|
000000fe <lcd_write_string>:
|
|
|
|
|
fe: cf 92 push r12
|
|
|
|
|
100: df 92 push r13
|
|
|
|
|
102: ef 92 push r14
|
|
|
|
|
104: 6b 01 movw r12, r22
|
|
|
|
|
106: e8 2e mov r14, r24
|
|
|
|
|
108: 07 c0 rjmp .+14 ; 0x118 <lcd_write_string+0x1a>
|
|
|
|
|
10a: 86 2f mov r24, r22
|
|
|
|
|
10c: 0e 94 ab 00 call 0x156 ; 0x156 <lcd_write_character>
|
|
|
|
|
110: 8f ef ldi r24, 0xFF ; 255
|
|
|
|
|
112: c8 1a sub r12, r24
|
|
|
|
|
114: d8 0a sbc r13, r24
|
|
|
|
|
116: e8 0a sbc r14, r24
|
|
|
|
|
118: f6 01 movw r30, r12
|
|
|
|
|
11a: 5e 2d mov r21, r14
|
|
|
|
|
11c: 0e 94 07 01 call 0x20e ; 0x20e <__xload_1>
|
|
|
|
|
120: 61 11 cpse r22, r1
|
|
|
|
|
122: f3 cf rjmp .-26 ; 0x10a <lcd_write_string+0xc>
|
|
|
|
|
124: ef 90 pop r14
|
|
|
|
|
126: df 90 pop r13
|
|
|
|
|
128: cf 90 pop r12
|
|
|
|
|
12a: 08 95 ret
|
|
|
|
|
|
|
|
|
|
Disassembly of section .text.main:
|
|
|
|
|
|
|
|
|
|
000001b2 <main>:
|
|
|
|
|
void lcd_add_character(unsigned char byte);
|
|
|
|
|
void lcd_add_command(unsigned char byte);
|
|
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
|
{
|
|
|
|
|
init_4bits_mode();
|
|
|
|
|
1b2: 0e 94 57 00 call 0xae ; 0xae <init_4bits_mode>
|
|
|
|
|
1b6: ff cf rjmp .-2 ; 0x1b6 <main+0x4>
|
|
|
|
|
000001a6 <main>:
|
|
|
|
|
1a6: 0e 94 57 00 call 0xae ; 0xae <init_4bits_mode>
|
|
|
|
|
1aa: 87 ea ldi r24, 0xA7 ; 167
|
|
|
|
|
1ac: 91 e6 ldi r25, 0x61 ; 97
|
|
|
|
|
1ae: 01 97 sbiw r24, 0x01 ; 1
|
|
|
|
|
1b0: f1 f7 brne .-4 ; 0x1ae <main+0x8>
|
|
|
|
|
1b2: 00 c0 rjmp .+0 ; 0x1b4 <main+0xe>
|
|
|
|
|
1b4: 00 00 nop
|
|
|
|
|
1b6: 0e 94 e3 00 call 0x1c6 ; 0x1c6 <lcd_clear>
|
|
|
|
|
1ba: 64 ea ldi r22, 0xA4 ; 164
|
|
|
|
|
1bc: 70 e0 ldi r23, 0x00 ; 0
|
|
|
|
|
1be: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
|
1c0: 0e 94 7f 00 call 0xfe ; 0xfe <lcd_write_string>
|
|
|
|
|
1c4: ff cf rjmp .-2 ; 0x1c4 <main+0x1e>
|
|
|
|
|
|
|
|
|
|
Disassembly of section .text.libgcc:
|
|
|
|
|
|
|
|
|
|
000001a4 <__xload_1>:
|
|
|
|
|
1a4: 57 fd sbrc r21, 7
|
|
|
|
|
1a6: 03 c0 rjmp .+6 ; 0x1ae <__xload_1+0xa>
|
|
|
|
|
1a8: 5b bf out 0x3b, r21 ; 59
|
|
|
|
|
1aa: 67 91 elpm r22, Z+
|
|
|
|
|
1ac: 08 95 ret
|
|
|
|
|
1ae: 60 81 ld r22, Z
|
|
|
|
|
1b0: 08 95 ret
|
|
|
|
|
0000020e <__xload_1>:
|
|
|
|
|
20e: 57 fd sbrc r21, 7
|
|
|
|
|
210: 03 c0 rjmp .+6 ; 0x218 <__xload_1+0xa>
|
|
|
|
|
212: 5b bf out 0x3b, r21 ; 59
|
|
|
|
|
214: 67 91 elpm r22, Z+
|
|
|
|
|
216: 08 95 ret
|
|
|
|
|
218: 60 81 ld r22, Z
|
|
|
|
|
21a: 08 95 ret
|
|
|
|
|
|