Assignment 5

CS/ECE 354-2, Fall 1998

due Monday Nov. 23, before 5pm

Program

No program with this assignment.


Homework (25 points)

  1. (20 points)
    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]
    
    
  2. (5 points)
    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.

    Handing In the Homework

    Follow the guidelines in how to turn in assignments. For this homework, you will need to turn in a single file containing your answers to the homework questions. To make grading easier, please name your file hw5.txt. No printout will be turned in.