ICE4M
Assembler Assignment
Tracing Low Level Programs
When tracing a low level program, the function of each op code and operand as well as the purpose of the line in the context of the program should be explained through documentation. The overall purpose or end result of the program should be stated s a conclusion at the end of documentation. Each low level program is to be traced line by line.
Example
Task: write a low-level program that will subtract 2316 from FF16 Solution:
MVI A FF SBI 23 HLT
Documentation:
Line 1: MVI moves the immediate value given, here FF, into the accumulator Line 2: SBI subtracts the immediate value, here 23, from the accumulator Line 3: HLT halts the program, indicating the end of the program The value in the accumulator is now DC
Exercises
Write out the following low level programs, trace and document each line of commands. To ensure that your program is working fine, use the 8085 simulator and try your programs out. 1. Load the accumulator with 5510. Add 510 to this number and store it a location 455610 2. Load the contents of two memory locations (123416 and 567816) in to registers C and D (respectively). Add the contents of these registers, and store the answer in address 9ABC16 Please have all your work ready to hand in on Monday June 13, 2005.
083667f4-ad36-4e23-ac8a-e9d91e583d36.doc
Page 1 of 1