Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Part 1) After each line of code, determine the signed decimal value of A, and the CCR bits NZVC. If you use the CodeWarrior editor,
Part 1) After each line of code, determine the signed decimal value of A, and the CCR bits NZVC. If you use the CodeWarrior editor, you may add your answers in the comments section of your code. ORG $0800 START LDAA #S08 LSLA LSLA LSRA NOP LDAA #SCO ASRA ASRA NOP Part 2) Describe the overall function of the code segment, in terms of BCD numbers. Hint: what happens to the $472 ORG $0800 LDAA #S47 LSRA LSRA LSRA LSRA LDAB #947 ANDB #SOF NOP Part 3) Describe the overall function of the code segment, in terms of BCD numbers. Hint, what happens to the S0407? ORG $0800 LDD #$0407 LSLA LSLA LSLA LSLA ABA NOP Part 4) Using the hints from parts 2 and 3, write an assembly code module that converts a 6-digit packed BCD number ($12,834,556) to 6 bytes of unpacked BCD digits (S01, 302, etc.). The packed digits (test data) are stored in in memory starting at address named PACKED at SB000; the unpacked digits should be stored at an address called UNPACKED, directly after the PACKED bytes. Part 5) To the code above, add assembly code that converts the 6-digit unpacked BCD number to 6 bytes of ASCII coded digits. The ASCII data array should start at an address called ASCII, directly after the UNPACKED bytes Part 1) After each line of code, determine the signed decimal value of A, and the CCR bits NZVC. If you use the CodeWarrior editor, you may add your answers in the comments section of your code. ORG $0800 START LDAA #S08 LSLA LSLA LSRA NOP LDAA #SCO ASRA ASRA NOP Part 2) Describe the overall function of the code segment, in terms of BCD numbers. Hint: what happens to the $472 ORG $0800 LDAA #S47 LSRA LSRA LSRA LSRA LDAB #947 ANDB #SOF NOP Part 3) Describe the overall function of the code segment, in terms of BCD numbers. Hint, what happens to the S0407? ORG $0800 LDD #$0407 LSLA LSLA LSLA LSLA ABA NOP Part 4) Using the hints from parts 2 and 3, write an assembly code module that converts a 6-digit packed BCD number ($12,834,556) to 6 bytes of unpacked BCD digits (S01, 302, etc.). The packed digits (test data) are stored in in memory starting at address named PACKED at SB000; the unpacked digits should be stored at an address called UNPACKED, directly after the PACKED bytes. Part 5) To the code above, add assembly code that converts the 6-digit unpacked BCD number to 6 bytes of ASCII coded digits. The ASCII data array should start at an address called ASCII, directly after the UNPACKED bytes
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started