i have assembly code and want to convert to equivalent in c i think it is
addition but i want if it is only simple addition so need help and thnx in advance :
Flash_Check_SUM:
clr ZH
clr ZL
clr XH
clr XL
FCK_1:
lpm R1,z+
add XL,R1
brcc FCK_2
inc XH ;carry set so inc Hi Bit
FCK_2:
cpi ZH,HIGH(BSTART*2 -16)
brne FCK_1
cpi ZL,LOW(BSTART*2 -16)
brne FCK_1
lpm R0,Z+
lpm R1,Z
cp R0,XH
brne CK_Fail
cp R1,XL
brne CK_Fail
ret
CK_Fail:
It would be something like this: