HCS129S12 An Introduction to Software and Hardware Interfaci
HCS12/9S12 An Introduction to Software and Hardware Interfacing #2.6
E2.6 Write an instruction sequence to add the two 24-bit numbers stored at $1010,$1012 and $1013, $1015 and save the sum at $1100,$1102.Solution
LDAA $1010 ; value in memory1010 loaded into A
LDAB $1012 ; value in memory1012 loaded into B
ABA ; Add B to A; results in A
STAA $1100 ; A value stored in memory 1100
LDAA $1013 ; value in memory1013 loaded into A
LDAB $1015 ; value in memory1015 loaded into B
ABA ; Add B to A; results in A
STAA %1102 ; A value stored in memory 1102

