|
s502 assembler
A very simple assembler for the 6502 line of processors written in C
|
Compiler pseudo-global state. More...
#include <state.h>
Public Member Functions | |
| State * | state_new () |
| Create a new State object. More... | |
| int | state_load_instr (State *s, char *fname) |
| load instructions from a file More... | |
| void | state_free (State *s) |
| free a State object and all associated memory More... | |
| int | state_parse_commandline (State *s, int argc, char **argv) |
| parse command line arguments and update state More... | |
Data Fields | |
| Map * | defines |
| defined constants More... | |
| Map * | labels |
| label locations More... | |
| TokensList * | tokens |
| tokens More... | |
| Instruction * | instr |
| instruction data More... | |
| int | PC |
| PC (starts at 0) More... | |
| char | infile [STATE_MAX_STRING_LEN] |
| input file name More... | |
| char | outfile [STATE_MAX_STRING_LEN] |
| output file name More... | |
Compiler pseudo-global state.
| void state_free | ( | State * | s | ) |
free a State object and all associated memory
| s | state to free |
Pointer should be NULLed after this!
Definition at line 48 of file state.c.
Referenced by main(), and state_new().
| int state_load_instr | ( | State * | s, |
| char * | fname | ||
| ) |
| State * state_new | ( | ) |
| int state_parse_commandline | ( | State * | s, |
| int | argc, | ||
| char ** | argv | ||
| ) |
| Map* State::defines |
defined constants
Definition at line 34 of file state.h.
Referenced by main(), number_get_raw(), state_free(), state_new(), and state_parse_commandline().
| char State::infile[STATE_MAX_STRING_LEN] |
input file name
Definition at line 44 of file state.h.
Referenced by main(), state_new(), and state_parse_commandline().
| Instruction* State::instr |
instruction data
Definition at line 40 of file state.h.
Referenced by state_free(), state_load_instr(), state_new(), and Token::token_link_instruction().
| Map* State::labels |
label locations
Definition at line 36 of file state.h.
Referenced by main(), number_get_raw(), pass_one(), state_free(), and state_new().
| char State::outfile[STATE_MAX_STRING_LEN] |
output file name
Definition at line 46 of file state.h.
Referenced by state_new(), state_parse_commandline(), and write_data().
| int State::PC |
| TokensList* State::tokens |
tokens
Definition at line 38 of file state.h.
Referenced by concat_bin(), main(), pass_one(), pass_two(), state_free(), and state_new().