s502 assembler
A very simple assembler for the 6502 line of processors written in C
|
implement State class methods More...
#include "debugmalloc.h"
#include <stdlib.h>
#include <string.h>
#include "state.h"
#include "logging.h"
Go to the source code of this file.
Functions | |
State * | state_new () |
int | state_load_instr (State *s, char *fname) |
void | state_free (State *s) |
void | print_help (char *pname) |
print some help on the useage of the program More... | |
void | print_short_help () |
print the "use --help" text More... | |
int | state_parse_commandline (State *s, int argc, char **argv) |
void print_help | ( | char * | pname | ) |
print some help on the useage of the program
pname | argv[0] (executable name) |
Definition at line 61 of file state.c.
References MAP_MAX_KEY_LEN, and STATE_MAX_STRING_LEN.
Referenced by state_parse_commandline().
void print_short_help | ( | ) |
print the "use --help" text
Definition at line 76 of file state.c.
Referenced by state_parse_commandline().
void state_free | ( | State * | s | ) |
Definition at line 48 of file state.c.
References State::defines, State::instr, Instruction::instruction_free(), State::labels, Map::map_free(), State::tokens, and TokensList::tokenslist_free().
int state_load_instr | ( | State * | s, |
char * | fname | ||
) |
Definition at line 41 of file state.c.
References State::instr, and Instruction::instruction_load().
State* state_new | ( | ) |
Definition at line 16 of file state.c.
References State::defines, ERROR, FAIL, State::infile, State::instr, State::labels, Map::map_new(), State::outfile, State::PC, State::state_free(), and State::tokens.
int state_parse_commandline | ( | State * | s, |
int | argc, | ||
char ** | argv | ||
) |
Definition at line 81 of file state.c.
References State::defines, ERROR, State::infile, logging_level(), MAP_MAX_KEY_LEN, Map::map_set(), MapEntry::name, State::outfile, print_help(), print_short_help(), STATE_MAX_STRING_LEN, and MapEntry::value.