



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Lab; Class: Des Microproc Syst; Subject: Electrical Engineering And Computer Science; University: University of Michigan - Ann Arbor; Term: Fall 1998;
Typology: Lab Reports
1 / 5
This page cannot be seen from the preview
Don't miss anything!




Note: Prelab questions must be done individually and handed in at the start of your lab section. You must also , with your partner, write an initial version of the required program before you come to your lab section. You must bring a printed listing file (see instructions below) to your lab section to show the TA or you will not be allowed to work in the lab. Your program does not need to be completely debugged, but obviously the more debugging you do on the CAEN simulator the less time you will spend in the lab.
Introduction:
In this lab, you will write an assembly-language program that flashes an LED on the target board.
Goals:
Prelab questions:
.align 2 data: .byte 0x99, 0x88, 0x77, 0x66, 0x55, 0x
lis r3, data@h ori r3, r3, data@l lbz r4, 0(r3) lbz r5, 3(r3) lhz r6, 0(r3) lhz r7, 1(r3) lhz r8, 2(r3) lwz r9, 0(r3) lwz r10, 1(r3)
a. List the values of registers r4 through r10 after executing the fragment. b. Which (if any) of these instructions cause unaligned accesses?
(your code goes here) lwz r5, 0(r6) skipload: (more code)
Program specification:
You are to write a program that flashes an LED on the target board. A null-terminated ASCII text string specifies the timing pattern used to flash the LED. The string consists of decimal numbers separated by spaces. Each number represents the amount of time the LED should be on or off in tenths of a second. For example, the string “10 15 20 30” should cause the LED to go on for one second, off for one and a half seconds, on for two
The SDS simulator can be accessed from the start menu, under “Programs’ Engineering & Science’ SingleStep 7.3”.
Procedure (in the lab):
“5 5 5 5 10 10” “2 8 4 6 8 2 4 6” “10 5 10” and any other strings you might like to try.
Lab report: (due at the beginning of your next lab section)