[Icc-mot] ICC12 Advanced V7.03 bug
willard.a.hall at gm.com
willard.a.hall at gm.com
Mon Apr 7 07:54:25 PDT 2008
The code shown needs to do a logical shift right to give me id = 0x0581
The compiler uses an arithmatic shift which wraps the sign bit to give me
id = 0xFD81
CANRIDR0 = 0xB0 CANRIDR1 = 0x20
06B9 ; id = ((((I16)(CANRIDR0 << 8)) | ((I16)(CANRIDR1)))
>> 5);
06B9 F60161 ldab 0x161
06BC 87 clra
06BD B746 tfr D,Y
06BF C7 clrb
06C0 B60160 ldaa 0x160
06C3 6D80 sty 0,S
06C5 AA80 ora 0,S
06C7 EA81 orb 1,S
06C9 B746 tfr D,Y
06CB CE0005 ldx #5
06CE B764 tfr Y,D
06D0 160000 jsr asr16
06D3 B746 tfr D,Y
06D5 6D83 sty 3,S
06D7 .dbline 269
More information about the Icc-mot
mailing list