My Project
Functions
util.c File Reference

You will modify this file and implement the util.h interface. More...

#include <strings.h>
#include <stdlib.h>
#include <ctype.h>
#include "lc3.h"
#include "util.h"

Functions

name_val_tutil_bin_search (name_val_t map[], int numNames, const char *name)
 
int util_get_opcode (const char *name)
 
int 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)
 

Detailed Description

This is a implementation of the interface that you will write for the assignment.

Author
your name here

Function Documentation

name_val_t* util_bin_search ( name_val_t  map[],
int  numNames,
const char *  name 
)
Todo:
implement this function
bool util_get_int ( const char *  token,
int *  value 
)
Todo:
implement this function
int util_get_opcode ( const char *  name)
Todo:
implement this function
int util_get_reg ( const char *  regStr)

This is an example of how to use the binary search routine

int util_is_valid_label ( const char *  s)
Todo:
implement this function
int util_parse_cond ( const char *  condCodeStr)
Todo:
implement this function