|
21 char Bits1(unsigned word)
22 {
23 char count = 0;
\ __nearfunc char Bits1(unsigned int);
\ Bits1:
\ 00000000 E020 LDI R18,0
24 if (word)
\ 00000002 2F30 MOV R19,R16
\ 00000004 2B31 OR R19,R17
\ 00000006 F049 BREQ ??Bits1_0
25 do {
26 ++count;
\ ??Bits1_1:
\ 00000008 9523 INC R18
27 }
28 while (word &= word-1);
\ 0000000A 2FE0 MOV R30,R16
\ 0000000C 2FF1 MOV R31,R17
\ 0000000E 9731 SBIW R31 : R30,1
\ 00000010 230E AND R16,R30
\ 00000012 231F AND R17,R31
\ 00000014 2F30 MOV R19,R16
\ 00000016 2B31 OR R19,R17
\ 00000018 F7B9 BRNE ??Bits1_1
29 return count;
\ ??Bits1_0:
\ 0000001A 2F02 MOV R16,R18
\ 0000001C 9508 RET
30 }Maximum stack usage in bytes:
Function CSTACK RSTACK
-------- ------ ------
Bits1 0 0
30 bytes of CODE memory
E-mail: info@telesys.ru