Kleine Frage, gibts ein Equivalent dazu auch in C?
Eine Interruptroutine sieht so aus:
1 | 828: 1f 92 push r1
|
2 | 82a: 0f 92 push r0
|
3 | 82c: 0f b6 in r0, 0x3f ; 63
|
4 | 82e: 0f 92 push r0
|
5 | 830: 11 24 eor r1, r1
|
6 | 832: 2f 93 push r18
|
7 | 834: 3f 93 push r19
|
8 | 836: 4f 93 push r20
|
9 | 838: 5f 93 push r21
|
10 | 83a: 6f 93 push r22
|
11 | 83c: 7f 93 push r23
|
12 | 83e: 8f 93 push r24
|
13 | 840: 9f 93 push r25
|
14 | 842: af 93 push r26
|
15 | 844: bf 93 push r27
|
16 | 846: ef 93 push r30
|
17 | 848: ff 93 push r31
|
18 | uart_IRQ();
|
19 | 84a: 0e 94 41 06 call 0xc82 <uart_IRQ>
|
20 | 84e: ff 91 pop r31
|
21 | 850: ef 91 pop r30
|
22 | 852: bf 91 pop r27
|
23 | 854: af 91 pop r26
|
24 | 856: 9f 91 pop r25
|
25 | 858: 8f 91 pop r24
|
26 | 85a: 7f 91 pop r23
|
27 | 85c: 6f 91 pop r22
|
28 | 85e: 5f 91 pop r21
|
29 | 860: 4f 91 pop r20
|
30 | 862: 3f 91 pop r19
|
31 | 864: 2f 91 pop r18
|
32 | 866: 0f 90 pop r0
|
33 | 868: 0f be out 0x3f, r0 ; 63
|
34 | 86a: 0f 90 pop r0
|
35 | 86c: 1f 90 pop r1
|
36 | 86e: 18 95 reti
|
In uart_IRQ werden allerdings nur r1, r24, r25, r30 und r31 benutzt.
Ziemlich blöde... Wofür hat man denn einen Compiler, der einem Arbeit
abinmmt, wenn der noch nichtmals versteht, welche Register überhaupt
nur gesichert werden müssen.