Functions | |
SatAddr | directPtr (SatAddr src) |
Get the direct pointer from a possible indirect pointer. | |
bool | obStorePtr (SatAddr obj) |
Can you store an object as an indirect pointer?obj Saturn address of an object. | |
int | objOrPtrNibbles (SatAddr obj) |
how many nibbles are in an object or pointer? | |
int | copyObjOrPtr (SatAddr src, SatAddr dst) |
Copy an object or indirect pointer. |
You probably won't need to use these. The library already contains functions that will tunnel through indirect pointer. See LISTfirstOb() and LISTnextOb() for example.
Copy an object or indirect pointer.
This decides whether the object can be copied as a pointer and then copies the object or the pointer.
src | Saturn address of an object | |
dst | Saturn address of the destination |
Get the direct pointer from a possible indirect pointer.
Given an address that contains either an object or a pointer to an object, get the address of the object. directPtr() is used in much of the code that processes composite objects like lists and matrixes.
src | Saturn address of an object or a pointer to an object |
int objOrPtrNibbles | ( | SatAddr | obj | ) |
how many nibbles are in an object or pointer?
obj | Saturn address of an object or indirect pointer |
bool obStorePtr | ( | SatAddr | obj | ) |
Can you store an object as an indirect pointer?obj Saturn address of an object.
If you add a ROM object to a composite then there's no need to store the object itself, you can store a pointer to it instead. This function tells you whether you can store the pointer. Its function is currently quite simple. Any object below 0x40000 is in ROM and be stored as a pointer.