Question

c = a + b d = a * b – c e = d/c *...

c = a + b

d = a * b – c

e = d/c * (a/c + b)

Write out the assembly code to do the high level operations. You do not need to use addressing modes, you can use letters in the statements

  1. stack
  2. accumulator
  3. (0,2) GPR
  4. (0,3) GPR
  5. (3,3) GPR
0 0
Add a comment Improve this question Transcribed image text
Answer #1

mov ax, a

mov bx,b

add ax,bx

mov c, ax

mov ax,a

mov bx,b

mul ax,bx

mov bx,c

sub ax,bx

mov ax, a

mov bx,c

div ax,bx

mov bx,b

add ax,bx

mov p,ax

mov ax,d

mov bx,c

div ax,bx

mov bx,p

mul ax,bx

Add a comment
Know the answer?
Add Answer to:
c = a + b d = a * b – c e = d/c *...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • This question is from Computer architecture. Please show steps and add comments so its easy to...

    This question is from Computer architecture. Please show steps and add comments so its easy to understand. Translate the high-level language code below into assembly instructions. The variables A, B, C, D, E and F are located in the memory and can be accessed by their label (e.g., LOAD R1, A will load A from the memory into R1). Minimize the number of instructions in the assembly code that you write. F = (A-B)*(C+D)/(E-D) a) Write the code for an...

  • 1. Consider the code sequence: C= A + B D= A-E F= C+ D Assume the...

    1. Consider the code sequence: C= A + B D= A-E F= C+ D Assume the values A, B, C, D, E, and F reside in memory. For each Architecture I. Accumulator Architecture II. Memory- Register Architecture III. Register-Register Architecture write the code assuming the instruction codes (opcode) are 8 bits, memory addresses are 32 bits, and register addresses are 6 bits and CPU has 64 Registers; and create a table which specifies: – The execution sequence – The variables...

  • (c.) What is an assembler language and what are the advantages of using one in comparison...

    (c.) What is an assembler language and what are the advantages of using one in comparison to machine code? (6 marks) (d.)The Little Man model of a computer system uses a single-digit op-code and 2-digit memory addressing and has the following instructions defined where the address portion is shown as Op. Code Description 1xx 2xx Add value in memory to accumulator Subtract value in memo Store accumulator value to memo Load value in memory to accumulator Branch to memory location...

  • Name B. (7 pts) MIPS short answer 1. (3pt) For the following MIPS assembly language program:...

    Name B. (7 pts) MIPS short answer 1. (3pt) For the following MIPS assembly language program: loop: addi Sto, $to,-1 bne $to, $zero, loop Translate the second instruction into MIPS machine language and write it in hex. 2. (2 pt) Which best describes the reason that we maintain the stack pointer in a register? (circle one) i. The hardware forces use of a stack pointer. ii. We need a local pointer because we are often limited to relative addressing. ili....

  • (f) and (g) please f and g please letters Question 2 Indirect addressing mode in assembly language is sanilar to pointers in C. Answer the following questions: (1 point) a) How many 8-bit reg...

    (f) and (g) please f and g please letters Question 2 Indirect addressing mode in assembly language is sanilar to pointers in C. Answer the following questions: (1 point) a) How many 8-bit registers can a FSR access in the PICI8F452 MCU? b) Write the assembly language command to load the address of the variable with name: PVal into one of the FSR? (2 points) (2 points) (2 points) c) What is the meaning of: movf PREINC2, F? d) What...

  • The functional decomposition flowchart shows a. how variables are used from procedures b. how procedures are...

    The functional decomposition flowchart shows a. how variables are used from procedures b. how procedures are called c. the addressing modes used in the code d. all the above 2. The pipeline a. transfers the data from the memory to the CPU b. offers processor-level parallelism C. transfers the data for memory to 1/0 d. offers instruction-level parallelism 2 The three last steps in the instruction execution cycle are a. IF, EX, WB b. EX, OF, WB C. OF, EX,...

  • Help with program /* Lab 7, Part E: Created by Celine Latulipe public class Lab7Parte {...

    Help with program /* Lab 7, Part E: Created by Celine Latulipe public class Lab7Parte { public static void main(String [] args) // TODO: put your code here to generate a random number between 0 and 20 // and then print out that many asterisks on a single line. { بہا } We were unable to transcribe this image/* Lab 7, Part F: Created by Celine Latulipe public class Lab 7PartF { public static void main(String [] args) { //...

  • For (a, b), (c, d) E R2, define if b d This defines a metric on R2. (You need not check this now....

    For (a, b), (c, d) E R2, define if b d This defines a metric on R2. (You need not check this now.) (a) Plot a few points in the plane, and find the distances between them, as mea- sured by de. Choose cases that you think will be illuminating b) Explain why this metric could be called the "lift" metric. (Think about trav- elling between floors in a hotel.) (c) i. Draw the open ball, centre (3, 0), radius...

  • (d) (20 points) Convert the following C code to ARM assembly. And indicate the HEX values of the ...

    (d) (20 points) Convert the following C code to ARM assembly. And indicate the HEX values of the Stack and Data sections in the table below. Note: you do not necessary have to fill in each blank space in the table. Address Value ーC Code int Arr [ ]= {2, 13, 5); int main (void) 0xFFFFFFFC StackOxFFFFFFF8 int Sum; Sum-Ar[0]+A+2*Arr[2] return 0 OxFFFFFFF4 0XFFFFFFFO | 0x0001000C Data Ox00010008 0x00010004 000010000 5 point (d) (20 points) Convert the following C code...

  • 2. You randomly choose a letter from (A, B, C, D, E and a friend randomly...

    2. You randomly choose a letter from (A, B, C, D, E and a friend randomly chooses a letter from fa, b, c, d, e to create a pair of 2 letters with 1 upper case letter followed by 1 lower case letter. (Note: in the English alphabet, the vowels are A, E, I, O, U.) a) Write out the sample space for this experiment. (For example one outcome in the sample space is: Ac; another is Bb.) For parts...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT