Difference between revisions of "CSC270 6811 Programming Exercises"
(Created page with " <tanbox> <br /> All exercises should be assembled by hand. <br /> </tanbox> ;Exercise 1 : Write and assemble a 6811 assembly language program that adds the contents of 2 varia...") |
|||
Line 1: | Line 1: | ||
− | |||
<tanbox> | <tanbox> | ||
<br /> | <br /> | ||
Line 6: | Line 5: | ||
</tanbox> | </tanbox> | ||
+ | <br /> | ||
+ | <br /> | ||
+ | <br /> | ||
+ | <br /> | ||
;Exercise 1 | ;Exercise 1 | ||
Revision as of 15:36, 24 March 2011
All exercises should be assembled by hand.
- Exercise 1
- Write and assemble a 6811 assembly language program that adds the contents of 2 variables in memory, a, and b, and stores the result in a third variable sum.
- Exercise 2
- Same as Exercise 1, but use a different method, either selecting a different addressing mode, or different instructions.
- Exercise 3
- Compute the first 6 Fibonacci terms, assuming that you have an array of 6 bytes, all initially containing 0.
- Exercise 4
- Same idea: take your solution for Exercise 3 and modify it. The result should be the same, but you have to change the way the computation is done.
- Exercise 5
- Write an endless loop that stores 1, 2, 3, 4, 5... in a variable in memory called count. How long is your loop, in terms of CPU cycles?
- Exercise 6
- Make your loop faster!
- Exercise 7
- Even faster!
- Exercise 8
- Compute the sum of all the integers between 1 and 22, using no more than 10 instructions.