Assembly Language

Homework 9, Due 2010/5/31

Problem 1

mMult32 Macro (Page 344, Problem 4)

Create a macro named mMult32 that multiplies two unsigned 32-bit memory operands and produces a 32-bit product.

(For example, the macro can be called: mMult32 val1,val2,prod)

 

t9_1.exe

 

 

 

Problem 2

mWriteInt Macro (Page 344, Problem 6)

Create a macro named mWriteInt that writes a signed integer to standard output by calling the WriteInt library procedure. The argument passed to the macro can be a byte, word, or doubleword. Use conditional operators in the macro so it adapts to the size of the argument. Write a program that demonstrates the macro, passing it arguments of different sizes.  As an extra feature, we display an error message during assembly if the operand has an unexpected size.

 

t9_2.exe

 

ftp your homework to

ftp://alasp9@140.127.208.168/

in the directory \HW9

by the following format:

檔案名稱:hw#_學號.zip

例如:資工同學,作業4

    檔案名稱:hw4_a09755xx.zip.  (注意:檔案名稱不能有中文)

The password is given in class.