Emelie Edholm

Help! Why tst.l needed in CW V7.0 not V6.3?

Discussion created by Emelie Edholm on Aug 22, 2008
Latest reply on Aug 24, 2008 by Rich Testardi

 

There are some differences in assembles in CW V6.3 and V7.0. Why is " tst.l    d0" needed in V7.0, not in V6.3?

C code:
while (!(MCF_I2C_I2SR & MCF_I2C_I2SR_IIF));

Assemble in v6.3:
0001801A: 41F940000000    lea      0x40000000 (0x40000000),a0
00018020: 1228030C        move.b   780(a0),d1
00018024: 7000            moveq    #0,d0
00018026: 1001            move.b   d1,d0
00018028: 028000000002    andi.l   #0x2,d0
0001802E: 67EA            beq.s    I2CWriteN+0x56 (0x1801a); 0x0001801a

Assemble in v7.0:
000191B2: 12394000030C    move.b   0x4000030C (0x4000030c),d1
000191B8: 7000            moveq    #0,d0
000191BA: 1001            move.b   d1,d0
000191BC: 028000000002    andi.l   #0x2,d0
000191C2: 4A80            tst.l    d0
000191C4: 67EC            beq.s    I2CWriteN+0x56 (0x191b2); 0x000191b2


Best Regards

Superman_EE

Outcomes