Question

In: Computer Science

Write an 8086 assembler program (using the emulator) that will perform the following calculations. All values...

  1. Write an 8086 assembler program (using the emulator) that will perform the following calculations. All values below are decimals. You must attach
  • Screenshot of emu8086 showing the different register values at the end of the execution
  • A printed copy of your code (screenshot is OK)

a) (6 -4) * 20 - (9 + 1)            Place the answer in the AX register

b) 1000 - 4 * (3 *32)             Place the answer in the AX register

Solutions

Expert Solution

Please find the answer below.
Please do comments in case of any issue. Also, don't forget to rate the question. Thank You So Much.

mov al,6
mov cl,4
sub al,cl ; get 6-4
mov bl,20
mul bl ; get (6-4)*20
sub al,9 ; get (6-4)*20 - 9
sub al,1 ; get (6-4)*20 - 9

output

2)

mov bx,1000
mov ax,4
mov cx,3
mul cl ; get 4*3   
mov cx,32
mul cl ; get 4*3*32
sub bx,ax
mov ax,bx


Related Solutions

using Emulator Write an Assembly program that will produce all divisors for a 1-digit decimal number....
using Emulator Write an Assembly program that will produce all divisors for a 1-digit decimal number. For example, if the number is 6, then the outputs will be 1,2,3,6 which are the divisors of 6. show me the output
Write a Python program that will perform various calculations (addition, subtraction, multiplication, division, and average). The...
Write a Python program that will perform various calculations (addition, subtraction, multiplication, division, and average). The program will add, subtract, multiply, or divide 2 numbers and provide the average of multiple numbers inputted from the user. You need to define a function named performCalculation which takes 1 parameter. The parameter will be the operation being performed (+,-,*,/). This function will perform the given prompt from the user for 2 numbers then perform the expected operation depending on the parameter that’s...
Write a program for Sense HAT (or the emulator) to map X, Y, and Z acceleration...
Write a program for Sense HAT (or the emulator) to map X, Y, and Z acceleration (or orientation) values into R, G, and B color values on the LED matrix. That way, when you tilt the Sense HAT, the LED matrix will display different colors to simulate a paint mixer. When you write your program, please consider using delay to avoid the problem of changing color too fast to be perceived. Also, you want to make sure that you map...
Using energia software Write a program for your MSP430 board to will perform the following three...
Using energia software Write a program for your MSP430 board to will perform the following three tasks: 1. Input: Take a character string as user input through the serial interface. 2. Processing: Convert the entire string to lower case, and 3. Output: Return the processed string to serial output, which will be displayed on your computer monitor. Example: If the input character string is, “Here I am”, the output should be, “here i am”. For serial input and output purpose,...
Write a program to perform the following two tasks: 1. The program will accept a string...
Write a program to perform the following two tasks: 1. The program will accept a string as input in which all of the words are run together, but the first character of each word is uppercase. Convert the string to a string in which the words are separated by spaces and only the first word starts with an uppercase letter. For example, the string "StopAndSmellTheRose" would be converted to "Stop and smell the rose". Display the result string. 2. Then...
Write a program to perform the following two tasks: 1. The program will accept a string...
Write a program to perform the following two tasks: 1. The program will accept a string as input in which all of the words are run together, but the first character of each word is uppercase. Convert the string to a string in which the words are separated by spaces and only the first word starts with an uppercase letter. For example, the string "StopAndSmellTheRose" would be converted to "Stop and smell the rose". Display the result string. 2. Then...
Write a program fragment (not a complete program) which will perform the following task: The int...
Write a program fragment (not a complete program) which will perform the following task: The int variable m currently contains the number of minutes a basketball player played in their last game. Use an IF statement(s) to print out an appropriate message based on the following: If m is from 35 to 48, print the message "very tired" If m is from 10 to 34, print the message "little tired" If m is from 1 to 9, print the message...
C++ program to perform each of the area calculations in separate functions. Your program will take...
C++ program to perform each of the area calculations in separate functions. Your program will take in the relevant information in the main (), call the correct function that makes the calculation, return the answer to the main () and then print the answer to the screen. The program will declare a variable called “choice” of type int that is initialized to 0. The program will loop while choice is not equal to 4. In the body of the loop...
Write an assembly program In MASM assembler to calculate the sum of odd numbers only stored...
Write an assembly program In MASM assembler to calculate the sum of odd numbers only stored in a 16-bit integers array. The size of the array is provided in a separate variable. Use the following design: Sum = 0 FOR i = 0 TO SizeOfArray - 1     IF Arr[i] % 2 = 1           Sum = Sum + Arr[i]     END IF END FOR
Assessment calculations. Complete the calculations using the following patient information for all calculations: 64 y.o., male,...
Assessment calculations. Complete the calculations using the following patient information for all calculations: 64 y.o., male, 6’3”, 254 lbs. Place your final answer in the blank spaces provided to the left of each question. (10 x 2 points each = 20 points) SHOW DETAILED WORK (in the space on the right)! __________      Determine his IBW assuming a medium frame. __________      Determine his % IBW. __________      If his usual BW is 286 lbs, what is his % UBW? __________     What...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT