This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: kbdin Solution: 2. Programming: ADDBCD.x68 (50pts) ; To add 6 packed BCD bytes (12 decimal digits) ; stored at STRING1 and STRING2 and put the ; result at STRING3. org $2000 addbcd ; Make sure that pointers point to end of each string ; of numbers, because addition is done from right to ; left. Also clear the X-flag before you start. ; Fix up loop counter too. loop ; Do the addition in a loop. -- trap #9 ; Storage areas org $8030 string1 dc.b $45,$32,$78,$97,$56,$64 org $8040 string2 dc.b $51,$56,$71,$89,$57,$28 org $8050 string3 ds.b 6 end addbcd Solution:...
View Full Document
This note was uploaded on 02/18/2010 for the course ECET 252 taught by Professor Hu during the Spring '10 term at NJIT.
- Spring '10