x86 MASM Assignment READ DESCRIPTION
PLEASE USE THE CODE PROVIDED IN THE ATTACHMENT AS A TEMPLATE.
I have already completed the first part of this assignment and just need help with the second part which is putting the numbers in groups and separating them by a user specified character. Again, please use the code attached as a template and comment work. Thank you.
Modify the code so that FORMAT_NUMBER has additional capabilities.
1) Add a character that is used to LEFT PAD the output - currently this occurs in FORMAT_NUMBER and is hard coded as a SPACE (' ') character. You must modify it so the character (FILLCHAR) is passed into the proc as a stack parameter (along with the other existing stack parameters). You will need to modify FORMAT_NUMBER itself, obviously. You will also modify the several MACROs so that they pass the appropriate padding character parameter to FORMAT_NUMBER. You *can* hardcode the character in each macro ('0' for BIN and HEX, SPACE ' ' for decimal) - but you can probably see how to modify the macros themselves so the character is passed INTO THE MACRO in the PRINT_ROW proc.
2) Continue modifying the code. Add a GROUP_SIZE mechanism to FORMAT_NUMBER, with a GROUP_CHAR character that separates digit groups.
Example: GROUP_SIZE = 4, GROUP_CHAR = '_' (as would be used for binary)
0000_0000_0110_1011 - with above values, the binary output is groups of 4 digits, see?
Again, these must be parameters (on the stack) to FORMAT_NUMBER, ditto the Macro changes.