Sie sind auf Seite 1von 8

Directions for Laboratory Exercise 3

 Your report for this experiment must be submitted as both a Word file and printed
document.
 In the lab session, collect the information required to complete the lab exercise
and record all answers to questions in the lab manual.
 The final report must be in the format of the template provided below. You may
simply edit your experimental information into the document below by cutting
and pasting from the Word document in which you recorded your lab results in
the lab.
 Be sure to include titles and Step numbers for all information.
 Do just Parts 1 and 2 of the lab and the New Supplemental section (see changes
below)
 Use the “Mark” and “Copy” icon on the DEBUG toolbar to cut and paste the
commands and results into a temporary Word document.
1. Open a word document and minimize
2. Depress the “Mark” icon (leftmost icon on the DEBUG toolbar)
3. Highlight the debug statements that you want to save
4. Depress the “Copy” icon (2nd from left)
5. Open the Word document; click in at the appropriate line, and depress the
“Paste” icon.
6. Edit out extra lines, empty lines, and errors
7.
Note:
1. This lab uses the following DEBUG commands from the textbook.
a. Section 4.3 Pages 116-123: Register (R) commands
b. Section 4.4 Pages 123-133: Memory (D, E, F, etc.) commands
c. Section 4.7 Pages 136-142: Unassemble (U) command only
d. Section 4.8 Pages 142-144: Assemble (A) command
e. Section 4.9 Pages 145-147: Trace (T) command
f. Section 4.9 Pages 148-151: Go (G) command
g. Section 4.10 Pages 151-156: Debugging a program
2. You may need to reference the command syntax, register notation, and flag
notation in Figures 4.8, 4.10, and 4.11 in the textbook to assist in writing DEBUG
commands.
3. Be sure to cut and paste frequently. If you don’t, earlier commands and results
will scroll off the screen at the top and be lost. .
4. Files for this lab. You need to copy all of the files for Lab 3 (L3Px.xxx) from the
CD at the back of the lab book to a floppy diskette and bring this diskette to class
for use in performing the lab.

L3p2.map L3p2.asm L3p2.exe L3p2.lst L3p2.obj

1
L3p3.map L3p3.asm L3p3.exe L3p3.lst L3p3.obj

2
Change to the Lab Exercise

1. Mark the following changes into the lab exercise in the book
Part 1
Step 5c Load the value 2BH into the identified memory locations instead of 55H
Step 8 Skip
Step 9 Skip
Part 2
Step 6 Skip
Step 7 Skip
Step 8 Skip
Step 9 Follow the directions given, but use C3H as the data instead of 55H.
Part 3
Skip this section
Supplement: Program Redesign
This is a new part added to the lab exercise. Do this section completely.

3
(Template)
Name: _________________
Student ID: _____________
Date: __________________

Lab 3 (xxxTitlexxx)

Goal of the Laboratory Exercise:

[ Type in a description of what you believe is the “Goal” of this laboratory


exercise
.
.
.
]

Part 1 (xxxTitlexxx)

1. The program in Fig A1.7 was designed to load in memory at address


CS:200 and must be modified to run at address CS:100. All you need
to do is change the JNZ 20EH instruction to JNZ 10EH

[Insert DEBUG sequence]

2.
[Insert DEBUG sequence]

[Answer to questions]

3. Skip this step

4. Skip this step

5.
[Insert DEBUG sequence]

6.

4
[Insert DEBUG sequence]

[Answer to questions]

7.
[Insert DEBUG sequence]

[Answer to questions]

8.
[Insert DEBUG sequence]

9. Note that you must changed the debug commands so that they are in
the range where the program is now loaded i.e. CS:100-1??.
[Insert DEBUG sequence]

10.
[Insert DEBUG sequence]

Conclusion for Part 1:

[Write a paragraph or more to describe the purpose of this part of the


experiment and make a list of what you have learned]

Part 2 (xxxTitlexxx)

3.
[Insert copy of contents of file L3P2.LST here]

[Answer to questions]

4.
[Insert DEBUG sequence]

5.
[Insert DEBUG sequence]

6.
[Insert DEBUG sequence]

5
7.
[Insert DEBUG sequence]

8.
[Insert DEBUG sequence]

9.
[Insert DEBUG sequence]

10.
(a)
[Insert DEBUG sequence]
[Answer to questions]

(b)
[Insert DEBUG sequence]

(c)
[Insert DEBUG sequence]
[Answer to questions]

(d)
[Insert DEBUG sequence]
[Answer to questions]

(e)
[Insert DEBUG sequence]
[Answer to questions]

(f)
[Insert DEBUG sequence]
[Answer to questions]

(g)
[Insert DEBUG sequence]
[Answer to questions]

(h)
[Insert DEBUG sequence]

6
[Answer to questions]

11.
[Insert DEBUG sequence]

Conclusion for Part 2:

[Write a paragraph or more to describe the purpose of this part of the


experiment and make a list of what you have learned]

Interpretation of Results:

1. Make an electronic drawing showing how the arrays of information


are organized in memory. In this diagram, label the source and
destination arrays and the logical addresses at which each array starts
and ends.
- You can start with vertical lines representing the memory address
space similar to that on Page 3 of the lab manual (make them wider
apart and leave out the segment registers),
- Add horizontal lines to mark the beginning and ending boundaries of
the arrays of data
- Add text within the arrays to name them
- Label with addresses on the outside

[Make your drawing here]

Supplement: Program Redesign

1. Insert an unassembled copy of the program used in Part 2 here and


then edit out all of the address and machine code information.

[Original assembly language program]

2. Modify the program as follows:


(a) The size of the source and destination arrays is to be increased
to be 3 times as large.

7
(b) The destination array is to be relocated to a starting address of
2000H:0200H
(c) Program is to copy the information from the source array to
destination array as individual words, not bytes.
(d) Insert a copy of the new program below.
(e) Identify in bold each of the changes you have made in the
program.

[New assembly language program]

3. Conduct an experiment to demonstrate that your program works


correctly.
- Enter different values of data into the source array
than were used in Parts 1 and 2 of the lab.
- Include the DEBUG sequences you used to assembly,
unassembled, initialize registers and/or memory, run
the program, and display results below (only when it
runs correctly).
- Repeat until the program runs correctly.

[Final DEBUG command sequence for experiment]

Conclusion for Program Redesign:

[Write a paragraph or more to describe the purpose of this part of the


experiment and make a list of what you ha