Canola  0.8.D001
Functions
lib/opcode.cc File Reference
#include <lib/opcode.h>
#include <lib/std_string_printf.h>
#include <lib/unicode.h>

Go to the source code of this file.

Functions

std::string opcode_name (opcode_t n)
std::string opcode_uname (opcode_t n)
std::string opcode_raw_name (opcode_t n)
bool opcode_valid (int c)
bool opcode_red (opcode_t c)
bool opcode_valid_label (int c)

Function Documentation

std::string opcode_name ( opcode_t  n)

The opcode_name function is used to translate an opcode number into a human readable equivalent.

Parameters:
nThe opcode number.

Definition at line 24 of file opcode.cc.

std::string opcode_raw_name ( opcode_t  n)

The opcode_raw_name function is used to translate an opcode number into a human readable equivalent, except in the raw almost-hex form use in the Instruction Manual.

Parameters:
nThe opcode number.

Definition at line 1046 of file opcode.cc.

bool opcode_red ( opcode_t  op)

The opcode_red function may be used to determine whether or not and opcode should be drawn in red.

Definition at line 1323 of file opcode.cc.

std::string opcode_uname ( opcode_t  n)

The opcode_uname function is used to translate an opcode number into a human readable equivalent, possibly using unicode for some of them.

Parameters:
nThe opcode number.

Definition at line 535 of file opcode.cc.

bool opcode_valid ( int  n)

The opcode_valid method may be used to test whether or not a given byte value would be a valid opcode. No assurace of syntactic validity is given.

Parameters:
nThe byte value to check.
Returns:
true if valid, false if not.

Definition at line 1055 of file opcode.cc.

bool opcode_valid_label ( int  n)

The opcode_valid_label method may be used to test whether or not a given byte value would be a valid jump label. See the Instruction Manual, p. 53.

Parameters:
nThe byte value to check.
Returns:
true if acceptable as a label, false if not.

Definition at line 1605 of file opcode.cc.