libc8
CHIP-8 utility library
|
#include "encode.h"
#include "private/symbol.h"
#include "defs.h"
#include "private/exception.h"
#include "private/util.h"
#include <ctype.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Macros | |
#define | VERBOSE_PRINT(s) if (args & ARG_VERBOSE) { printf("%s\n", s); } |
Functions | |
int | c8_encode (const char *s, uint8_t *out, int args) |
Parse the given string. More... | |
char * | remove_comment (char *s) |
Remove comment from string if exists. More... | |
Base assembler code
#define VERBOSE_PRINT | ( | s | ) | if (args & ARG_VERBOSE) { printf("%s\n", s); } |
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 * remove_comment | ( | char * | s | ) |
Remove comment from string if exists.
s | string to remove comment from |