CPTR-215 Assembly Language Programming HW#8 Due Monday
Begin reading chapter 6 if you have not already done so.
Write a short assembly program per the description below. Create an assembly
program and successfully assemble it. Start the debugger and step through
the program to confirm its operation. As you step through the program
observe the register contents as instructions are executed.
Create a small program that initializes R4 to 1 and R5 to 0x100 and
then enters a loop that will execute 5 times (i.e. instructions in
the loop will be executed 5 times). Each time through the loop increment
R4 by 1 and R5 by 4. Before writing the assembly language statements
design and document the program with either an NS diagram or flow chart.
Use this program shell as a starting point.
See HW#6 for details of using the Keil software.
Motivation for writing a loop like this:
if a store instruction
were added to the loop, prior to incrementing R4 & R5, the loop
could be used to initialize a sequence of data words in memory
with sequential numbers beginning at 1 and at memory address 100 hex
with R4 being the increasing value stored in memory and R5 acting
as a pointer, i.e. using its contents as the address in memory where
the contents of R4 is stored. Again, in this assignment you do
not need to store R4 to memory.
Turn in: a copy of your design notes and a hardcopy of your source
file (.s file). On it report if it worked or not and if or not you
were able to use the debugger to monitor program operation. Comments
about your experience, trials, tribulations, unexpected successes, etc.
are welcome but not required.
Larry Aamodt PhD, PE
Professor of Engineering and Computer Science
Walla Walla College
Contact:
via email: AamoLa (at) wallawalla.edu
via phone: x2058