Computer Science 251
Computer Organization and Architecture
Dickinson College
Fall Semester 2003
Grant Braught
Class #8 - Branching Instructions
Main Ideas For Today 
- Branching Assembly Langauge Instructions
- Implementing if Statements
- Implementing for/while Loops
Lecture Slides 
- Class #8 - Branching Instructions
(Slides are only available for download from on-campus locations)
Homework Assigned Today 
Due Date: 9/30/03
- Write an assembly language equivalent for the following HLL code:
...
while (X > 10 && X <= 100) {
X = X * 2;
}
...
- Write an assembly language equivalent for the following HLL code:
...
for (i=1; i<100; i++) {
if (i % 2 == 0) {
x = x - i;
}
else {
x = x + 4 * i;
}
}
...