Program 1 Write an HLA Assembly program that prompts for an int8 value to inspect and then prints it in binary format. For example, here would be the program output for various entered values Gimme a

Program 1

Write an HLA Assembly program that prompts for an int8 value to inspect and then prints it in binary format. For example, here would be the program output for various entered valuesGimme a decimal value to print: 1515 is 0000_1111Gimme a decimal value to print: 77 is 0000_0111(Hint: There is no standard output that prints in binary output, so you need to do this yourself. In order to accomplish this, you need to move a bit at time into the carry flag and print 0 or 1, depending on what you find in the Carry bit. Shift and repeat this procedure 8 times and you are done! Eventually, we will learn how to loop, which would make this task much less terrible.)

(Second Hint:LAHF pushes the Carry Bit and all the other flags out of the EFLAGS register and into AH. As an Assembly programmer, you have the power to mask out all the bits but the one you are interested in by using either AND or OR.)

Program 2

Using the ROL instruction to perform doubling, write a program to produce a quad table.  This table should be built from a single int32 value provided by the user and print three rows from the starting value, each offset by one from the starting value. In that column, the pattern of quad numbers should be calculated by doing ROL instructions twice on each value.  For example, the following output should be produced when the user inputs the starting value 4:Gimme a starting value: 4Quad Table4:  16 645:  20 806:  24 96 

For example, the following output should be produced when the user inputs the starting value 7:

Gimme a starting value: 7Quad Table7:  28  1128:  32  1289:  36  144 

(Note: To receive full credit, you must use ROL to solve this problem.)  (Hint: Again, please don’t worry too much about the spacing in the table. 

It should be the case that the only instructions you need to complete the programs assigned here are the ones in the pdf file