This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: c A.H.Dixon Laboratory Exercise 8 1 ASSEMBLY LANGUAGE PROGRAMMING II This lab consists of a series of simple programming exercises designed to help you better understand how some of the instructions work. Many students new to programming do not experiment first with the instruction set that is available to them before they start their assignment. Particularly if you have little programming experience, it is important to take these steps first if you wish to make more efficient use of your time when you develop a solution to an assignment. 1. Before you begin, if you have any source code in the template that you wish to keep, be sure to save it before proceeding. One way is to simply cut-and-paste your source code to a text file. You can then use cut-and-paste to restore it again after this lab. Only cut out your own text, leaving behind the comments, org declarations, swi and nop instructions, and the end declaration. Begin by entering the following set of data declaration statements: N dc.b 10 NS dc.b 1,2,3,4 RESULT ds.b 1 LST ds.b 4 2. Without running the simulator, what addresses are assigned to the labels N , NS , RESULT , and LST ? 3. Run the simulator, but do not execute anything. Instead use the Memory window to see what addresses the assembler assigned to this data and compare this result with your answer in (a). Take note of what value is in memory for the ds.b declarations. How many locations in memory were defined by these declarations statements?in memory were defined by these declarations statements?...
View Full Document
- Spring '08