Saturn Assembly Code (CODE)


Functions

bool isCODE (SatAddr src)
 is the object at src a CODE object?
bool CODEdecode (SatAddr src, char *dst, int *nibbles)
 extract the code
SatAddr CODEencode (const char *src, const int nibbles, SatAddr dst)
 construct a CODE object
SatAddr makeCODE (unsigned nibbles)
 Allocate a new CODE object.
int CODEnibbles (SatAddr src)
 Return the number of nibbles in a CODE object.
int CODEbytes (SatAddr src)

Function Documentation

int CODEbytes ( SatAddr  src  ) 

brief Return the number of bytes required to store the data in a CODE object

Parameters:
src The Saturn address of a CODE object
Returns:
the number of bytes, or -1 if src doesn't point to a CODE object

bool CODEdecode ( SatAddr  src,
char *  dst,
int *  nibbles 
)

extract the code

Parameters:
src Saturn address of a CODE object
dst If non-null, then the contents of the code object will be copied here. Dst must point to sufficient space to store the code. See CODEbytes().
nibbles If non-null, then the number of nibbles of CODE data is stored here.
Returns:
true on success. False if src isn't a CODE object
See also:
CODEbytes()

SatAddr CODEencode ( const char *  src,
const int  nibbles,
SatAddr  dst 
)

construct a CODE object

Parameters:
src The data to be stored in the CODE object
nibbles The number of nibbles in src to store.
dst If non-null, then this is the Saturn address where the CODE object should be stored. If null, the a new CODE object is allocated in tempOb.
Returns:
The Saturn address of the new CODE object, or zero if src is NULL or a new CODE object can't be allocated.

int CODEnibbles ( SatAddr  src  ) 

Return the number of nibbles in a CODE object.

Parameters:
src Saturn address of a CODE object.
Returns:
The number of nibbles, or -1 if src doesn't point to a CODE object.

bool isCODE ( SatAddr  src  ) 

is the object at src a CODE object?

Parameters:
src Saturn address of an object
Returns:
true if the object at src is a CODE object

SatAddr makeCODE ( unsigned  nibbles  ) 

Allocate a new CODE object.

Parameters:
nibbles The number of nibbles of code data in the object
Returns:
The address of a new CODE object. The contents are undefined.


Generated on Sat Apr 3 16:38:31 2010 for HPObjects by  doxygen 1.5.0