programb58 - Microprocessors & Applications (UPTU)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Appendix B ØØ Explanation : For BCD-ASCII conversion. (i) Mask the lower digit of given BCD number. (ii) Add 30H to it to convert it to equivalent ASCII number (iii) Now mask the upper digit of given BCD number. (iv) Rotate the upper digit by 4 to make it lower nibble and then add 30H to get equivalent ASCII number. ØØ Algorithm : Step I : Get the number whose ASCII code equivalent is to be found. Step II : Mask the lower digit of given BCD number . Step III : Add 30 H to masked digit get its ASCII equivalent Step IV : Store the ASCII digit at location ASC1 Step V : Mask the upper digit of given BCD number Step VI : Rotate the upper digit by 4 to make it lower nibble Step VII : Add 30 H to masked digit get its ASCII equivalent Step VIII : Store the ASCII digit at location ASC2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

programb58 - Microprocessors & Applications (UPTU)...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online