Step 0

  • Write the simple C program shown to here.
  • Start to "Debug" by clicking the little green bug in the toolbar
  • Open "Variable" and "Memory Browser" views

Step 1

  • Step the program using the "Step Into" button in the toolbar
  • Continue to step until all variables have been assigned
  • Write down on your lab sheet what memory location was assigned to each variable
  • Open the datasheet from owlspace and go to Table 2-4.
  • Write down what section of memory the variables are stored in using this memory map.

Step 2

  • Right click on a variable
  • Click on "View Memory"

Step 3

  • The variable is now highlighted in the memory viewer
  • By default it is displayed in Hex. Use the top dropdown to change the view to binary if you like.
  • Verify that the hex / binary is correct for the value and data type.
  • Repeat this process for the other variable

Step 4

  • Step the program 3 more times.
  • See that the variables were updated in the variable viewer.
  • Write down on your lab sheet what each variable is now in decimal.

Step 5

  • Switch to the memory viewer.
  • Write down on your lab sheet what each variable is now in hex.
  • Explain what happened. Write down which variables had errors and why
  • When would you want to use an unsigned int?
  • Flag down a Labbie and explain what you found.

Good Job!

I hope you thought that was fun, because you're about to do it all again with floats!!