Assembly Language
Homework 5, Due 2010/4/26
Problem 1
Loop implementation (Page 190, Problem 2)
Implement the following C++ code in assembly language, using the block-structured .IF and .WHILE directives.
Assume that all variables are 32-bit signed integers:
(See the textbook)
Problem 2
Boolean calculator (2) (Page 191, Problem 8)
Continue the solution program from the preceding exercise by implementing the following procedures:
AND_op: Prompt the user for two hexadecimal integers. AND them together and display the result in hexadecimal.
OR_op: Prompt the user for two hexadecimal integers. OR them together and display the result in hexadecimal.
NOT_op: Prompt the user for a hexadecimal integer. NOT the integer and display the result in hexadecimal.
XOR_op: Prompt the user for two hexadecimal integers. Exclusive-OR them together and display the result in hexadecimal.
ftp your homework to
in the directory \HW5
by the following format:
檔案名稱:hw#_學號.zip
例如:資工同學,作業4
檔案名稱:hw4_a09755xx.zip. (注意:檔案名稱不能有中文)
The password is given in class.