Defines | |
#define | obProlog(src) (sat_peek((src), 5)) |
Get an object's prolog. | |
Functions | |
bool | fixedSize (int prolog) |
Are all objects with this prolog fixed in size. | |
bool | isOb (SatAddr src) |
Is there a recognized HP object at src? | |
int | obNibbles (SatAddr src) |
Return the size in nibbles of object or pointer at src. | |
SatAddr | skipOb (SatAddr src) |
Return the address of the object after src, which can point to an object or an indirect pointer. This is basically the C version of skipOb. | |
bool | obCopy (SatAddr src, SatAddr dst) |
Copy an object or pointer from src to dst, but only if the object at dst is the same size as the one at src. |
#define obProlog | ( | src | ) | (sat_peek((src), 5)) |
Get an object's prolog.
src | Saturn address of an object |
bool fixedSize | ( | int | prolog | ) |
Are all objects with this prolog fixed in size.
prolog | An object prolog |
bool isOb | ( | SatAddr | src | ) |
Is there a recognized HP object at src?
This function is very fast but not 100% accurate. It works by assuming that src contains an object and inspecting the first nibble at the object's prolog address. For real objects, this value is always the same. Note however that it's possible to get a false positive result. That is, isOb() may return true when in fact "src" doesn't contain an object.
If you need to be certain that an object exists at the address, call obSize() and see if the result is greater than zero.
src | A Saturn address |
Copy an object or pointer from src to dst, but only if the object at dst is the same size as the one at src.
src | Saturn address of the source object or pointer | |
dst | Saturn address of the desination |
int obNibbles | ( | SatAddr | src | ) |
Return the size in nibbles of object or pointer at src.
src | Saturn address of an object or indirect pointer |
Return the address of the object after src, which can point to an object or an indirect pointer. This is basically the C version of skipOb.
src | Saturn address of an object, or a pointer to an object |