Functions
field.c File Reference

You will modify this file and implement three functions. More...

#include "field.h"

Functions

int getField (int value, int hi, int lo)
int getFieldSignExtended (int value, int hi, int lo)
int setField (int oldValue, int hi, int lo, int newValue)

Detailed Description

Your implementation of the functions defined in field.h. You may add other function if you find it helpful. Added function should be declared static to indicate they are only used within this file. For example, you will find that getField() and getFieldSignExtended() have many common parts that you way be able to put in common routine(s). However, if you don't see the commonality, or know how to express it, talk to your TA or instructor. As a last resort, you may duplicate code.

Author:
Your name goes here

Function Documentation

int getField ( int  value,
int  hi,
int  lo 
)
Todo:
Implement in field.c based on documentation contained in field.h
int getFieldSignExtended ( int  value,
int  hi,
int  lo 
)
Todo:
Implement in field.c based on documentation contained in field.h
int setField ( int  oldValue,
int  hi,
int  lo,
int  newValue 
)
Todo:
Implement in field.c based on documentation contained in field.h