CSC270 Exercises on Assembly Language

From dftwiki3
Revision as of 15:20, 27 March 2012 by Thiebaut (talk | contribs) (Created page with "--~~~~ ---- =Learning Assembly Through Exercises= ==Exercise 1== * Write a program that uses 3 byte variables, ''a'', ''b'', and ''c''. The variable are initialized before the ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

--D. Thiebaut 16:20, 27 March 2012 (EDT)


Learning Assembly Through Exercises

Exercise 1

  • Write a program that uses 3 byte variables, a, b, and c. The variable are initialized before the program starts with the values 2, 5, and 0, respectively.
  • The program will add up the contents of the variable a to that of b and store the result into c. Only c will change.

Exercise 2

  • Assemble the program
  • How many bytes does it contain?
  • How fast will it go from beginning to end, assuming each 6811 cycle is 1 µsecond.