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
Using the software Emulator EMU8086, write an assembly program that uses a loop to print "HELLO...
Using the software Emulator EMU8086, write an assembly program that uses a loop to print "HELLO WORLD" 3 times and "LIFE" 2 times. Example: HELLO WORLD HELLO WORLD HELLO WORLD LIFE LIFE   
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...
On a raspberry pi, write an assembler program that will calculate the factorial of an integer...
On a raspberry pi, write an assembler program that will calculate the factorial of an integer value inputted by the user. the program should detect if an overflow occurs. If no overflow occurred, then it should print out the value of the factorial. Otherwise print out a message indicating that an overflow occurred.
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,...
C++ ^ ^ Write a menu driven program to perform following operations using a map container...
C++ ^ ^ Write a menu driven program to perform following operations using a map container that stores the information about USA Population (In Million). @@@Menu@@@ 1. Add Information 2. Display Information 3. Update Information 4. Erase Information 5. Clear Information For example, Suppose the map initially contains following information (Use emplace() function to store the information) 2010, 309.33 2011, 311.58 2012, 313.87 2015, 320.74 2016, 323.07 The program should produce the desired output when a valid input is provided,...
Write a program in a language of your choice to perform a search using the A*...
Write a program in a language of your choice to perform a search using the A* algorithm for the eight puzzle problem, in which numbers may be shifted one space at a time to transform the initial state into the goal state (see p. 103 – 3rd Ed., pp. 105-106 – 2nd Ed. of the text). 2. a) Use the start state-goal state combination given in pp. 103, Figure 3.28 (3rd Ed.), [pp. 105, Figure 4.7 (2rd Ed.)], as (start_1,...
C++ 14.11 Lab # Map Write a menu driven program to perform following operations using a...
C++ 14.11 Lab # Map Write a menu driven program to perform following operations using a map container that stores the information about USA Population (In Million). @@@Menu@@@ 1. Add Information 2. Display Information 3. Update Information 4. Erase Information 5. Clear Information For example, Suppose the map initially contains following information (Use emplace() function to store the information) 2010, 309.33 2011, 311.58 2012, 313.87 2015, 320.74 2016, 323.07 The program should produce the desired output when a valid input...
Write a code in arm 8086 keil software version 5 for signed input and perform addition...
Write a code in arm 8086 keil software version 5 for signed input and perform addition and subtraction using both direct and indirect addressing mode.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT