1. Find the output of the following assembly code manually when the input is 15. Use the table below to keep track of each iteration. INP STO SUB STO ZRSC JMP OUT JMP DONE OUT X YACC Output SEC DONESTP DAT DAT 0 2. Run the code so you can verify that it works according to your expectations. Take a screenshot. 3. Explain briefly what this program does? 4. What happens if the input value was set to 8? Modify the program by inserting an instruction in the appropriate place so that it will work for all input values. Clearly indicate the instruction and its location. Then complete the following table for input value set to 8. Y ACc Output Binary Opcode Description 1111 STP this stops the computer, no more fetch/decode/execute cycles until you reset. 0001 ADD fetch a number from memory and add it to the contents of the accumulator, replacing the value in the accumulator. E.g. 0001000000001111 -get the value at memory location 15 and add that to accumulator 0010 SUB just like ADD, only subtract. 0011 LOD fetch a number from memory and store it into the accumulator, replacing its old value E.g. 0011000000001111 get the value at memory location 15 and store that value into the accumulator. 0100 LDI load immediate; the value (data) to be put into the accumulator is the operand (the rightmost 12 bits of the instruction); do not go to memory like LOD E.g. 0100000000001111 store the accumulator's value into memory at the indicated location. E.g. 0101000000001111store the accumulator's value into memory location 15. 0101 STO 1. Find the output of the following assembly code manually when the input is 15. Use the table below to keep track of each iteration. INP STO SUB STO ZRSC JMP OUT JMP DONE OUT X YACC Output SEC DONESTP DAT DAT 0 2. Run the code so you can verify that it works according to your expectations. Take a screenshot. 3. Explain briefly what this program does? 4. What happens if the input value was set to 8? Modify the program by inserting an instruction in the appropriate place so that it will work for all input values. Clearly indicate the instruction and its location. Then complete the following table for input value set to 8. Y ACc Output Binary Opcode Description 1111 STP this stops the computer, no more fetch/decode/execute cycles until you reset. 0001 ADD fetch a number from memory and add it to the contents of the accumulator, replacing the value in the accumulator. E.g. 0001000000001111 -get the value at memory location 15 and add that to accumulator 0010 SUB just like ADD, only subtract. 0011 LOD fetch a number from memory and store it into the accumulator, replacing its old value E.g. 0011000000001111 get the value at memory location 15 and store that value into the accumulator. 0100 LDI load immediate; the value (data) to be put into the accumulator is the operand (the rightmost 12 bits of the instruction); do not go to memory like LOD E.g. 0100000000001111 store the accumulator's value into memory at the indicated location. E.g. 0101000000001111store the accumulator's value into memory location 15. 0101 STO