CS301 – Fall 2001

Prof. Hartman

Homework #9

Due Friday, December 7thth by 5:00 pm

 

Assemble the following instructions by hand. You may check your work with the assembler (well, #6 may be tricky), but I expect to see annotated bits in the ModR/M byte and SIB byte if they are needed. (That is, explain in a couple of words why the first two bits are 11, for example).

  1.      popa
  2.      add  eax,ebx
  3.      mov  dword [esp], 12
  4.      dec  byte [edx + 4*esi + 0FACEh]
  5.      inc  bx
  6.      jne  label ;label: is 9 bytes before the end of this instruction
  7.      fmul st3
  8.      rcr  al,cl
  9.      sar  dword [ebx + 2*esi],2
  10.      leave