Ich stehe gerade auf dem Schlauch.
Warum wird aus
1 | test=PIND;
|
2 | if (test>0){
|
3 | test=0;
|
4 | }
|
1 | 130: test=PIND;
|
2 | +000000DE: B380 IN R24,0x10 In from I/O location
|
3 | 132: test=0;
|
4 | +000000DF: 92100075 STS 0x0075,R1 Store direct to data space
|
Gestalte ich die if-Abfrage so:
1 | test=PIND;
|
2 | if (test>1){
|
3 | test=0;
|
4 | }
|
wird die Abfrage auch durchgeführt:
1 | 130: test=PIND;
|
2 | +000000DE: B380 IN R24,0x10 In from I/O location
|
3 | +000000DF: 93800075 STS 0x0075,R24 Store direct to data space
|
4 | 131: if (test>1){
|
5 | +000000E1: 3082 CPI R24,0x02 Compare with immediate
|
6 | +000000E2: F010 BRCS PC+0x03 Branch if carry set
|
7 | 132: test=0;
|
8 | +000000E3: 92100075 STS 0x0075,R1 Store direct to data space
|