CS301 – Fall 2002

Prof. Hartman

Homework #9

Due Friday, December 6thth by 5:00 pm

 

Assemble the following short (and non-sensical) routine 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.               pusha
  2.               add  edx, ebx
  3.               mov  dword [0DEADBEEFh], 12
  4.               dec  byte [edx + 4*esi + 0FACEh]
  5.               cmp  word [esi],1Bh
  6.               ja   label
  7.                fmul st3
  8.      label:    rcr  dl,cl
  9.               sar  dword [ebx + esi],2
  10.           leave