COP 3601: Introduction to Systems Software

advertisement
Instructor Documentation Review:
COP 3601: Introduction to Systems Software
Fall Term, 2010
Submitted by:
Ima B. Student
n12345678
Assignment:
1
Date due:
January 29, 2010
Date submitted: January 30, 2010
Other Instructor Comments:
Note: As per the course web page - documentation for any
assignment is to consist of a SINGLE Word file, named in
accord with the naming convention stipulated on the assignments
web page for the course. Documentation MUST stand on its
own. Any additional files submitted will not be accessed as a
part of documentation review; however, listings of some of these
files should be incorporated into the documentation file as
appendices, commented and highlighted as appropriate. Both
spelling and grammatical form will be under review. Only
complete sentences should appear in the executive summary.
The executive summary should assume that the reader is
technically at the level of a project director who is familiar with
project specs, but has no involvement in the implementation.
Ima B. Student
COP 3601 Documentation: Page 1
Executive Summary: Assignment 1 Programming Exercise
Purpose:
The purpose of this exercise was to
 examine the characteristics of a simple SIC assembly language program and the process of
assembling it (by hand) to produce machine code;
 form an object file from the assembled code, executing it under the SIC simulator (sicsim) as
installed on the UNF Unix system named Osprey;
 examine the result of executing the program and determine if the results were as expected.
Approach:
 A simple SIC program drawn from the course textbook that illustrated I/O under SIC was
employed. The program was modified in accord with the assignment specifications to illustrate
what is required to relocate a program in memory.
 The program was hand assembled. The assembled version of the program was compared to the
version in the course textbook as a validation check. The object code was copied into a file on
the UNF system, with each submodule bracketed by the control lines needed by the bootstrap
loader program provided with the SIC simulator.
 The SIC simulator was executed. Under the simulator the SIC bootstrap loader program was
loaded and executed to load the object program and start its execution. Breakpoints were used to
interrupt machine operation to examine the result of program execution at critical points. The
final breakpoint was set to halt the program at its RSUB statement, the point at which the
program run was finished. After exiting the simulator, the output file was examined to see if the
result was what is expected from knowledge of the program and the input file used.
Constructions Employed:
The SIC program employed was the one on page 47 of the course textbook. The critical modifications
installed to make it usable on the UNF system were as follows:
. . . [etc]
The object file was generated via hand assembly of the source code. The object file was manually
produced on the UNF system and each object module was bracketed by the load control elements
needed by the SIC bootstrap loader program.
Testing Plan, Summary and Discussion:
Plan:
1. Construct a data file according to specification (terminated by a blank line), to be read by the SIC
program
2. Run the SIC program on the SIC simulator, and stop execution at different points to check
memory and registers, including at least the following:
 <…> , the first executable line of the program
Expected: data areas have initial values only
 <…> , dump memory and registers
Expected: the ASCII for "<…>" in the rightmost byte of register A; the data
"<…>" stored in the BUFFER, and length <…> in both register X and
LENGTH.
 <…>, the program RSUB
Expected: the last line of input "<…>" in BUFFER and <…> in LENGTH
Ima B. Student
COP 3601 Documentation: Page 2
3. Terminate simulation, locate and examine the output file to see if it is as expected
4. Adjust program and repeat 2 & 3 until expected results are achieved
Summary and Discussion:
 SIC simulator execution was via the "sicsimrun" procedure to simplify simulator setup
 planned breakpoints:
<…> , first executable line of the program - memory dump verified the program's presence
<…> , found expected values in registers and memory
<…>, the program RSUB - located last line in BUFFER and LENGTH value of <…> as
expected
 an additional breakpoint was set at <…> - at the breakpoint LENGTH was <…> and the
contents of the <…> bytes in BUFFER was "<…>", the ASCII for "<…>" which was what was
expected; register A contained "<…>" because … ;
 the output file DEV05 was located with contents
<…>
This is what was expected because the program in copying input data to output data …
Wrapup Assessment:
Execution of the SIC program generates the output file DEV05. Although the SIC program logic as
given superficially indicates that the program simply copies the input file to the output file, the display
appearances of the input file and the DEV05 files are different. The reason for this is <…>
Test procedures used program break points to examine register/memory contents during program
execution as well as comparison of inputs/outputs. This examination helped confirm the reasons for the
differences between the input and output files.
As per specification, the program was modified by adjusting input file and end-of-line designators to
permit its execution on Osprey. Additional modifications were made to relocate the program to another
area of SIC memory from that of the original assembly. Testing confirmed that these adjustments were
successful, verifying that specifications were met.
Ima B. Student
COP 3601 Documentation: Page 3
Appendices: Table of Contents
1.
2.
3.
4.
Combined SIC program Source and Object listing (with comments added to source)
Input file for DEVF2
Output file DEV05
Annotated sicsim log file listing
Appendix 1: Commented program source/object code
SIC code
0003A0
0003A0
1403D3
4813D9
loc
assembly source
03A0
03A3
FIRST
CLOOP
STL
JSUB
RETADR
RDREC
[load point]
[execution start]
save the return address
call the read procedure
<…>
Appendix 2: Input file for DEVF2
Ima B. Student
COP 3601, assignment 1 data
January 29, 2010
Appendix 3: Output file for DEVF2
<…>
Appendix 4: Annotated sicsim log file listing
SIC SIMULATOR V1.6
File names are:
loader
DEVF1
<…>
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
r
BREAKPOINT REACHED
P=0003A0
COMMAND: S(TART, R(UN, E(NTER, D(UMP, H(COUNT, B(KPT, F(ILES, T(RACE, Q(UIT?
d 2d0-300
03A0
03B0
03C0
03D0
<…>
1403D348
14013C03
D6481401
000000FF
13D90003
A30003CA
0803D34C
FFFFFFFF
D62803D0
0C03D900
0000454F
FFFFFFFF
3003B548
03CD0C03
46000003
FFFFFFFF
program code starts here
RSUB is at 3C7
Download