Files
MIC-KM/MIC-Week2/Debug/MIC-Week2.lss
T
2016-02-16 12:46:26 +01:00

449 lines
13 KiB
Plaintext

MIC-Week2.elf: file format elf32-avr
Sections:
Idx Name Size VMA LMA File off Algn
0 .data 00000010 00800100 0000022c 000002c0 2**0
CONTENTS, ALLOC, LOAD, DATA
1 .text 0000022c 00000000 00000000 00000094 2**1
CONTENTS, ALLOC, LOAD, READONLY, CODE
2 .bss 00000002 00800110 00800110 000002d0 2**0
ALLOC
3 .comment 00000030 00000000 00000000 000002d0 2**0
CONTENTS, READONLY
4 .note.gnu.avr.deviceinfo 0000003c 00000000 00000000 00000300 2**2
CONTENTS, READONLY
5 .debug_aranges 00000070 00000000 00000000 0000033c 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_info 000003fb 00000000 00000000 000003ac 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_abbrev 00000216 00000000 00000000 000007a7 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_line 00000303 00000000 00000000 000009bd 2**0
CONTENTS, READONLY, DEBUGGING
9 .debug_frame 00000174 00000000 00000000 00000cc0 2**2
CONTENTS, READONLY, DEBUGGING
10 .debug_str 000001f8 00000000 00000000 00000e34 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_loc 00000346 00000000 00000000 0000102c 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_ranges 00000078 00000000 00000000 00001372 2**0
CONTENTS, READONLY, DEBUGGING
Disassembly of section .text:
00000000 <__vectors>:
0: 45 c0 rjmp .+138 ; 0x8c <__ctors_end>
2: 00 00 nop
4: 61 c0 rjmp .+194 ; 0xc8 <__vector_1>
6: 00 00 nop
8: 90 c0 rjmp .+288 ; 0x12a <__vector_2>
a: 00 00 nop
c: c1 c0 rjmp .+386 ; 0x190 <__vector_3>
e: 00 00 nop
10: 5a c0 rjmp .+180 ; 0xc6 <__bad_interrupt>
12: 00 00 nop
14: 64 c0 rjmp .+200 ; 0xde <__vector_5>
16: 00 00 nop
18: 56 c0 rjmp .+172 ; 0xc6 <__bad_interrupt>
1a: 00 00 nop
1c: 54 c0 rjmp .+168 ; 0xc6 <__bad_interrupt>
1e: 00 00 nop
20: 52 c0 rjmp .+164 ; 0xc6 <__bad_interrupt>
22: 00 00 nop
24: 50 c0 rjmp .+160 ; 0xc6 <__bad_interrupt>
26: 00 00 nop
28: 4e c0 rjmp .+156 ; 0xc6 <__bad_interrupt>
2a: 00 00 nop
2c: 4c c0 rjmp .+152 ; 0xc6 <__bad_interrupt>
2e: 00 00 nop
30: 4a c0 rjmp .+148 ; 0xc6 <__bad_interrupt>
32: 00 00 nop
34: 48 c0 rjmp .+144 ; 0xc6 <__bad_interrupt>
36: 00 00 nop
38: 46 c0 rjmp .+140 ; 0xc6 <__bad_interrupt>
3a: 00 00 nop
3c: 44 c0 rjmp .+136 ; 0xc6 <__bad_interrupt>
3e: 00 00 nop
40: 42 c0 rjmp .+132 ; 0xc6 <__bad_interrupt>
42: 00 00 nop
44: 40 c0 rjmp .+128 ; 0xc6 <__bad_interrupt>
46: 00 00 nop
48: 3e c0 rjmp .+124 ; 0xc6 <__bad_interrupt>
4a: 00 00 nop
4c: 3c c0 rjmp .+120 ; 0xc6 <__bad_interrupt>
4e: 00 00 nop
50: 3a c0 rjmp .+116 ; 0xc6 <__bad_interrupt>
52: 00 00 nop
54: 38 c0 rjmp .+112 ; 0xc6 <__bad_interrupt>
56: 00 00 nop
58: 36 c0 rjmp .+108 ; 0xc6 <__bad_interrupt>
5a: 00 00 nop
5c: 34 c0 rjmp .+104 ; 0xc6 <__bad_interrupt>
5e: 00 00 nop
60: 32 c0 rjmp .+100 ; 0xc6 <__bad_interrupt>
62: 00 00 nop
64: 30 c0 rjmp .+96 ; 0xc6 <__bad_interrupt>
66: 00 00 nop
68: 2e c0 rjmp .+92 ; 0xc6 <__bad_interrupt>
6a: 00 00 nop
6c: 2c c0 rjmp .+88 ; 0xc6 <__bad_interrupt>
6e: 00 00 nop
70: 2a c0 rjmp .+84 ; 0xc6 <__bad_interrupt>
72: 00 00 nop
74: 28 c0 rjmp .+80 ; 0xc6 <__bad_interrupt>
76: 00 00 nop
78: 26 c0 rjmp .+76 ; 0xc6 <__bad_interrupt>
7a: 00 00 nop
7c: 24 c0 rjmp .+72 ; 0xc6 <__bad_interrupt>
7e: 00 00 nop
80: 22 c0 rjmp .+68 ; 0xc6 <__bad_interrupt>
82: 00 00 nop
84: 20 c0 rjmp .+64 ; 0xc6 <__bad_interrupt>
86: 00 00 nop
88: 1e c0 rjmp .+60 ; 0xc6 <__bad_interrupt>
...
0000008c <__ctors_end>:
8c: 11 24 eor r1, r1
8e: 1f be out 0x3f, r1 ; 63
90: cf ef ldi r28, 0xFF ; 255
92: d0 e1 ldi r29, 0x10 ; 16
94: de bf out 0x3e, r29 ; 62
96: cd bf out 0x3d, r28 ; 61
00000098 <__do_copy_data>:
98: 11 e0 ldi r17, 0x01 ; 1
9a: a0 e0 ldi r26, 0x00 ; 0
9c: b1 e0 ldi r27, 0x01 ; 1
9e: ec e2 ldi r30, 0x2C ; 44
a0: f2 e0 ldi r31, 0x02 ; 2
a2: 00 e0 ldi r16, 0x00 ; 0
a4: 0b bf out 0x3b, r16 ; 59
a6: 02 c0 rjmp .+4 ; 0xac <__do_copy_data+0x14>
a8: 07 90 elpm r0, Z+
aa: 0d 92 st X+, r0
ac: a0 31 cpi r26, 0x10 ; 16
ae: b1 07 cpc r27, r17
b0: d9 f7 brne .-10 ; 0xa8 <__do_copy_data+0x10>
000000b2 <__do_clear_bss>:
b2: 21 e0 ldi r18, 0x01 ; 1
b4: a0 e1 ldi r26, 0x10 ; 16
b6: b1 e0 ldi r27, 0x01 ; 1
b8: 01 c0 rjmp .+2 ; 0xbc <.do_clear_bss_start>
000000ba <.do_clear_bss_loop>:
ba: 1d 92 st X+, r1
000000bc <.do_clear_bss_start>:
bc: a2 31 cpi r26, 0x12 ; 18
be: b2 07 cpc r27, r18
c0: e1 f7 brne .-8 ; 0xba <.do_clear_bss_loop>
c2: b1 d0 rcall .+354 ; 0x226 <main>
c4: b1 c0 rjmp .+354 ; 0x228 <_exit>
000000c6 <__bad_interrupt>:
c6: 9c cf rjmp .-200 ; 0x0 <__vectors>
000000c8 <__vector_1>:
sei();
while(1)
{
wait(500);
}
c8: 1f 92 push r1
ca: 0f 92 push r0
cc: 0f b6 in r0, 0x3f ; 63
ce: 0f 92 push r0
d0: 11 24 eor r1, r1
d2: 95 9a sbi 0x12, 5 ; 18
d4: 0f 90 pop r0
d6: 0f be out 0x3f, r0 ; 63
d8: 0f 90 pop r0
da: 1f 90 pop r1
dc: 18 95 reti
000000de <__vector_5>:
de: 1f 92 push r1
e0: 0f 92 push r0
e2: 0f b6 in r0, 0x3f ; 63
e4: 0f 92 push r0
e6: 11 24 eor r1, r1
e8: 8f 93 push r24
ea: 9f 93 push r25
ec: 93 b1 in r25, 0x03 ; 3
ee: 81 e0 ldi r24, 0x01 ; 1
f0: 89 27 eor r24, r25
f2: 83 b9 out 0x03, r24 ; 3
f4: 9f 91 pop r25
f6: 8f 91 pop r24
f8: 0f 90 pop r0
fa: 0f be out 0x3f, r0 ; 63
fc: 0f 90 pop r0
fe: 1f 90 pop r1
100: 18 95 reti
00000102 <shift>:
}
void shift(int i)
{
if(i)
102: 89 2b or r24, r25
104: 21 f0 breq .+8 ; 0x10e <shift+0xc>
PORTC = (PORTC>>1);
106: 85 b3 in r24, 0x15 ; 21
108: 86 95 lsr r24
10a: 85 bb out 0x15, r24 ; 21
10c: 03 c0 rjmp .+6 ; 0x114 <shift+0x12>
else
PORTC = (PORTC<<1);
10e: 85 b3 in r24, 0x15 ; 21
110: 88 0f add r24, r24
112: 85 bb out 0x15, r24 ; 21
//Als het looplicht aan het einde is
if (PORTC >= 0x80)
114: af 9b sbis 0x15, 7 ; 21
116: 03 c0 rjmp .+6 ; 0x11e <shift+0x1c>
{
PORTC= 0x01;
118: 81 e0 ldi r24, 0x01 ; 1
11a: 85 bb out 0x15, r24 ; 21
11c: 08 95 ret
}
//Als het looplicht aan het begin is
else if (PORTC < 0x1)
11e: 85 b3 in r24, 0x15 ; 21
120: 81 11 cpse r24, r1
122: 02 c0 rjmp .+4 ; 0x128 <shift+0x26>
{
PORTC= 0x80;
124: 80 e8 ldi r24, 0x80 ; 128
126: 85 bb out 0x15, r24 ; 21
128: 08 95 ret
0000012a <__vector_2>:
PORTD |= (1<<5);
}
/******************************************************************/
ISR( INT1_vect )
{
12a: 1f 92 push r1
12c: 0f 92 push r0
12e: 0f b6 in r0, 0x3f ; 63
130: 0f 92 push r0
132: 11 24 eor r1, r1
134: 0b b6 in r0, 0x3b ; 59
136: 0f 92 push r0
138: 2f 93 push r18
13a: 3f 93 push r19
13c: 4f 93 push r20
13e: 5f 93 push r21
140: 6f 93 push r22
142: 7f 93 push r23
144: 8f 93 push r24
146: 9f 93 push r25
148: af 93 push r26
14a: bf 93 push r27
14c: ef 93 push r30
14e: ff 93 push r31
inputs:
outputs:
notes: Clear PORTD.5
Version : DMK, Initial code
*******************************************************************/
if(opdr==0)
150: 80 91 10 01 lds r24, 0x0110
154: 90 91 11 01 lds r25, 0x0111
158: 00 97 sbiw r24, 0x00 ; 0
15a: 11 f4 brne .+4 ; 0x160 <__vector_2+0x36>
{
PORTD &= ~(1<<5);
15c: 95 98 cbi 0x12, 5 ; 18
15e: 05 c0 rjmp .+10 ; 0x16a <__vector_2+0x40>
}
else if(opdr==1)
160: 01 97 sbiw r24, 0x01 ; 1
162: 19 f4 brne .+6 ; 0x16a <__vector_2+0x40>
{
shift(1);
164: 81 e0 ldi r24, 0x01 ; 1
166: 90 e0 ldi r25, 0x00 ; 0
168: cc df rcall .-104 ; 0x102 <shift>
}
}
16a: ff 91 pop r31
16c: ef 91 pop r30
16e: bf 91 pop r27
170: af 91 pop r26
172: 9f 91 pop r25
174: 8f 91 pop r24
176: 7f 91 pop r23
178: 6f 91 pop r22
17a: 5f 91 pop r21
17c: 4f 91 pop r20
17e: 3f 91 pop r19
180: 2f 91 pop r18
182: 0f 90 pop r0
184: 0b be out 0x3b, r0 ; 59
186: 0f 90 pop r0
188: 0f be out 0x3f, r0 ; 63
18a: 0f 90 pop r0
18c: 1f 90 pop r1
18e: 18 95 reti
00000190 <__vector_3>:
inputs:
outputs:
notes: Clear PORTD.3
Version : DMK, Initial code
*******************************************************************/
{
190: 1f 92 push r1
192: 0f 92 push r0
194: 0f b6 in r0, 0x3f ; 63
196: 0f 92 push r0
198: 11 24 eor r1, r1
19a: 0b b6 in r0, 0x3b ; 59
19c: 0f 92 push r0
19e: 2f 93 push r18
1a0: 3f 93 push r19
1a2: 4f 93 push r20
1a4: 5f 93 push r21
1a6: 6f 93 push r22
1a8: 7f 93 push r23
1aa: 8f 93 push r24
1ac: 9f 93 push r25
1ae: af 93 push r26
1b0: bf 93 push r27
1b2: ef 93 push r30
1b4: ff 93 push r31
shift(0);
1b6: 80 e0 ldi r24, 0x00 ; 0
1b8: 90 e0 ldi r25, 0x00 ; 0
1ba: a3 df rcall .-186 ; 0x102 <shift>
}
1bc: ff 91 pop r31
1be: ef 91 pop r30
1c0: bf 91 pop r27
1c2: af 91 pop r26
1c4: 9f 91 pop r25
1c6: 8f 91 pop r24
1c8: 7f 91 pop r23
1ca: 6f 91 pop r22
1cc: 5f 91 pop r21
1ce: 4f 91 pop r20
1d0: 3f 91 pop r19
1d2: 2f 91 pop r18
1d4: 0f 90 pop r0
1d6: 0b be out 0x3b, r0 ; 59
1d8: 0f 90 pop r0
1da: 0f be out 0x3f, r0 ; 63
1dc: 0f 90 pop r0
1de: 1f 90 pop r1
1e0: 18 95 reti
000001e2 <opgave3>:
}
}
void opgave3()
{
DDRC = 0x00;
1e2: 14 ba out 0x14, r1 ; 20
DDRD = 0xFF;
1e4: 8f ef ldi r24, 0xFF ; 255
1e6: 81 bb out 0x11, r24 ; 17
int count = 0;
1e8: 80 e0 ldi r24, 0x00 ; 0
1ea: 90 e0 ldi r25, 0x00 ; 0
display(count);
}
}
void display(int d)
{
PORTD = data[d];
1ec: a0 e0 ldi r26, 0x00 ; 0
1ee: b1 e0 ldi r27, 0x01 ; 1
int count = 0;
while(1)
{
if(0b00000001 & PINC == 0b00000001)
1f0: 23 b3 in r18, 0x13 ; 19
1f2: 21 30 cpi r18, 0x01 ; 1
1f4: 11 f4 brne .+4 ; 0x1fa <opgave3+0x18>
{
count++;
1f6: 01 96 adiw r24, 0x01 ; 1
1f8: 01 c0 rjmp .+2 ; 0x1fc <opgave3+0x1a>
}
else if(0b00000010 & PINC == 0b00000010)
1fa: 23 b3 in r18, 0x13 ; 19
{
count--;
}
if(count > 15)
1fc: 80 31 cpi r24, 0x10 ; 16
1fe: 91 05 cpc r25, r1
200: 2c f0 brlt .+10 ; 0x20c <opgave3+0x2a>
display(count);
}
}
void display(int d)
{
PORTD = data[d];
202: 1e 96 adiw r26, 0x0e ; 14
204: 2c 91 ld r18, X
206: 1e 97 sbiw r26, 0x0e ; 14
208: 22 bb out 0x12, r18 ; 18
20a: f2 cf rjmp .-28 ; 0x1f0 <opgave3+0xe>
count--;
}
if(count > 15)
display(14);
else if(count < 0)
20c: 99 23 and r25, r25
20e: 2c f4 brge .+10 ; 0x21a <opgave3+0x38>
display(count);
}
}
void display(int d)
{
PORTD = data[d];
210: 1e 96 adiw r26, 0x0e ; 14
212: 2c 91 ld r18, X
214: 1e 97 sbiw r26, 0x0e ; 14
216: 22 bb out 0x12, r18 ; 18
218: eb cf rjmp .-42 ; 0x1f0 <opgave3+0xe>
21a: fc 01 movw r30, r24
21c: e0 50 subi r30, 0x00 ; 0
21e: ff 4f sbci r31, 0xFF ; 255
220: 20 81 ld r18, Z
222: 22 bb out 0x12, r18 ; 18
224: e5 cf rjmp .-54 ; 0x1f0 <opgave3+0xe>
00000226 <main>:
Version : DMK, Initial code
*******************************************************************/
{
//powerpointOpg();
//opgave2();
opgave3();
226: dd df rcall .-70 ; 0x1e2 <opgave3>
00000228 <_exit>:
228: f8 94 cli
0000022a <__stop_program>:
22a: ff cf rjmp .-2 ; 0x22a <__stop_program>