Assignment 2
CISC221, Fall 2001
Queen's University
Due: October 25, 2001 11:00
Where: in drop box 221 Goodwin Hall second floor
No late assignments!
See below notes for instructions.
The purpose of this assignment is to introduce you to the use of the Pep/6 environment and coding of assembly language programs. It is intended to be very simple.
Write a program for the Pep/6 which reads two ascii words (i.e., the words you find in a book, not integer words), of 4 lowercase 8-bit characters each, from the input, and that outputs the two words again in the correct alphabetical order.
Input will be restricted to 4 character words only, so you do not need to handle any longer or shorter words! The alphabetical order is of course indicated by the first character. If the first characters are the same, you compare the second characters. You do not need to go beyond this.
For example:
Test your program with inputs which execute all the instructions.
It is strongly recommended that you write (and even compile and test) your solution in a high-level language, before translating it carefully to assembler.
Use the PEP/6 simulator in the labs to write and test your programs.
Your (hard-copy) submission should include:
(1) The printout of of your assembly language program. You can use the listing file produced by the assembler, to get a nicely formatted file without extra effort. You will get marks for including comments in your program code!!!
(2) One page documentation. Should include a small manual for running the program, rationale for your design choices and a number of test cases with results, with rationale for using those cases.
Make sure your name and student number are on every page. Please number and staple pages together in a way that allows us to read them. For a complete overview of instructions regarding submission, see Assignments