int tm_asm_checksum (int loopCount,tt32Bit dataPtr,tt32Bit checksum) { asm { move.l checksum,d0 // Build result in D0 move.l dataPtr,a0 // A0 -> data move.l loopCount,d1 // D1 holds loop count clr.l d2 CHECKSUM_LOOP: add.l (a0)+,d0 // Add next value into checksum addx.l d2,d0 // Also add in the carry subq.l #1,d1 bne CHECKSUM_LOOP } }
To retrieve that info:
- Start CodeWarrior
- Select Help -> About Freescale CodeWarrior
- Click on "Install Products"
- Click on save as and save content of the dialog to a text file that you will attach to the SR.
Finally make sure to explain what you intend to do (i.e. what the Diab notation were supposed to do).
I hope this helps.