csci 10 :: book learning challenge 10 (due wed, nov 2)
Submitting your work:

Complete this exercise on your own.

Fill in all of the "Answer" boxes, then print the answer grid that you see after you press "Prepare for printing".

Staple all pages together and submit to the instructor on the date listed above.

Questions:

Read AoA V2 2.2, V2 2.10 and answer the following:

Your name:
  1. What "raw" HLA data type should be used to store a memory address (for 32-bit assembly programming)?
    Answer:
  2. Write the HLA code to declare a variable named address using the appropriate "raw" HLA data type to store a memory address in this variable (for 32-bit assembly programming).
    Answer:
  3. Write the HLA instruction to copy the address of the variable number below into the variable address you declared above.
    number: uns8;
    Answer:
  4. Write the HLA instruction (using direct addressing) to copy the value 99 into the variable number declared above.
    Answer:
  5. Write the HLA instructions (using indirect addressing) to display the value stored in the variable number, using its address (which is stored in the variable address). NOTE: you will need to copy the address value into a register first.
    Answer:
  6. Write the HLA instructions (using indirect addressing) to copy the value 42 into the variable number, using its address (which is stored in the variable address). NOTE: you will need to copy the address value into a register first.
    Answer:
  7. Write the HLA instruction (using direct addressing) to display the value stored in the variable number. What value is displayed?
    Answer:
  8. Write the HLA instructions (using direct addressing) to read an uns8 value from the keyboard and store the value into the variable number.
    Answer:
  9. Write the HLA instructions (using indirect addressing) to display the value stored in the variable number, using its address (which is stored in the variable address). NOTE: you will need to copy the address value into a register first.
    Answer:
  10. Write the HLA instructions to read an uns8 value from the keyboard, store the value in the variable number (via its address -- indirect addressing), and display the value in the variable number (via the variable -- direct addressing).
    Answer:

Total points for this book learning challenge:

150 points