|
libc8
CHIP-8 utility library
|
#include "encode.h"#include "common.h"#include "private/exception.h"#include "private/symbol.h"#include "private/util.h"#include <ctype.h>#include <stdint.h>#include <stdio.h>#include <stdlib.h>#include <string.h>Macros | |
| #define | VERBOSE_PRINT(a, ...) |
Functions | |
| int | c8_encode (const char *s, uint8_t *out, int args) |
| Parse the given string. | |
| char * | c8_remove_comment (char *s) |
| Remove comment from string if exists. | |
Variables | |
| char ** | c8_lines |
| Source code (will be manipulated when encoding) | |
| char ** | c8_linesUnformatted |
| Source code (will not be manipulated when encoding) | |
| int | c8_lineCount |
| Source code line count. | |
Base assembler code
| #define VERBOSE_PRINT | ( | a, | |
| ... | |||
| ) |
| int c8_encode | ( | const char * | s, |
| uint8_t * | out, | ||
| int | args | ||
| ) |
Parse the given string.
This is the main assembler function.
This function generates bytecode from the given assembly code.
| s | string containing assembly code |
| out | pointer to write bytecode to |
| args | command line arguments |
| char * c8_remove_comment | ( | char * | s | ) |
Remove comment from string if exists.
| s | string to remove comment from |
| int c8_lineCount |
Source code line count.
| char** c8_lines |
Source code (will be manipulated when encoding)
| char** c8_linesUnformatted |
Source code (will not be manipulated when encoding)