Skip to main content
Engineering LibreTexts

6.3: Exercises

  • Page ID
    19892
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Below are some quiz questions based on this chapter.

    6.3.1 Quiz Questions

    Below are some quiz questions.

    1) How is the debugger started (from the commandline)?

    2) What option is required during the assemble and link step in order to ensure the program be easily debugged.

    3) What does the run command do specifically?

    4) What does the continue command do specifically?

    5) How is the register window displayed?

    6) There are three columns in the register window. The first shows the register. What do the other two columns show?

    7) Once the debugger is started, how can the user exit?

    8) Describe how a break point is set (multiple ways).

    9) What is the debugger command to read debugger commands from a file?

    10) When the DDD shows a green arrow pointing to an instruction, what does that mean?

    11) Provide the debugger command to display each of the following variables in decimal.

    1. bVar1 (byte sized variable)
    2. wVar1 (word sized variable)
    3. dVar1 (double-word sized variable)
    4. qVar1 (quadword sized variable)
    5. bArr1 (30 element array of bytes)
    6. wArr1 (50 element array of words)
    7. dArr1 (75 element array of double-words)

    12) Provide the debugger command to display each of the following variables in hexadecimal format.

    1. bVar1 (byte sized variable)
    2. wVar1 (word sized variable)
    3. dVar1 (double-word sized variable)
    4. qVar1 (quadword sized variable)
    5. bArr1 (30 element array of bytes)
    6. wArr1 (50 element array of words)
    7. dArr1 (75 element array of double-words)

    13) What is the debugger command to display the value at the current top of the stack?

    14) What is the debugger command to display five (5) values at the current top of the stack?

    Suggested Projects

    Below are some suggested projects based on this chapter.

    1. Type in the example program from Chapter 4, Program Format. Assemble and link the program as described in Chapter 5, Tool Chain. Execute the debugger as noted in this chapter. Set a breakpoint at the label last and execute the program (to that breakpoint). Interactively verify that the calculations performed resulted in the correct values. This will require typing the appropriate debugger examine memory commands (based on the variable size).
    2. After completing the previous problem, create a debugger input file that will set the send the output to a text file, set a breakpoint, execute the program, and display the results for each variable (based on the appropriate variable size). Execute the debugger and read the source file. Review the input file worked correctly and that the program calculations are correct based on the results shown in the output file.
    3. Create an assemble and link script file, as described in Chapter 5, Tool Chain. Use the script to assemble and link the program. Ensure that the script correctly assembles and links.

    This page titled 6.3: Exercises is shared under a CC BY-NC-SA license and was authored, remixed, and/or curated by Ed Jorgensen.

    • Was this article helpful?