Hi, Following code:
1: int main() 2: { 3: char Buff[3]; 4: *((short*)(Buff+1)) = 0xFFFF; 5: }
4: *((short*)(Buff+1)) = 0xFFFF; 0x0008011C 4904 LDR R1,[PC,#0x0010] 0x0008011E 2001 MOV R0,#0x01 0x00080120 4468 ADD R0,SP 0x00080122 8001 STRH R1,[R0,#0x00]
Andy, Dan, Erik, Reinhard. Thanks for advices. I am currently offline and can't discuss in time. Of course performance and portability are important criteria. But may be other reasons for using bytealigning. It is privilege of programmer to decide wich of criteria is more significant. For my problem performance and portability are less importance. I think that for compiler it is advantageous to give different abilities for programmers. And, as Reinhard instructed, the CARM has ability of bytealigning. It is what I want. Thanks.