Write an 8086 assembly program to compute the following:
y = 3x + 9x - 10
where x and y are 32-bit integer variables. x is in the range of (1
= < x < = 8). y is a list (use DUP when identifying and
initializing y list). y only contains the result of x = 1, 3, 5,
and 7. Use if-statement and while loop. The values of the y list
after running the program should be: 2, 26, 50, 74
MOV CX,1000h // Address of
input
MOV DX,2000h // Address of
Output
MOV AL,[CX]
// Copy the input to Accumulator
JS END //
Terminate if Negative
SUB AL,8 //
To check the number is less than 8
JNS END //
Terminate if Greater than 8
MOV AL,[CX]
// Copy the input to Accumulator
AND AL,0001b // To check odd
number
JZ END //
Terminate if even
MOV AL,[CX]
// Copy the input to Accumulator
MOV BL,12
MUL BL
SUB AL,10
// AL <-- 12*X - 10
MOV [DX],AL
// Move the output to destination address location
END HLT
// Terminate the program
Write an 8086 assembly program to compute the following: y = 3x + 9x - 10...
Write an assembly program that finds the largest two numbers in list of 10 numbers. use if cond and loop list = 111, 32, 51, 220, 10, 13, 34, 113, 56, 44
Write MARIE assembly language programs that do the following: I. Write a program that inputs three integers, a, b, and c, in that order. It computes the following ia-bi-fc+ c The result should be written to output 2. Write a program that inputs integers, s. y, and z. It outputs the difference of the langest and first element entered. You may assume x. y, and z all have different values. So if 8, 12, and 9 are input, the output...
Use Assembly (Masm and Irvine32 library) to write a complete program that: 1. Asks the user to enter 2 numbers. Assume that the user enters unsigned 32-bit integers only. 2. Displays the product of the two numbers. Assume that the result will never be larger than 32 bits. 3. This process will continue till the user enters 0 for both inputs. You can’t use mul instruction in your program: You need to use shifting and addition only. Your program must...
Using #include <stdio.h> 6) Write a program that computes X^Y (X to the power of Y). You are required to use a while loop to solve the problem. Do not use the pow function from the “math.h” library. You may hard code the variables X and Y in the beginning of your program. Hint: 5^4 =5*5*5*5
Write a complete MIPS assembly language program that implements the following pseudocode. program h2 define global integer variables w, x, y, z -- in the .data section function main() SysPrintStr("Enter an integer >= 0 for w? ") w ← SysReadInt() SysPrintStr("Enter an integer >= 0 for x? ") x ← SysReadInt() SysPrintStr("Enter an integer < 0 for y? ") y ← SysReadInt() z ← 16(w + x) - (3 × -y mod 7) SysPrintStr("z = ") SysPrintInt(z) SysExit() end function...
Write a complete program in assembly line that: 1. Prompt the user to enter 10 numbers. 2. save those numbers in a 32-bit integer array. 3. Print the array with the same order it was entered. 3. Calculate the sum of the numbers and display it. 4. Calculate the mean of the array and display it. 5. Rotate the members in the array forward one position for 9 times. so the last...
Step 1. Write a program in assembly language (using macros) to print out the following messages on the screen [20 marks]: Hello, programmers! Welcome to the world of, Linux assembly programming! Step 2. Write a C function to passed two numbers to the function and calculate the sum of all the numbers between them (both inclusive). [50 marks] a. Make a version with for loop b. Make a version with while loop c. Make a version with do.. while loop...
[Arithmetic Expression] Write a program that computes y from the following arithmetic expression: y = mx + c. Use all values as signed words which are stored as variables in the memory. Show your results for different values of m, x and c. please answer in assembly
Write a C program Design a program that uses an array to store 10 randomly generated integer numbers in the range from 1 to 50. The program should first generate random numbers and save these numbers into the array. It will then provide the following menu options to the user: Display 10 random numbers stored in the array Compute and display the largest number in the array Compute and display the average value of all numbers Exit The options 2...
Create a complete Assembly Language program implementation for the following application with a) 32-bit and b) 64-bit version (If Possible) App1: Geometric Shape Calculator Companion. The program details (design, implementation, code, runs) should show evidence of technical proficiency with the following technological aspects: 1. a) Implementation using 32-bit programming. b) Re-implement using 64-bit programming. 2. Test plan; test cases implementing the test plan and screen shots displaying the executing the test cases. Note: a test plan should include various Normal,...