You will modify this file and implement the util.h interface. More...
Functions | |
name_val_t * | util_bin_search (name_val_t map[], int numNames, const char *name) |
opcode_t | util_get_opcode (const char *name) |
bool | util_is_valid_label (const char *s) |
int | util_get_reg (const char *regStr) |
int | util_parse_cond (const char *condCodeStr) |
bool | util_get_int (const char *token, int *value) |
Variables | |
static name_val_t | lc3_instruction_map [] |
static int | numOps = 0 |
static name_val_t | register_map [] |
static int | numRegisters = sizeof(register_map) / sizeof(register_map[0]) |
This is a implementation of the interface that you will write for the assignment.
name_val_t* util_bin_search | ( | name_val_t | map[], |
int | numNames, | ||
const char * | name | ||
) |
bool util_get_int | ( | const char * | token, |
int * | value | ||
) |
int util_get_reg | ( | const char * | regStr | ) |
This is an example of how to use the binary search routine
bool util_is_valid_label | ( | const char * | s | ) |
int util_parse_cond | ( | const char * | condCodeStr | ) |
|
static |
|
static |
|
static |
This is an example of how to let the compiler figure out how many entries there are.
|
static |
This is an example of how to initialize an array of structs