Write a Pep/9 assembly language program that reads an integer value from the keyboard, and displays a table that shows the quotient when the input value is divided by successive powers of 2, between 2 and 32. In other words, your program should produce exactly the same output as the following C program: #include int inpVal; int divis; int quotient; int main() { printf("? "); scanf("%d", &inpVal); divis = 2; quotient = inpVal / divis; printf("%d / %d = %d\n", inpVal, divis, quotient); divis *= 2; quotient /= 2; printf("%d / %d = %d\n", inpVal, divis, quotient); divis *= 2; quotient /= 2; printf("%d / %d = %d\n", inpVal, divis, quotient); divis *= 2; quotient /= 2; printf("%d / %d = %d\n", inpVal, divis, quotient); divis *= 2; quotient /= 2; printf("%d / %d = %d\n", inpVal, divis, quotient); } // end of main Example of Input and Output format requirements: For this example, assume that the keyboard input given to the program is: 8209 For this input data, the output report must look like this: ? 8209 8209 / 2 = 4104 8209 / 4 = 2052 8209 / 8 = 1026 8209 / 16 = 513 8209 / 32 = 256 **************************** IMP I need in this below example in Assembly Language format please don't answer in other ways***************************************
Operations
In mathematics and computer science, an operation is an event that is carried out to satisfy a given task. Basic operations of a computer system are input, processing, output, storage, and control.
Basic Operators
An operator is a symbol that indicates an operation to be performed. We are familiar with operators in mathematics; operators used in computer programming are—in many ways—similar to mathematical operators.
Division Operator
We all learnt about division—and the division operator—in school. You probably know of both these symbols as representing division:
Modulus Operator
Modulus can be represented either as (mod or modulo) in computing operation. Modulus comes under arithmetic operations. Any number or variable which produces absolute value is modulus functionality. Magnitude of any function is totally changed by modulo operator as it changes even negative value to positive.
Operators
In the realm of programming, operators refer to the symbols that perform some function. They are tasked with instructing the compiler on the type of action that needs to be performed on the values passed as operands. Operators can be used in mathematical formulas and equations. In programming languages like Python, C, and Java, a variety of operators are defined.
Write a Pep/9 assembly language program that reads an integer value from the keyboard, and displays a table that shows the quotient when the input value is divided by successive powers of 2, between 2 and 32. In other words, your program should produce exactly the same output as the following C program:
#include <stdio.h> int inpVal; int divis; int quotient; int main() { printf("? "); scanf("%d", &inpVal); divis = 2; quotient = inpVal / divis; printf("%d / %d = %d\n", inpVal, divis, quotient); divis *= 2; quotient /= 2; printf("%d / %d = %d\n", inpVal, divis, quotient); divis *= 2; quotient /= 2; printf("%d / %d = %d\n", inpVal, divis, quotient); divis *= 2; quotient /= 2; printf("%d / %d = %d\n", inpVal, divis, quotient); divis *= 2; quotient /= 2; printf("%d / %d = %d\n", inpVal, divis, quotient); } // end of main
Example of Input and Output format requirements:
For this example, assume that the keyboard input given to the program is:
8209
For this input data, the output report must look like this:
? 8209
8209 / 2 = 4104
8209 / 4 = 2052
8209 / 8 = 1026
8209 / 16 = 513
8209 / 32 = 256
**************************** IMP I need in this below example in Assembly Language format please don't answer in other ways********************************************
![gure
High-Order Language
#include <stdio.h>
char ch;
int j;
int main() {
scanf ("&c %d", &ch, &j);
j += 5;
ch++;
printf("%c\n%d\n", ch, j);
return 0;
}
Assembly Language
0000
120006
BR
main
0003 00
ch:
.BLOCK 1
;global variable #1c
0004
0000
j:
.BLOCK 2
global variable #2d
0006 D1FC15 main:
LDBA
charIn,d
;scanf ("&c %d", &ch, &j)
0009
F10003
STBA
ch,d
000c 310004
DECI
j,d
;j += 5
000F
C10004
LDWA
j,d
0012
600005
ADDA
5,i
0015
E10004
STWA
j,d
0018
D10003
LDBA
ch, d
;ch++
001B
600001
ADDA
1,i
001E
F10003
STBA
ch,d
0021 D10003
LDBA
ch,d
:printf ("$c\n&d\n", ch, j)
0024 F1FC16
STBA
charOut,d
0027 DO000A
LDBA
'\n',i
002A F1FC16
STBA
charOut,d
002D
390004
DECO
j,d
0030 DO000A
LDBA
'\n',i
0033
F1FC16
STBA
charOut,d
0036 00
STOP
0037
.END
Input
M 419
Output
424](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb5e04842-8d41-4e41-acd9-d5eea24d52b6%2Fa3800824-603f-4dcb-be6e-504dd6e2f3af%2Fnk98l8g_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)