CMP 334-Z81
Computer Organization and Assembly
Language Programming
Lehman College, City University of New York
Spring 2000
Frequently Asked Questions
- Can I use a calculator on the exam? A computer?
Yes, you may use a calculator to do simple calculations.
You may not use a computer for the exam.
- i want the answers for #5--#10, i have done some of them
and i want to check if the answer is correct.
Here's the answers (with some hints on where they came from):
- 5a: counts the number of I's and i's.
The answer
is 7.
- 5b: advances until the first 0dh, then prints string.
The answer is Know what I'm doing...
- 5c: sets BL to the difference between 'a' and 'A',
or 20h, then OR's the first 10 characters from the
string with BL. For example, if you OR 'B' with 20h,
you have 01000010 OR 00100000 which gives 01100010
or 62h which is 'b'. Note that 'b' OR 20h is still
'b'. So, this sets the letters to lower case.
The
answer is: i like to .
- 6: there are numerous errors in this program. To
get full credit, you needed to identify at least
five of them. For example: the data declarations on
lines 17 & 18 should be in the data segment, there is
no beginning for the main procedure, line 10 should
be using indirect addressing,....
- 7: you need to trace through this line by line.
(There's a typo before the label end. The
line should read mul cx.)
The output is: 1, 2, 6,
24.
- 8: This comes directly from the textbook-- from the
section on control structures from high level languages
(that is, how do you implement a while-loop, a do-while
loop, and if-then-else in assembly).
- 9: See the answer on last semester's
page.
- 10: This is a simple modification of the ENCRYPT.ASM
program from the textbook (in the section on XOR and friends).
The program is also available on the CD-ROM that comes with
the book.
- i want the answer for sample exam 2-, the question:#2 and #4
- 2a: AX = 0124h BX = 0
- 2b: AX = 0124h BX = 5678h
- 2c: AX = 0124h BX = 5678h
- 2d: AX = 0124h BX = 1236h
- 2e: AX = 0124h BX = 0124h
- 4a: AX = 0100h BX = 0
- 4b: AX = 0100h BX = 0900h
- 4c: AX = 0100h BX = 0920h
- 4d: AX = 0100h BX = 0108h
- 4e: AX = 3040h BX = 0108h
Information for Rest of Semester
Here's the plan for the rest of the semester:
- There will be a review session for the
final exam during class on Wednesday, 17 May.
- Professor Murphy will give the remaining lectures for
the course. These will be in G305 and will be for students
in both sections.
- Professor St. John will be responsible for office hours,
writing the final, grading the remaining assignments and
final, and assigning the course grade.
Office Hours
Professor St. John has office hours for her Java students from
10-11 Mondays and Wednesdays (except for May 8 and 10 when she's
covering Professor Fitting's course). Her office is G 200B
and phone is (718)-960-7423. It's better to contact her via
e-mail since she gets
those messages faster than phone messages.
She will also have hours
especially for CMP 334 students on Monday and Wednesday afternoons
from 2-4pm. If those times are not good for you, send
her to arrange
another time.
Final Exam
The final exam will be Monday, 22 May in G 305.
It will be on the first seven chapters of the text book, with
less emphasis on hardware aspects and more on assembly language.
Below are links to past and sample exams. More sample exams
can be found at:
The exams come in two file formats. The postscript format has
the same "look and feel" as the exams given in class. They can
be viewed using a postscript viewer, such as ghostview or Adobe
Photoshop. The HTML format can be viewed without special software.
It's a translation of the postscript file and much of the file
formatting has been lost.
- The final exam from Fall 1999:
- Sample Final from Fall 1999:
Try the exams and then come ask questions! The final will
be very similar to the exams above. Note that all of the
programs are directly from the textbook, or are slight
variations. The longer ones were part of assignments and
were familiar to students taking the exam.
Included at the front of the exam is the ASCII Code table
from the back of the book, the tables from the book of the
software interrupts (INT 21h, INT 10h, and INT 16h), and
a summary of the Irvine link library. You may also bring
to the exam a 8 1/2 by 11 sheet of paper with additional
notes.
Assignments
If you would like to complete the current homework assignment
from Professor Murphy, it will be graded and averaged in with
the rest of your homework assignments. If you are satisfied
with your homework grade, you do not need to do the assignment.
However, the final exam will cover material from Chapters 1-7,
not just the homework assignments you have completed.
Course Grade
Your course grade will be based on the first exam, the final
exam, and the homeworks submitted. Any quetions about the
grading should be directed to Professor St. John.