CSE306
Processing Systems and Structures
J. W. Lockwood
Exam I Review
EXAM I
Exam Material
All material covered in lectures 1-10 (except history)
Material covered in required reading
Major Topics
Binary numbers and 2's complement
Memory segments, flags, and registers
Opcodes and addressing
The mode byte
Conditional branching and looping
All logical, shifting, and mathematical operations
MACROs
Stack (PUSH/POP)
Procedures & Recursion
Argument passing and Linking to C
Question Types
Solve homework-like problems
"Explain Why..."
"Show How..."
Analyze and debug programs
CodeView dumps
MASM listings
Write MP-like code fragments
Use only valid 80x86 OPCODES
Use valid registers to index memory
Avoid extraneous code
Material NOT on the Exam
History
Allowed
One 8.5" x 11" (two-sided) page of notes
(Whatever you can fit onto the page)
Suggestions
Opcodes (JMPs, Compares, Math, Logic)
Flags (What are they, what do they mean, when are they set?)
Registers
Mode byte interpretation
Stack & Procedures
MACROs
C/ASM linking
LIB306 routines
Anything else you can't readily remember
Pencils & Erasers
Not Allowed
(and not necessary)
Any device that performs calculation or stores data
(calculators, computers, Analytical steam engines)
Textbooks, Class Notes, or other materials
Warnings
Questions from the newsgroup may be altered (numbers changed, meaning inverted, etc.). Read the questions carefully!
Assigned Seating
Suggested Study Methods
Practice solving example problems (old exams, newsgroup, homeworks)
Practice writing new code (MP2 is a good exercise)
Use CodeView to trace through your programs (MP0,MP1,MP2)
Browse my
On-line Lecture Notes
Consult textbook for clarifications and examples
Ask questions
Previous Examinations
Exam1: Fall 1996
Exam1: Fall 1998
Exam1: Spring 2002 (with Solutions)
NOTE: In Spring 2002, CSE306 used NASM, not MASM
With NASM, All memory access uses brackets
Example:
MOV AX, [Variable]
With MASM, Brackets are
implied
when using variables variables
Example:
MOV AX, Variable
Student Review Questions
Common Machine Problem Errors and Techniques
Control Flow:
Execution of variables
No RET in procedures
Loop Boundry conditions - The set (5,4,3,2,1,0) makes
six
iterations
BP uses the
Stack Segment
(SS:BP) in address calculation
In general DS != SS
Comments should describe the problem, not the commands
MOV CX,6 .. LOOP CX ; Loop 6 times
BAD
MOV CX,6 .. LOOP CX ; Sum HW Scores
GOOD
Register Planning: Think ahead about which registeres you will need.
Compactness: Repetitive tasks should be implemented as loops