
ECE 267 - Computer Organization and Programming
Sample Final Exam Problem
Fall 2005 Semester
Assume the microprocessor shown below has IA-32 architecture, and that the following
instructions output data to ports A and B:
mov PortA, reg8/imm8 ; (PortA has bits PA7 ... PA0)
mov PortB, reg8/imm8 ; (PortB has bits PB7 ... PB0)
Keeping in mind that these common cathode 7-segment displays are driven in time-
multiplexed fashion, write IA-32 code to continuously display the number "267".
(The cycle time for displaying all three digits should be at most 1/30 sec; call the author's
library procedure "Delay" when a time delay is required.)
IA-32 microprocessor
PB0
PB1
PB2
PA6
PA5
PA4
PA3
PA2
PA1
PA0
a
b
c
d
e
f
g
a
b
c
d
f
e
g
c.c. c.c. c.c.
How would your code change if these were common anode 7-segment displays?