
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Class: Computer Organization I; Subject: Electrical and Computer Engr; University: University of Illinois - Chicago; Term: Unknown 2012;
Typology: Assignments
1 / 1
This page cannot be seen from the preview
Don't miss anything!

Web code:
Last name:
First name:
ECE 267 - Computer Organization and Programming
Homework #
(Attach a typed version of your assembly language code for each part to this cover sheet; you need not run the code to see if it actually works but this is recommended in order to get the bugs out.)
Write an IA-32 assembly language macro that simplifies the process of debugging a program by displaying a string, then (optionally) a 32-bit register's contents on the screen in hex, followed by a carriage return and linefeed, followed by waiting for the user to press any key to continue. You are expected to call the author's WriteString, WriteHex, Crlf and ReadChar procedures from within your macro.
Here is how the macro should be invoked:
The first parameter is a string of characters within quotes that is to be displayed, followed by a space character. If the second parameter is present, then the contents of is a 32-bit register name whose contents are then to be displayed in hex code. Any 32- bit register name may be used, including the stack pointer register esp.
Examples
mDebug "Calling Proc1"
mDebug "ebx register contents:",ebx
Be sure to save and then restore the contents of all registers that are used for temporary
storage.