4.11 Disassembly View
The Disassembly window is only available when debugging. When using any supported high-level language, the source window is automatically displayed, and the Disassembly window is OFF. Enable it by choosing Debug → Windows → Disassembly or Ctrl Alt D during a debugging session.
The Disassembly window shows your program code disassembled. Follow program execution and AVR instructions in this view. By right clicking inside the Disassembly window, you will can set breakpoints, run to the cursor position, or go to the source code. You cannot modify the source code from the Disassembly window.
In addition to assembly instructions, the Disassembly window can show the following optional information:
- Memory address where each instruction is located. For native applications, this is the actual memory address.
- Source code from which the assembly code derives
- Code bytes byte representations of the specific machine
- Symbol names for the memory addresses
- Line numbers corresponding to the source code
Assembly-language instructions consist of mnemonics (abbreviations for instruction names) and symbols representing variables, registers, and constants. Each machine-language instruction is represented by one assembly-language mnemonic, usually followed by one or more variables, registers, or constants.
Because assembly code relies heavily on processor registers or, in the case of managed code, common language runtime registers, you will often find it helpful to use the Disassembly window in conjunction with the Registers window, which allows you to examine register contents.
13: asm volatile ("JMP 0x0001778A"); 0000007D 0c.94.c5.bb JMP 0x0000BBC5 Jump >
Here,
the assembly instruction JMP 0x0001778A
is being assembled by
the GCC Assembler and disassembled using the built-in disassembler in Microchip
Studio, which resolves the jump to 0x0000BBC5
, which is
precisely half of the address in the initial assembly.
Note that the addresses are always of the same dimension as the line addresses shown in the Disassembly window, so the code is functionally similar.