head	1.1;
access;
symbols;
locks
	yap:1.1; strict;
comment	@# @;


1.1
date	97.10.15.16.57.15;	author yap;	state Exp;
branches;
next	;


desc
@@


1.1
log
@Initial revision
@
text
@<html>
<title>
	Homework 2:
	V22.0201.002, Machine Org I,
	Fall 1997,
	Chee Yap
</title>
<body bgcolor=fafafa>

<center>
        <h3><font color=aa0000>
	Fall 1997, Professor Yap<br>
        V22.0201.002, Machine Organization I
        </font> </h3>
        <h2><font color=aa00ff>
        HOMEWORK 2
	<br>
	<b> Due</b>: Mon October 13, 1997 (not Oct 8).
        </font>
        </h2>
</center>
<hr>

<h3><font color=aa0000>
INTRODUCTION
</font></h3>

The goal is to learn the basics of the Turbo Debugger,
and the debugging process.
For this purpose, we have provided a buggy solution
to homework 1.  This buggy program, called h2.asm, can be picked up
<a href=h2.asm>here</a>.  This assignment is worth 30 points.

<h3><font color=aa0000>
DETAILS
</font></h3>

<ol>
<li> First read up my notes on
	<a href="../info/tasm.htm">TASM</a>
	and
	<a href="../info/debug.htm">debugging with TD</a>.
	In fact, we strongly recommend printing a copy
	of the debugging notes immediately.
	(Since this is a html file, you can print it using
	your browser's print command.)
<li> Recall that the program in hw1 reads 16 characters, echoes the
	string twice, once forward and then reversed.
	H2.asm has bugs in doing the reversal.
	You are to isolate this problem, and provide
	a bug-free solution.
<li> Study and understand what the buggy
	program (h2.asm) is trying to do.
	Despite the bugs, the basic idea in h2.asm
	is sound!  Your correct solution
	must make only necessary changes to h2.asm.
	In particular, DO NOT TRY CHANGE THE BASIC
	LOGIC of h2.asm.
<li> We expect you to debug h2.asm
	with the help of the debugger, not just by
	studying the source code!!  In particular,
	you must set simple ``breakpoints'' during debugging
	and must try to examine memory contents.  This is
	required for your report below.
</ol>

<h3><font color=aa0000>
TO BE HANDED IN
</font></h3>

<ol>
<li> A 3.5'' disk containing
	the original program file (named h2.asm),
	your bug-free program file (named hw2.asm).
	Please assemble and link hw2.asm, and rename
	the executable as ``myecho.exe''.  (Reason: we
	may want to assemble hw2.asm ourselves, and do not
	want to interfere with your executable file)
	[2 pts]
<li> A sheet of printout of your hw2.asm.
	[2 pts]
<li> A sheet containing a paragraph
	describing what the bug is and your solution.
	PLEASE USE ENGLISH PROSE FOR THIS
	(we will read the code in hw2.asm for ourselves).
	NOTE: if your hw2.asm does not work,
	you get at most 5 points for this part.
	[10 pts]
<li> A sheet containing a short report (at most 1 page)
	on how you used TD to help you
	find this bug.  In this report, you must mention
	the use of BREAKPOINTS and how you
	examine the contents of memory.
	(As long as you honestly try to use TD for debugging,
	this report should be easy to write).
	[12 pts]
<li> Hand in everything in an envelop.
	Please write your name, ID
	and class information on the envelop
	and also on the diskette.
	Please DO NOT use any of the NYU envelops.
	[2 pts]
</ol>

</body>
</html>

@
