# Chapter 16: Analysis

There are different commands to perform data and code analysis and extract information like pointers, string references, basic blocks, extract opcode information, jump information, xrefs, etc..

Those operations are handled by the root 'a'nalyze command:

    Usage: a[ocdg] [depth]
     ao [nops]    analyze N opcodes
     ab [num]     analyze N code blocks
     af [name]    analyze function
     ac [num]     disasm and analyze N code blocks
     ad [num]     analyze N data blocks
     ag [depth]   graph analyzed code
     as [name]    analyze spcc structure (uses dir.spcc)
     at [args]    analyze opcode traces
     av [nops]    analyze virtual machine (negative resets before)
     ax           analyze xrefs

- 16.1 Code analysis
  - 16.1.1 Functions
  - 16.1.2 Basic blocks
  - 16.1.3 Opcodes
- 16.2 Opcode traces
  - 16.2.1 Trace analysis
- 16.3 Opcode emulation
  - 16.3.1 Virtual machine registers
  - 16.3.2 Virtual machine code
  - 16.3.3 Virtual machine execution
  - 16.3.4 Virtual machine MMU
- 16.4 Data analysis
  - 16.4.1 Structures
  - 16.4.2 Spcc
- 16.5 Graphing code
  - 16.5.1 Graphing code with graphviz
  - 16.5.2 User-defined graphs
  - 16.5.3 Graphing code with rsc
- 16.6 Bus sniffers