#include <stdarg.h>
Go to the source code of this file.
Data Structures | |
struct | DirItem |
A C structure for creating directories. More... | |
#define | ACPTRnibbles(src) (15) |
Return the number of nibbles in a ACPTR object. | |
bool | isACPTR (SatAddr src) |
is the object at src an ACPTR object? | |
bool | ACPTRdecode (SatAddr src, SatAddr *obj, SatAddr *program) |
extract an ACPTR's object and program numbers. | |
SatAddr | ACPTRencode (SatAddr obj, SatAddr program, SatAddr dst) |
Encode an ACPTR object with the given object and program numbers. | |
SatAddr | makeACPTR () |
Create an empty ACPTR. Contents are undefined. | |
Defines | |
#define | bool int |
#define | false 0 |
#define | true 1 |
#define | SAT_DOXLIB 0x02e92 |
#define | SAT_DOMINIFONT 0x026FE |
#define | SAT_DOFONT SAT_DOEXT2 |
#define | SAT_PRLG 0x28FC |
#define | BINTnibbles(src) (10) |
The size of a BINT in nibbles. | |
#define | CHARnibbles(src) (7) |
The size of a CHAR in nibbles. | |
#define | REALnibbles(src) (21) |
The size of a REAL in nibbles. | |
#define | ERELnibbles(src) (26) |
The size of a EREL in nibbles. | |
#define | CMPnibbles(src) (37) |
The size of a CMP in nibbles. | |
#define | FLASHPnibbles(src) (12) |
The size of a FLASHP in nibbles. | |
#define | MINIFONTnibbles(src) (1548) |
The size of a MINIFONT in nibbles. | |
#define | XLIBnibbles(src) (5+3+3) |
Return the number of nibbles in an XLIB. | |
#define | SAT_DOLIBDATA SAT_DOEXT0 |
LIBDATA uses the EXT0 prolog. | |
#define | UNITumMULT 0x2D74F |
The um* ROM marker. | |
#define | UNITumDIV 0x2D759 |
The um/ ROM marker. | |
#define | UNITumPOW 0x2D763 |
The um^ ROM marker. | |
#define | UNITumP 0x2D76D |
The umP ROM marker. | |
#define | UNITumEND 0x2D777 |
The umEND ROM marker. | |
#define | SAT_DOUNIT SAT_DOEXT |
Alias for the prolog used for UNIT objects. | |
#define | STACKpush(src) sat_pushptr(src) |
push an address on the stack | |
#define | obProlog(src) (sat_peek((src), 5)) |
Get an object's prolog. | |
Typedefs | |
typedef unsigned int | SatAddr |
A Saturn address. | |
Functions | |
bool | isBINT (SatAddr src) |
is object a BINT? | |
bool | BINTdecode (SatAddr src, int *dst) |
Convert BINT to C integer. | |
SatAddr | BINTencode (int src, SatAddr dst) |
Convert a C integer to a BINT. | |
SatAddr | makeBINT () |
Create a new BINT in tempOb. It's value is undefined. | |
bool | isCHAR (SatAddr src) |
is object a CHAR? | |
bool | CHARdecode (SatAddr src, char *dst) |
Convert CHAR to C character. | |
SatAddr | CHARencode (unsigned char ch, SatAddr dst) |
Convert a C char to an CHAR object. | |
SatAddr | makeCHAR () |
Create a new CHAR in tempOb. It's value is undefined. | |
bool | isREAL (SatAddr src) |
is object a real "approximate mode" number (REAL)? | |
bool | REALdecode (SatAddr src, double *dst) |
Convert REAL to C double. | |
SatAddr | REALencode (double d, SatAddr dst) |
Convert a C double to an HP REAL. | |
SatAddr | makeREAL () |
Create a new REAL in tempOb. It's value is undefined. | |
bool | isEREL (SatAddr src) |
is object an extended real? | |
bool | ERELdecode (SatAddr src, double *dst) |
Convert EREL to C double. | |
SatAddr | ERELencode (double d, SatAddr dst) |
Convert a C double to an HP EREL. | |
SatAddr | makeEREL () |
Create a new EREL in tempOb. It's value is undefined. | |
double | ereal2double (SatAddr src) |
bool | isCMP (SatAddr src) |
is object a Complex number (CMP)? | |
bool | CMPdecode (SatAddr src, double *re, double *im) |
Decode CMP into it's real and imaginary components. | |
SatAddr | CMPencode (double re, double im, SatAddr dst) |
Convert two C doubles into an HP CMP object. | |
SatAddr | makeCMP () |
Create a new CMP in tempOb. It's value is undefined. | |
bool | isZINT (SatAddr src) |
is object an infinite precision integer (ZINT)? | |
bool | ZINTdecodell (SatAddr src, long long *dst) |
Convert a ZINT to C long long. | |
SatAddr | ZINTencodell (long long src, SatAddr dst) |
Convert a C long long to an HP ZINT. | |
char * | ZINTdecodeStr (SatAddr src, char *str) |
Convert a ZINT to a NULL-terminated C string of ASCII digits. | |
SatAddr | ZINTencodeStr (const char *src, SatAddr dst) |
Convert a NULL-terminated C string if ASCII digits to an HP ZINT. | |
SatAddr | makeZINT (int digits) |
Make a ZINT in TEMPOB with room for "digits" digits. | |
int | ZINTnibbles (SatAddr src) |
The size of a ZINT in nibbles. | |
int | ZINTdigits (SatAddr src) |
Get the number of digits in a ZINT. | |
int | ZINTbytes (SatAddr src) |
Return the number of bytes needed to store a ZINT as a string. | |
bool | isFLASHP (SatAddr src) |
is object a FLASHP? | |
bool | FLASHPdecode (SatAddr src, int *a, int *b) |
Decode FLASHP into it's components. | |
SatAddr | FLASHPencode (int a, int b, SatAddr dst) |
Convert two C integers into an HP FLASHP object. | |
SatAddr | makeFLASHP () |
Create a new FLASHP in tempOb. It's value is undefined. | |
bool | isMINIFONT (SatAddr src) |
is object a Mini font (MINIFONT)? | |
SatAddr | MINIFONTitem (SatAddr src, int ch) |
Return the Saturn address of a character's MINIFONT entry. | |
int | MINIFONTgetId (SatAddr src) |
Get the minifont ID number. | |
bool | MINIFONTsetId (SatAddr src, int id) |
Set the MINIFONT id. | |
SatAddr | makeMINIFONT () |
create a new MINIFONT object in TEMPOB. The contents of the minifont are undefined | |
bool | isFONT (SatAddr src) |
is object a FONT? | |
int | FONTnibbles (SatAddr src) |
The size of a FONT in nibbles. | |
SatAddr | FONTitem (SatAddr src, int idx) |
Return the Saturn address of a character's FONT entry. | |
int | FONTgetId (SatAddr src) |
Get the font ID. | |
bool | FONTsetId (SatAddr src, int id) |
Set the FONT id. | |
int | FONTgetNameLen (SatAddr src) |
Get the number of characters in the font's name. | |
bool | FONTsetName (SatAddr src, const char *name) |
Change the name of a FONT. Note that new name must be the same length as existing name. | |
bool | FONTdecode (SatAddr src, int *id, char *name, int *height, char *graphics) |
Decode a FONT into it's parts. | |
SatAddr | FONTencode (int id, const char *name, int height, const char *graphics, SatAddr dst) |
Create a new FONT. | |
SatAddr | makeFONT (int nameLen) |
Make a blank font with room for "nameLen" characters in the name. | |
bool | isSTRING (SatAddr src) |
is the object at src a STRING? | |
char * | STRINGdecode (SatAddr src, char *dst) |
decode a STRING to a null-terminated C string. | |
SatAddr | STRINGencode (const char *src, SatAddr dst) |
convert a null-terminated C string into an HP STRING object | |
bool | STRINGadd (const char *src, SatAddr dst) |
SatAddr | makeSTRING (unsigned size) |
Allocate a STRING with numChars characters The initial contents of the string are undefined. | |
int | STRINGnibbles (SatAddr src) |
Return the size in nibbles of the STRING object at src. | |
int | STRINGnumChars (SatAddr src) |
return the number of characters in a STRING | |
bool | isLIST (SatAddr src) |
is the object at src a LIST? | |
SatAddr | makeLIST (unsigned nibbles) |
Allocate space for a list with nibbles data. | |
int | LISTnibbles (SatAddr list) |
Return the size in nibbles of the LIST at src. | |
int | LISTsize (SatAddr src) |
Returns the number of elements in a LIST. | |
bool | LISTadd (SatAddr dst, SatAddr obj) |
Make a copy of obj and append it to the list at dst. | |
SatAddr | LISTcat (SatAddr src, SatAddr obj) |
Concatenate an existing list and an object to create a new list. | |
SatAddr | LISTmerge (SatAddr list1, SatAddr list2) |
Merge two lists to create a third. Equivalent to RPL "+" operator aplied to two lists. | |
SatAddr | LISTencode (SatAddr dst,...) |
create a list containing the specified objects | |
SatAddr | LISTencodeN (int n, SatAddr obs[], SatAddr dst) |
create a list from an array of Saturn Addresses. This is like the RPL ->LIST command | |
SatAddr | LISTfirstOb (SatAddr list, SatAddr *iter) |
Get the first object in a list and update the list iterator. | |
SatAddr | LISTnextOb (SatAddr *iter) |
return the next object in a list and update the list iterator. | |
SatAddr | LISTfirstEntry (SatAddr list) |
Get the first entry in a list. | |
SatAddr | LISTnextEntry (SatAddr entry) |
return the next entry in a list or zero if the end has been reached | |
bool | isIDNT (SatAddr src) |
is the object at src an IDNT? | |
char * | IDNTdecode (SatAddr src, char *dst) |
Convert an IDNT to a null-terminated string. | |
SatAddr | IDNTencode (const char *src, SatAddr dst) |
Convert a null-terminated C string into an IDNT object. | |
SatAddr | makeIDNT (unsigned size) |
Allocate space for an IDNT with size characters. | |
int | IDNTnibbles (SatAddr src) |
Return the size in nibbles of the IDNT at src. | |
int | IDNTnumChars (SatAddr src) |
return the number of characters in an IDNT | |
bool | isLAM (SatAddr src) |
char * | LAMdecode (SatAddr src, char *dst) |
Convert a LAM to a null-terminated string. | |
SatAddr | LAMencode (const char *src, SatAddr dst) |
Convert a null-terminated C string into a LAM object. | |
SatAddr | makeLAM (unsigned size) |
Allocate space for a LAM with size characters. | |
int | LAMnibbles (SatAddr src) |
Return the size in nibbles of the LAM at src. | |
int | LAMnumChars (SatAddr src) |
return the number of characters in a LAM | |
bool | isHXS (SatAddr src) |
is the object at src a HXS | |
bool | HXSdecodell (SatAddr src, unsigned long long *dst) |
decode a HXS into an unsigned long long. | |
SatAddr | HXSencodell (unsigned long long i, SatAddr dst) |
Convert an unsigned long long to a HXS object. | |
bool | HXSdecode (SatAddr src, char *buf, int *nibbles) |
Extract the data and/or size of an HXS. | |
SatAddr | HXSencode (char *buf, int nibbles, SatAddr dst) |
Create an HXS object from a data buffer. | |
int | HXSnibbles (SatAddr src) |
Return the size in nibbles of the HXS object at src. | |
int | HXSbytes (SatAddr src) |
Return the number of bytes required to store the data in an HXS. | |
SatAddr | makeHXS (int nibbles) |
Create an HXS. | |
bool | isGROB (SatAddr src) |
is the object at src a GROB | |
int | GROBnibbles (SatAddr src) |
Return the size in nibbles of the GROB object at src. | |
bool | GROBdecode (SatAddr src, int *rows, int *columns, char *pixels) |
Extract the information about a GROB. | |
SatAddr | GROBencode (int rows, int columns, char *pixels, SatAddr dst) |
Create a GROB from the parts. | |
int | GROBbytes (SatAddr src) |
SatAddr | makeGROB (int rows, int columns) |
Create a blank GROB in TEMPOB. | |
bool | GROBsetPixel (SatAddr src, int row, int column, bool val) |
Set or clear a pixel in a GROB. | |
bool | isXLIB (SatAddr src) |
is the object at src an XLIB? | |
bool | XLIBdecode (SatAddr src, int *lib, int *cmd) |
extract an XLIB's library and command numbers. | |
SatAddr | XLIBencode (int lib, int cmd, SatAddr dst) |
Encode an XLIB object with the given library and command numbers. | |
SatAddr | makeXLIB () |
Create an empty XLIB in tempOb. Contents are undefined. | |
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) |
bool | isLIBDATA (SatAddr src) |
is the object at src a LIBDATA object? | |
int | LIBDATAnibbles (SatAddr src) |
Return the number of nibbles in a LIBDATA object. | |
int | LIBDATAbytes (SatAddr src) |
bool | LIBDATAdecode (SatAddr src, char *data, int *nibbles) |
extract the code Extract a LIBDATA's data and its size. | |
SatAddr | LIBDATAencode (const char *data, int nibbles, SatAddr dst) |
Construct a LIBDATA object. | |
SatAddr | makeLIBDATA (unsigned nibbles) |
Allocate a new LIBDATA object. | |
bool | isARRAY (SatAddr src) |
is the object at src an ARRAY object? | |
int | ARRAYnibbles (SatAddr src) |
Return the number of nibbles in a ARRAY object. | |
SatAddr | makeARRAY (SatAddr element, int numDimensions, int dim1,...) |
Create an N-dimensional array. | |
SatAddr | ARRAYgetItem (SatAddr array, SatAddr dst, int idx1,...) |
Get a copy of an item in an array. | |
int | ARRAYputItem (SatAddr array, SatAddr item, int idx1,...) |
Put an item into an array. | |
SatAddr | ARRAYfirstItem (SatAddr array, SatAddr dst, SatAddr *iter) |
Get the first item in an array. | |
SatAddr | ARRAYnextItem (SatAddr array, SatAddr dst, SatAddr *iter) |
Return the next item in an array. | |
int | ARRAYnumDimensions (SatAddr array) |
Return the number of dimensions in an array. | |
int | ARRAYgetDimension (SatAddr array, int dimensionNumber) |
Get the size of the i'th dimension. | |
int | ARRAYgetElProlog (SatAddr array) |
get the prolog value of the items stored in the array. | |
int | ARRAYgetElementBody (SatAddr array, SatAddr *elementBody, int idx1,...) |
Get the Saturn address of an element body in an array. | |
int | ARRAYelementSize (SatAddr array, SatAddr element) |
Get the size of an element body in an array. | |
SatAddr | ARRAYfirstElement (SatAddr array) |
Get the first element body in an array. | |
SatAddr | ARRAYnextElement (SatAddr array, SatAddr prev) |
Return the next element body in an array. | |
bool | isLNKARRY (SatAddr src) |
Same as isARRAY() but works on a LNKARRY object. | |
int | LNKARRYnibbles (SatAddr src) |
Same as ARRAYnibbles() but works on a LNKARRY object. | |
SatAddr | makeLNKARRY (SatAddr element, int numDimensions, int dim1,...) |
Same as makeARRAY() but works on a LNKARRY object. | |
SatAddr | LNKARRYgetItem (SatAddr lnkarry, SatAddr dst, int idx1,...) |
Same as ARRAYgetItem() but works on a LNKARRY object. | |
int | LNKARRYputItem (SatAddr lnkarry, SatAddr item, int idx1,...) |
Same as ARRAYputItem() but works on a LNKARRY object. | |
SatAddr | LNKARRYfirstItem (SatAddr lnkarry, SatAddr dst, SatAddr *iter) |
Same as ARRAYfirstItem() but works on a LNKARRY object. | |
SatAddr | LNKARRYnextItem (SatAddr lnkarry, SatAddr dst, SatAddr *iter) |
Same as ARRAYnextItem() but works on a LNKARRY object. | |
int | LNKARRYnumDimensions (SatAddr lnkarry) |
Same as ARRAYnumDimensions() but works on a LNKARRY object. | |
int | LNKARRYgetDimension (SatAddr lnkarry, int dimensionNumber) |
Same as ARRAYgetDimension() but works on a LNKARRY object. | |
int | LNKARRYgetElProlog (SatAddr lnkarry) |
Same as ARRAYgetElProlog() but works on a LNKARRY object. | |
int | LNKARRYelementSize (SatAddr lnkarry, SatAddr item) |
Same as ARRAYelementSize() but works on a LNKARRY object. | |
int | LNKARRYgetElementBody (SatAddr lnkarry, SatAddr *elementBody, int idx1,...) |
Same as ARRAYgetElementBody() but works on a LNKARRY object. | |
SatAddr | LNKARRYfirstElement (SatAddr lnkarry) |
Same as ARRAYfirstElement() but works on a LNKARRY object. | |
SatAddr | LNKARRYnextElement (SatAddr lnkarry, SatAddr item) |
Same as ARRAYnextElement() but works on a LNKARRY object. | |
bool | isCOL (SatAddr src) |
is the object at src a COL? | |
bool | COLdecode (SatAddr src, char *dst, int *nibbles) |
Extract the code from a COL. | |
SatAddr | COLencode (const char *src, const int nibbles, SatAddr dst) |
construct a CODE object | |
SatAddr | COLencodeV (SatAddr dst,...) |
create a COL containing the specified objects | |
SatAddr | COLencodeN (int n, SatAddr obs[], SatAddr dst) |
create a COL containing the objects specified in an array | |
SatAddr | makeCOL (unsigned nibbles) |
Allocate space for a COL with nibbles data. | |
int | COLnibbles (SatAddr src) |
Return the size in nibbles of the COL at src. | |
int | COLbytes (SatAddr src) |
SatAddr | COLfirstOb (SatAddr col, SatAddr *iter) |
Get the first object in a COL. | |
SatAddr | COLnextOb (SatAddr *iter) |
Get the next object in a COL. | |
SatAddr | COLfirstEntry (SatAddr col) |
Get the first entry in a COL. | |
SatAddr | COLnextEntry (SatAddr entry) |
Get the next entry in a COL. | |
bool | isSYMB (SatAddr src) |
Same as isCOL() but works on a SYMB object. | |
bool | SYMBdecode (SatAddr src, char *dst, int *nibbles) |
Same as COLdecode() but works on a SYMB object. | |
SatAddr | SYMBencode (const char *src, const int nibbles, SatAddr dst) |
Same as COLencode() but works on a SYMB object. | |
SatAddr | makeSYMB (unsigned nibbles) |
Same as makeCOL() but works on a SYMB object. | |
int | SYMBnibbles (SatAddr src) |
Same as COLnibbles() but works on a SYMB object. | |
int | SYMBbytes (SatAddr src) |
Same as COLbytes() but works on a SYMB object. | |
SatAddr | SYMBfirstOb (SatAddr src, SatAddr *iter) |
Same as LISTfirstOb() but works on a SYMB object. | |
SatAddr | SYMBnextOb (SatAddr *iter) |
Same as LISTnextOb() but works on a SYMB object. | |
SatAddr | SYMBfirstEntry (SatAddr src) |
Same as LISTfirstEntry() but works on a SYMB object. | |
SatAddr | SYMBnextEntry (SatAddr entry) |
Same as LISTnextEntry() but works on a SYMB object. | |
SatAddr | SYMBencodeV (SatAddr dst,...) |
Same as COLencodeV() but works on a SYMB object. | |
SatAddr | SYMBencodeN (int n, SatAddr obs[], SatAddr dst) |
Same as COLencodeN() but works on a SYMB object. | |
bool | isTAG (SatAddr src) |
is the object at src a TAG? | |
SatAddr | TAGencode (const char *tag, SatAddr obj, SatAddr dst) |
Make a tagged object. | |
int | TAGnumChars (SatAddr src) |
Return the number of tag characters in a TAG object. | |
bool | TAGdecode (SatAddr src, char *tag, SatAddr *obj) |
Decode a TAG object. | |
SatAddr | makeTAG (int nibbles) |
Create an empty tag object with "nibbles" space. | |
int | TAGnibbles (SatAddr src) |
Return the size in nibbles of the TAG at src. | |
bool | isUNIT (SatAddr src) |
Same as isCOL() but works on a UNIT object. | |
bool | UNITdecode (SatAddr src, char *dst, int *nibbles) |
Same as COLdecode() but works on a UNIT object. | |
SatAddr | UNITencode (const char *src, const int nibbles, SatAddr dst) |
Same as COLencode() but works on a UNIT object. | |
SatAddr | makeUNIT (unsigned nibbles) |
Same as makeCOL() but works on a UNIT object. | |
int | UNITnibbles (SatAddr src) |
Same as COLnibbles() but works on a UNIT object. | |
int | UNITbytes (SatAddr src) |
Same as COLbytes() but works on a UNIT object. | |
SatAddr | UNITfirstOb (SatAddr src, SatAddr *iter) |
Same as LISTfirstOb() but works on a UNIT object. | |
SatAddr | UNITnextOb (SatAddr *iter) |
Same as LISTnextOb() but works on a UNIT object. | |
SatAddr | UNITfirstEntry (SatAddr src) |
Same as LISTfirstEntry() but works on a UNIT object. | |
SatAddr | UNITnextEntry (SatAddr entry) |
Same as LISTnextEntry() but works on a UNIT object. | |
SatAddr | UNITencodeV (SatAddr dst,...) |
Same as COLencodeV() but works on a UNIT object. | |
SatAddr | UNITencodeN (int n, SatAddr obs[], SatAddr dst) |
Same as COLencodeN() but works on a UNIT object. | |
SatAddr | DIRfirstEntry (SatAddr dir) |
Get the first entry in a directory. | |
SatAddr | DIRnextEntry (SatAddr entry) |
Get the next entry in a directory. | |
bool | DIRdecodeEntry (SatAddr entry, char *name, SatAddr *obj) |
Decode a directory entry. | |
int | DIRentryNameLen (SatAddr entry) |
SatAddr | DIRfindEntryByName (SatAddr dir, const char *name) |
Find a directory entry by name. | |
SatAddr | DIRfindEntryByIdnt (SatAddr dir, SatAddr idnt) |
Find a directory entry from an IDNT object. | |
SatAddr | DIRfindObByName (SatAddr dir, const char *name) |
find a directory object by name. | |
SatAddr | DIRfindObByIdnt (SatAddr dir, SatAddr idnt) |
find a directory object from an IDNT object | |
void | DIRinit (SatAddr dst) |
Create an empty directory. | |
SatAddr | makeDIR (int nibbles) |
Make an empty directory with "nibbles" nibbles of free space. | |
bool | DIRadd (SatAddr src, const char *name, SatAddr obj) |
Add an entry to a DIR. | |
DirItem * | DIRdecode (SatAddr src) |
Decode an entire directory. | |
SatAddr | DIRencode (struct DirItem *head, SatAddr dst) |
Encode an entire directory. | |
int | DIRchangeByName (SatAddr dir, const char *name, SatAddr obj) |
Overwrite the variable in a directory with an object of the same size. | |
int | DIRchangeByIdnt (SatAddr dir, SatAddr idnt, SatAddr obj) |
Same as DIRchangeByName(), but uses a global identifier object (idnt) to lookup the name. | |
int | DIRnibbles (SatAddr dir) |
Return the size in nibbles of the DIR at src. | |
SatAddr | DIRdirForEntry (SatAddr entry) |
Get the DIR object that a encloses a directory entry. | |
SatAddr | DIRparentDir (SatAddr dir) |
Get the parent of a directory. | |
SatAddr | getHOME () |
Get the Saturn address of the HOME directory. | |
SatAddr | getCWD () |
Get the Saturn address of the current directory. | |
bool | isDIR (SatAddr src) |
is the object at src a DIR? | |
bool | isBAK (SatAddr src) |
is the object at src a BACKUP? | |
int | BAKnibbles (SatAddr src) |
Return the size in nibbles of the BACKUP at src. | |
int | BAKnameLen (SatAddr src) |
Get the number of characters in a BACKUP's name. | |
bool | BAKdecode (SatAddr src, char *name, SatAddr *obj, SatAddr *crc) |
Decode a BACKUP object. | |
bool | isECMP (SatAddr src) |
Same as isCMP() but uses an ECMP object. | |
bool | ECMPdecode (SatAddr src, double *re, double *im) |
Same as CMPdecode() but uses an ECMP object. | |
SatAddr | ECMPencode (double re, double im, SatAddr dst) |
Same as CMPencode() but uses an ECMP object. | |
SatAddr | makeECMP () |
Same as makeCMP() but uses an ECMP object. | |
int | ECMPnibbles (SatAddr src) |
Same as CMPnibbles() but uses an ECMP object. | |
bool | isLIB (SatAddr src) |
is the object at src a LIB? | |
int | LIBnibbles (SatAddr src) |
Return the size in nibbles of the LIB at src. | |
bool | isLNGREAL (SatAddr src) |
is the object a LNGREAL | |
bool | LNGREALdecoded (SatAddr src, double *dst) |
Convert LNGREAL to C double. | |
SatAddr | LNGREALencoded (double src, SatAddr dst) |
Convert a C double to an HP LNGREAL. | |
bool | LNGREALdecodell (SatAddr src, long long *mantissa, long long *exponent) |
Decode a LNGREAL to its mantissa and exponent. | |
SatAddr | LNGREALencodell (long long mantissa, long long exponent, SatAddr dst) |
Encode a LNGREAL from its mantissa and exponent. | |
bool | LNGREALdecodeStr (SatAddr src, char *mantissa, char *exponent) |
Decode a LNGREAL to its mantissa and exponent expressed as null-terminated ASCII strings. | |
SatAddr | LNGREALencodeStr (const char *mantissa, const char *exponent, SatAddr dst) |
Encode a LNGREAL from its mantissa and exponent expressed as null-terminated ASCII strings. | |
SatAddr | makeLNGREAL (int numMdigits, int numEdigits) |
Create a new LNGREAL in tempOb. Populate it with zero. | |
int | LNGREALnibbles (SatAddr src) |
The size of a LNGREAL in nibbles. | |
bool | LNGREALdigits (SatAddr src, int *mDigits, int *eDigits) |
Get the number of digits in a LNGREAL's mantissa and exponent. | |
bool | LNGREALbytes (SatAddr src, int *mBytes, int *eBytes) |
Get the number of bytes required to store a LNGREAL's mantissa and exponent as strings. | |
bool | isLNGCOMP (SatAddr src) |
is the object a LNGCOMP | |
bool | LNGCOMPdecoded (SatAddr src, double *re, double *im) |
Convert LNGCOMP to C doubles. | |
SatAddr | LNGCOMPencoded (double re, double im, SatAddr dst) |
Convert two C doubles to an HP LNGCOMP. | |
bool | LNGCOMPdecodell (SatAddr src, long long *re_mantissa, long long *re_exponent, long long *im_mantissa, long long *im_exponent) |
Decode a LNGCOMP into its mantissa and exponent expressed as C long longs. | |
SatAddr | LNGCOMPencodell (long long re_mantissa, long long re_exponent, long long im_mantissa, long long im_exponent, SatAddr dst) |
Encode a LNGCOMP from its real and imaginary mantissa and exponent expressed as C long longs. | |
SatAddr | LNGCOMPencodeStr (const char *re_mantissa, const char *re_exponent, const char *im_mantissa, const char *im_exponent, SatAddr dst) |
Encode a LNGCOMP from its real and imaginary mantissa and exponent expressed as null-terminated ASCII strings. | |
SatAddr | LNGCOMPdecodeStr (SatAddr src, char *re_mantissa, char *re_exponent, char *im_mantissa, char *im_exponent) |
Decode a LNGCOMP to its components expressed as null-terminated ASCII strings. | |
SatAddr | makeLNGCOMP (int numReMdigits, int numReEdigits, int numImMdigits, int numImEdigits) |
Create a new LNGCOMP in tempOb. Withe space for the specified number of digits in each component. | |
int | LNGCOMPnibbles (SatAddr src) |
The size of a LNGCOMP in nibbles. | |
bool | LNGCOMPdigits (SatAddr src, int *mReDigits, int *eReDigits, int *mImDigits, int *eImDigits) |
Get the number of digits in a LNGCOMP's real/imaginary mantissa and exponent. | |
bool | LNGCOMPbytes (SatAddr src, int *mReBytes, int *eReBytes, int *mImBytes, int *eImBytes) |
Get the number of bytes required to store the components of a LNGCOMP as null-terminated ASCII strings. | |
bool | isMATRIX (SatAddr src) |
is the object a MATRIX | |
SatAddr | makeMATRIX (SatAddr obj, unsigned nibbles) |
Allocate space for a MATRIX with "nibbles" data and put a copy of "obj" in it. | |
void | MATRIXinit (SatAddr obj, SatAddr dst) |
Write a new matrix at "dst" and insert a copy of "obj" into it. | |
int | MATRIXnibbles (SatAddr src) |
Return the size in nibbles of the MATRIX at src. | |
int | MATRIXsize (SatAddr src) |
Same as LISTsize() but operates on a MATRIX. | |
bool | MATRIXadd (SatAddr dst, SatAddr obj) |
Same as LISTadd() but operates on a MATRIX. | |
SatAddr | MATRIXcat (SatAddr MATRIX, SatAddr obj) |
Same as LISTcat() but operates on a MATRIX. | |
SatAddr | MATRIXmerge (SatAddr MATRIX1, SatAddr MATRIX2) |
Same as LISTmerge() but operates on a MATRIX. | |
SatAddr | MATRIXencodeV (SatAddr dst,...) |
Same as LISTencode() but operates on a MATRIX. | |
SatAddr | MATRIXencodeN (int n, SatAddr obs[], SatAddr dst) |
Same as LISTencodeN() but operates on a MATRIX. | |
SatAddr | MATRIXfirstOb (SatAddr matrix, SatAddr *iter) |
Same as LISTfirstOb() but operates on a MATRIX. | |
SatAddr | MATRIXnextOb (SatAddr *iter) |
Same as LISTnextOb() but operates on a MATRIX. | |
SatAddr | MATRIXfirstEntry (SatAddr matrix) |
Same as LISTfirstEntry() but operates on a MATRIX. | |
SatAddr | MATRIXnextEntry (SatAddr entry) |
Same as LISTnextEntry() but operates on a MATRIX. | |
SatAddr | STACKpop () |
Pop an address off the stack. | |
SatAddr | STACKpick (int level) |
pick an object on the stack from an arbitrary level. | |
int | STACKdepth () |
Get the stack depth. | |
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. | |
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. | |
void | double2hp (double number, SatAddr dst) |
Convert a C double to an HP 64 bit real number. | |
void | double2hpereal (double number, SatAddr dst) |
Convert a C double to an HP 21 nibble extended real number. | |
int | ll2bcd (unsigned long long src, SatAddr dst, int numDigits) |
Convert a long long to Binary Coded Decimal (BCD), one digit per nibble, LSB stored first. | |
int | str2bcd (const char *src, SatAddr dst, int numDigits) |
Convert a null terminated string of digits to BCD, one digit per nibble, LSB stored first. | |
int | llDigits (unsigned long long src) |
Return the number of digits in a long long. | |
void | doubledecode (double number, int *ex, double *mantissa) |
Extract the base-10 exponent and mantissa from a double. Store the exponent in ex. 1 <= abs(mantissa) < 10. | |
void | doubledecodell (double number, long long *mantissa, long long *exponent) |
decode a C double into mantissa and exponent. | |
long long | llabs (long long src) |
Absolute value of a long long. | |
void | sat_memset (SatAddr dst, int val, int nibbles) |
Like memset(), but works in the saturn domain and sets a specified number of nibbles, not bytes. | |
int | lngrealNibbles (SatAddr src) |
implementation of LNGREALnibbles() but doesn't check prolog This function is also used LNGCOMPnibbles(). | |
bool | lngrealDigits (SatAddr src, int *mDigits, int *eDigits) |
implementation of LNGREALdigits() but doesn't check prolog This function is also used LNGCOMPdigits(). | |
char * | prolog2Name (SatAddr prolog) |
Given a prolog, return its name, or "unknown". | |
SatAddr | name2Prolog (const char *name) |
Return a prolog from a name. | |
int | compositeObNibbles (SatAddr src) |
Implementation for LISTnibbles() etc. Doesn't check the prolog. | |
bool | compositeAdd (SatAddr dst, SatAddr obj) |
Implementation for LISTadd() etc. Doesn't check the prolog. | |
SatAddr | compositeCat (SatAddr src, SatAddr obj) |
Implementation for LISTcat() etc. Doesn't check the prolog. | |
SatAddr | compositeMerge (SatAddr comp1, SatAddr comp2) |
Implementation for LISTmerge() etc. Doesn't check the prolog. | |
SatAddr | compositeFirstEntry (SatAddr col) |
Implementation for LISTfirstEntry() etc. Doesn't check the prolog. | |
SatAddr | compositeNextEntry (SatAddr entry) |
Implementation for LISTnextEntry() etc. Doesn't check the prolog. | |
SatAddr | compositeFirstOb (SatAddr col, SatAddr *iter) |
Implementation for LISTfirstOb() etc. Doesn't check the prolog. | |
SatAddr | compositeNextOb (SatAddr *iter) |
Implementation for LISTnextOb() etc. Doesn't check the prolog. | |
SatAddr | compositeEncode (SatAddr dst, va_list argp) |
Implementation for LISTencode() etc. Doesn't check the prolog. | |
SatAddr | compositeEncodeN (int n, SatAddr obs[], SatAddr dst) |
Implementation for LISTencodeN() etc. Doesn't check the prolog. | |
int | compositeSize (SatAddr src) |
Implementation for LISTSize() etc. Doesn't check the prolog. |
#define ACPTRnibbles | ( | src | ) | (15) |
Return the number of nibbles in a ACPTR object.
src | Saturn address of a ACPTR object. Although not necessary, this parameter is included for consistency with the other objects. |
extract an ACPTR's object and program numbers.
src | Saturn address of an ACPTR | |
obj | if non-null, the Saturn address of the object will be stored here. | |
program | if non-null, the Saturn address of the program will be stored here. |
Encode an ACPTR object with the given object and program numbers.
obj | Saturn address of the object | |
program | Saturn address of the program | |
dst | The Saturn address where the ACPTR should be stored, or zero to create a new ACPTR |
bool isACPTR | ( | SatAddr | src | ) |
is the object at src an ACPTR object?
src | Saturn address of an object |
SatAddr makeACPTR | ( | ) |
Create an empty ACPTR. Contents are undefined.