|
libc8
CHIP-8 utility library
|
#include "instruction.h"#include "../chip8.h"#include "../common.h"#include "../decode.h"#include "../font.h"#include "../graphics.h"#include "exception.h"#include <stdlib.h>#include <string.h>Macros | |
| #define | C8_VERBOSE(c) (c->flags & C8_FLAG_VERBOSE) |
| #define | C8_SCHIP_EXCLUSIVE(c) |
| #define | C8_XOCHIP_EXCLUSIVE(c) |
| #define | C8_QUIRK_VF_RESET(c) |
| #define | C8_QUIRK_MEMORY(c) |
| #define | C8_QUIRK_SHIFTING(c) |
Functions | |
| int | c8_parse_instruction (C8 *c8) |
Execute the instruction at c8->pc | |
| void | print_binary (unsigned int n) |
This file contains the implementation of the instruction parsing and execution for the CHIP-8 interpreter.
| #define C8_QUIRK_MEMORY | ( | c | ) |
| #define C8_QUIRK_SHIFTING | ( | c | ) |
| #define C8_QUIRK_VF_RESET | ( | c | ) |
| #define C8_SCHIP_EXCLUSIVE | ( | c | ) |
| #define C8_VERBOSE | ( | c | ) | (c->flags & C8_FLAG_VERBOSE) |
| #define C8_XOCHIP_EXCLUSIVE | ( | c | ) |
| int c8_parse_instruction | ( | C8 * | c8 | ) |
Execute the instruction at c8->pc
This function parses and executes the instruction at the current program counter.
If verbose flag is set, this will print the instruction to stdout as well.
| c8 | the C8 to execute the instruction from |
| void print_binary | ( | unsigned int | n | ) |