Main Page

# Instruction Decoder

Instruction decoding and processing is implemented in the `decode.c` file.

The heart of the instruction decoder is the decode_opcode() function.

The decode_opcode() function examines the given opcode to determine which instruction applies and returns a pointer to a function to handle performing the instruction's operation. If the given opcode does not map to an instruction handler, `NULL` is returned indicating an invalid instruction.

Nearly every instruction in Atmel's Instruction Set Data Sheet will have a handler function defined. Each handler will perform all the operations described in the data sheet for a given instruction. A few instructions have synonyms. For example, `CBR` is a synonym for `ANDI`.

This should all be fairly straight forward.

Automatically generated by Doxygen 1.7.2 on Wed Feb 22 2012.