ZHCUAV8W january 1998 – march 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , OMAP-L132 , OMAP-L137 , OMAP-L138 , SM470R1B1M-HT , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
;***********************************************************
;* FUNCTION VENEER: _sum *
;***********************************************************
_sum:
.state32
STMFD sp!, {lr}
ADD lr, pc, #1
BX lr
.state16
BL $sum
BX pc
NOP
.state32
LDMFD sp!, {pc}
.state16
.sect ".text"
.global sum
;***********************************************************
;* FUNCTION DEF: $sum *
;***********************************************************
$sum:
PUSH {LR}
BL $max
LDR A2, CON1 ; {_total+0}
LDR A3, [A2, #0]
ADD A1, A1, A3
STR A1, [A2, #0]
POP {PC}
;***********************************************************
;* CONSTANT TABLE *
;***********************************************************
.sect ".text"
.align 4
CON1: .field _total, 32