Homework 4

EECE 417

Homework

  1. 1.  (20 points)

  2. Hand assemble the following Pentium code. Have the code start at location 0x0aaa0000. Show the machine code (in hexadecimal) with one instruction per line (as done in the book and also in class). Assume that the symbol x has been assigned address 0x00cc0040.
    neg  x
    sub  EAX, ECX
    mov  EDX, [ESP]
    
  3. 2. (10 points)

  4. Assume the Pentium instruction
    jmp  next_iter
    
    is placed at address 0x08800ca0 by the assembler. The symbol next_iter is already in the symbol table, and has been assigned address 0x088020a0. Give machine code for the jmp instruction.
     
  5. 3. (10 points)
  6. Turn in your Gantt chart for the course project.  Please be sure to insert time for unexpected problems.
    
  7. 4. (60 points)
  8. Write a SASM program that calculates Q = A + B, where A,B, and Q are stored in 32-bit sign and magnitude format.

    Handing In the Homework

    For this homework, you will need to turn in a single zip file containing your answers to the homework questions. To make grading easier, please name your file hw4.gX.zip. No printout will be turned in.