[Solved]Q1 6 Points Program Assembly Language Reminders Instructions Get Number Keyboard Accum La Q37037446

Q1) (6 points Here is a program in the assembly language, with reminders about what the instructions do. get a number from keyboard into accumılator store accumulator in location INP INP STORE INP Foo IFPOS Bar if accumulator is positive, go to Bar LOAD SUM HLT subtract 2 from the accumulator store accumulator in location INP add the value of SUM to the accumulator store the accumulator in location SUM load the value of INP into the accumulator Bar SUB twO STORE INP ADD SUM STORE SUM LOAD INP BUN Foo go to instruction labeled Foo INP, DEC SUM, DEC 0 memory location called INP reserve a reserve a memory location called SUM, set its initial value to Two, DEC 2 (a) What does the program print when the input is 4? What if the input is 7? (b) Describe in words what the program does. Show transcribed image text Q1) (6 points Here is a program in the assembly language, with reminders about what the instructions do. get a number from keyboard into accumılator store accumulator in location INP INP STORE INP Foo IFPOS Bar if accumulator is positive, go to Bar LOAD SUM HLT subtract 2 from the accumulator store accumulator in location INP add the value of SUM to the accumulator store the accumulator in location SUM load the value of INP into the accumulator Bar SUB twO STORE INP ADD SUM STORE SUM LOAD INP BUN Foo go to instruction labeled Foo INP, DEC SUM, DEC 0 memory location called INP reserve a reserve a memory location called SUM, set its initial value to Two, DEC 2 (a) What does the program print when the input is 4? What if the input is 7? (b) Describe in words what the program does.
Expert Answer
Answer to Q1) (6 points Here is a program in the assembly language, with reminders about what the instructions do. get a number fr… . . .
OR

