You will have to take 5 numbers between 0-9 as input and calculate their sum. Keep in mind that the input you are taking is a character. You somehow have to convert it to the corresponding number. Then you will print strings based on the value of the sum you calculated. You will have to follow the pseudo-code given below –
While taking the inputs, you will have to print appropriate input prompts. You will first print ”Enter the first number: ” (there is a space after colon) and take the input in the same line. Then in the next line you will print ”Enter the second number: ” and take the second number as input in the same line. You will do the same for third, fourth and fifth numbers
Marks
Use: 8086 Assembler,
Code a program that will form a trees, use the word below. with different color in every word.
T R E E S
I think that I shall never see
A poem lovely as a tree A tree whose
hungry mouth is pressed Against the
sweet earth’s flowing breast A tree
that looks at God all day And lifts her
leafy arms to pray A tree that may in
summer wear A nest of robins
in her hair Upon whose bosom snow
has lain Who intimately lives with
rain Poems are made by fools
like me
But only
God can
Make
a tree
JOYCE KILMER
Write an Assembly Language code that rearranges any four (2) strings of doubleword values in an array expressing yourself during MCO with this Covid-19 pandemic. Then request a user to enter a name, before the program will reverse the name. All strings should be present in different colors. Repeat the output 2 times.
For the below mentioned pseudo code (i) and pseudocode (ii), write the equivalent assembly code (mnemonics) in zero, one , two, three address instruction format for swapping the value of two variables a and b.
// pseudo Code(i)
Void Swap(int a , int b)
{
int temp;
temp=a
a=b;
b= temp;
}
// pseudo Code(ii)
/*Assume the address of variable a and b is stored in the pointer variable *x and *y. */
Void Swap(int *x , int *y)
{
int temp;
temp= *x;
*x=*y;
*y= temp;
}
(i) With taking necessary assumption, find the number of clock cycle that will be required for each case in zero, one, two, three address format for the completion of the program.
(ii) For each case find the number of times refers to memory for the completion of the program.
Draw circuit to R1<-R1^R2 which bit you want
Let the following array as matrix; write the MIPS mars code to transpose it. with output
class_marks: .word 10,11,12,13
.word 20,21,22,23
.word 30,31,32,33
.word 40,41,42,43
Let the following array as matrix; write the MIPS code to transpose it.
class_marks: .word 10,11,12,13
.word 20,21,22,23
.word 30,31,32,33
.word 40,41,42,43
Q1: Consider the last 2 digits of your registration number as a hexadecimal number.
i) Write the code to multiply this number by 6 without using the MUL command.
ii) Write the code to divide this number by 2 without using the DIV command.
Write the code so that you can take input on the console and display each word in the next line. Run
this program and enter three subject/course names that you have studied this semester to test if it is
working properly or not.
Consider the last 2 digits of your registration number as a decimal. Write the code to check if it is even
or odd. Depending on the result, increment the original number once if it is even; decrement if the original
number is odd.