AVRGCC ICCAVR

Hello, All!

????????? ???? ?? 20080430...

unsigned char getSer_0(void) { 292: 20 91 31 01 lds r18, 0x0131 296: 30 91 32 01 lds r19, 0x0132 29a: 80 91 4f 01 lds r24, 0x014F 29e: 90 91 50 01 lds r25, 0x0150 2a2: 28 17 cp r18, r24 2a4: 39 07 cpc r19, r25 2a6: 91 f0 breq .+36 ; 0x2cc <getSer_0+0x3a>

// ??? ?? ???? ?

unsigned char received = 0x00;

while(SCRxRdIdx_0 == SCRxWrIdx_0); // wait for character

received = SCRxBuf_0[SCRxRdIdx_0++]; 2a8: f9 01 movw r30, r18 2aa: e9 5e subi r30, 0xE9 ; 233 2ac: fe 4f sbci r31, 0xFE ; 254 2ae: e0 81 ld r30, Z 2b0: c9 01 movw r24, r18 2b2: 01 96 adiw r24, 0x01 ; 1 2b4: 90 93 32 01 sts 0x0132, r25 2b8: 80 93 31 01 sts 0x0131, r24

if(SCRxRdIdx_0 >= SC0RXBUFSIZ) 2bc: 48 97 sbiw r24, 0x18 ; 24 2be: 20 f0 brcs .+8 ; 0x2c8 <getSer_0+0x36>

SCRxRdIdx_0 = 0; 2c0: 10 92 32 01 sts 0x0132, r1 2c4: 10 92 31 01 sts 0x0131, r1

return received; } 2c8: 8e 2f mov r24, r30 2ca: 08 95 ret 2cc: ff cf rjmp .-2 ; 0x2cc <getSer_0+0x3a>

// ?????? ??????

ICCAVR 6

(0092) unsigned char getSer_0(void) (0093) { (0094) unsigned char received = 0x00; _getSer_0: received --> R16 017D 2700 CLR R16 (0095) (0096) while(SCRxRdIdx_0 == SCRxWrIdx_0); // wait for character 017E 9020016C LDS R2,_SCRxWrIdx_0 0180 9030016D LDS R3,_SCRxWrIdx_0+1 0182 9040016E LDS R4,_SCRxRdIdx_0 0184 9050016F LDS R5,_SCRxRdIdx_0+1 0186 1442 CP R4,R2 0187 0453 CPC R5,R3 0188 F3A9 BEQ 0x017E (0097) (0098) received = SCRxBuf_0[SCRxRdIdx_0++]; (0099) (0100) if(SCRxRdIdx_0 >= SC0RXBUFSIZ) 0189 01C2 MOVW R24,R4 018A 9601 ADIW R24,1 018B 9390016F STS _SCRxRdIdx_0+1,R25 018D 9380016E STS _SCRxRdIdx_0,R24 018F E780 LDI R24,0x70 0190 E091 LDI R25,1 0191 01F2 MOVW R30,R4 0192 0FE8 ADD R30,R24 0193 1FF9 ADC R31,R25 0194 8100 LDD R16,Z+0 0195 9180016E LDS R24,_SCRxRdIdx_0 0197 9190016F LDS R25,_SCRxRdIdx_0+1 0199 3188 CPI R24,0x18 019A E0E0 LDI R30,0 019B 079E CPC R25,R30 019C F030 BCS 0x01A3 (0101) SCRxRdIdx_0 = 0; 019D 2422 CLR R2 019E 2433 CLR R3 019F 9230016F STS _SCRxRdIdx_0+1,R3 01A1 9220016E STS _SCRxRdIdx_0,R2 (0102) (0103) return received; 01A3 9508 RET (0104) }

? ??? ????? ??? ?????...

With best regards, Andrej Arnold. E-mail: snipped-for-privacy@aol.com

Reply to
Andrej Arnold
Loading thread data ...
Reply to
Alex Mogilnikov

п■п╣п╨п╩п╟я─п╟я├п╦п╦ п╡п╬я┌ я█я┌п╦я┘ SCR... (п╫п╣ я─п╟п╥пЁп╩я▐п╢п╣я┌я▄) п╡ я│я┌я┐п╢п╦я▌! п░ п╥п╟п╬п╢п╫п╬ п╦ п╩п╦я│я┌п╦п╫пЁ я│ avr-gcc -O1 п░ я┌п╬ п╪п╫п╣ п©п╬я┤п╣п╪я┐-я┌п╬ п╢я┐п╪п╟п╣я┌я│я▐, gcc я┌п╣п╠п╣ я┘п╬я┤п╣я┌ я│п╨п╟п╥п╟я┌я▄ я┤я┌п╬-я┌п╬ п╡я─п╬п╢п╣ "я│п╟п╪-п╢я┐я─п╟п╨", п╫п╬ п╡п╡п╦п╢я┐ я│п╦п╩я▄п╫п╬п╧ п╬п©я┌п╦п╪п╦п╥п╟я├п╦п╦ (я┘п╬я┌я▐ п╢п╩я▐ AVR, п╫п╟п╢п╬ я┤п╣я│я┌п╫п╬ п©я─п╦п╥п╫п╟я┌я▄, GCC я│п╟я│я▒я┌) п╫п╦п╨п╟п╨ п╫п╣ п╪п╬п╤п╣я┌.

Reply to
Kirill Frolov
<<< No Message Collected >>>
Reply to
Kirill Frolov

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.