Question: Write a procedure named PackedToAsc that converts a 4 - byte packed decimal integer to a string of ASCII decimal digits. Pass the packed integer
Write a procedure named PackedToAsc that converts a byte packed decimal integer to a string of ASCII decimal digits. Pass the packed integer and the address of a buffer holding the ASCII digits to the procedure. Write a short test program that passes at least packed decimal integers to your procedure. Display the string of digits to the console. Take a screenshot. points
numbers DWORD hhhhh
buffer BYTE DUP
The first number is h
After converting, you will see the following in buffer
writeString will output this is what you see on the console which is the string not the integer
Unpacked Decimal:
In unpacked decimal representation, each decimal digit is stored in a separate nibble bits The high bits of each nibble are reserved for the digit itself, and the low bits are often unused or set to zero low bits high bits
ASCII Decimal:
In ASCII representation of decimal numbers, each decimal digit is encoded using or bits, typically within a byte. The binary representation of the ASCII digits starts with the binary value which corresponds to the hexadecimal value low bits highbits
Putting it together:
In an unpacked decimal integer, the high bits of each nibble are always zeros because they are used solely to represent the decimal digit. For example, if you have the decimal digit its unpacked representation would be where the high bits are zeros
In an ASCII decimal representation, the high bits of the binary representation of each digit are set to because ASCII digits start with the value in binary. For example, the ASCII representation of the digit is in binary.
In summary, when comparing the high bits of unpacked decimal and ASCII decimal representations:
Unpacked Decimal: Always zeros unused for the digit itself
ASCII Decimal: Always because it corresponds to the starting value of ASCII digits. Please help me write Full Program in Assembly language using microsoft visual studio, Irvine library.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
