Question: Write a subroutine to convert the hex number in accumulator A to two BCD digits and return the result in A . The number to

Write a subroutine to convert the hex number in accumulator A to two
BCD digits and return the result in A. The number to be converted is assumed to be less than 100. Also write a main program to test your subroutine. Include the following steps:
1. Call the Buffalo 1/O routines OUTLHLF and OUTHL to output the hex number in accumulator A.
2. Call the Buffalo I/O routine OUTCRLF to output the carriage return andlinefeedpair.Call the hex-co-BCD subroutine to perform the conversion.
4, Call the OUTLHIP and OUTRHIP routines to output the result
5. Call the Buffalo I/O routine OUTCRIF to output the carriage return and line feed pair,
6. Test the subroutine using an array of ten integernumbers. on chegg mc68hc11

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!