Unformatted text preview: Print and turn in your four assembly language source programs, each with the corresponding “debug” screen captured from CodeWarrior , showing the final results of each program. In the debug screen, highlight the two data arrays in the Memory window so we can see that the first array was correctly copied to the second. Suggestions: • Review how “constant” bytes are defined in memory using the “dc.b” directive. • Create a “loop counter”, either in a register or a memory variable. Before entering the loop, this counter should be initialized to N, where N is the number of loops to be executed. At the end of the loop, the count should be decremented, with the program branching back to the start of the loop if the count is non-zero, and exiting the loop if the count is zero. After decrementing the count, test the result by executing a conditional branch instruction, either “beq” (branch if zero flag = 1) or “bne” (branch if zero flag <> 1)....
View Full Document
- Summer '08
- Control flow, Machine code, CodeWarrior, indexed addressing