HPGCC3 Documentation 3.0 R003

sat3.h File Reference

#include <decNumber.h>
#include <extreal.h>
#include <sat3_common_idioms.h>

Go to the source code of this file.

Data Structures

struct  _sat_cpu
 The BOOLEAN constant FALSE. More...

Defines

#define SWAP4(x)   (((x) << 4) | ((x) >> 4))
 Swap low and high nibbles in a byte.
#define ALIGN(x, a)   (((unsigned)(x)+(a)-1) & (~((unsigned)(a)-1)))
 Align an address 'x' to a 'a' bit boundary.
#define BOOL   int
 Standard definition for BOOLEAN type.
#define ALLOC_TEMPOB   0xffffffff
 Memory allocation constant used by sat3_alloc.
#define ALLOC_HEAP   0xfffffffe
 Memory allocation constant used by sat3_alloc.
#define BLOCK_UNREF   -1
 Memory allocation constant used by sat3_free.
#define BLOCK_REF   1
 Memory allocation constant used by sat3_free.
#define SAT_DOINT   0x2614
 Saturn data prologue: ZINT (Typical Exact Integer)
#define SAT_DOCSTR   0x2a2c
 Saturn data prologue: STRING.
#define SAT_DOREAL   0x2933
 Saturn data prologue: REAL.
#define SAT_DOEREL   0x2955
 Saturn data prologue: EXTENDED REAL.
#define SAT_DOHXS   0x2a4e
 Saturn data prologue: UINT (HEX STRING)
#define SAT_DOBINT   0x2911
 Saturn data prologue: BINT.
#define SAT_DOCMP   0x2977
 Saturn data prologue: COMPLEX.
#define SAT_DOECMP   0x299D
 Saturn data prologue: EXTENDED COMPLEX.
#define SAT_DOCHAR   0x29BF
 Saturn data prologue: CHAR.
#define SAT_DOARRY   0x29e8
 Saturn data prologue: ARRAY.
#define SAT_DOLNKARRY   0x29e8
 Saturn data prologue: LINKED ARRAY.
#define SAT_DOIDNT   0x2e48
 Saturn data prologue: ID (variable name)
#define SAT_DOLAM   0x2e6D
 Saturn data prologue: LAM ID (variable name)
#define SAT_DOROMP   0x2e92
 Saturn data prologue: XLIB (ROM Pointer)
#define SAT_DORRP   0x2a96
 Saturn data prologue: RRP (Directory objects)
#define SAT_DOSYMB   0x2AB8
 Saturn data prologue: SYMBOLIC.
#define SAT_DOLIST   0x2A74
 Saturn data prologue: LIST.
#define SAT_DOCOL   0x2D9D
 Saturn data prologue: SECONDARY (Programs)
#define SAT_DOGROB   0x2B1E
 Saturn data prologue: GROB.
#define SAT_SEMI   0x312b
 Saturn composite object terminator: SEMI.
#define SAT_DOBAK   0x2B62
 Saturn data prologue: BACKUP.
#define SAT_DOCODE   0x2DCC
 Saturn data prologue: CODE.
#define SAT_DOEXT   0x2ADA
 Saturn data prologue: UNIT OBJECT.
#define SAT_DOFLASHP   0x26AC
 Saturn data prologue: FLASH PTR.
#define SAT_DOLIB   0x2B40
 Saturn data prologue: LIBRARY.
#define SAT_DOMATRIX   0x2686
 Saturn data prologue: SYMBOLIC ARRAY.
#define SAT_DOTAG   0x2AFC
 Saturn data prologue: TAGGED OBJECT.
#define SAT_DOAPLET   0x26D5
 Saturn data prologue: DOAPLET.
#define SAT_DOEXT0   0x2B88
 Saturn data prologue: LIBDATA.
#define SAT_DOACPTR   0x2BAA
 Saturn data prologue: ACPTR (internal object)
#define SAT_DOEXT1   SAT_DOACPTR
#define SAT_DOEXT2   0x2BCC
 Saturn data prologue: DOEXT2.
#define SAT_DOFONT   0x2BCC
 Saturn data prologue: DOFONT.
#define SAT_DOEXT3   0x2BEE
 Saturn data prologue: DOEXT3.
#define SAT_DOARMC   0x2C10
 Saturn data prologue: ARMCODE, (ex DOEXT4)
#define SAT_DOEXT4   0x2C10
#define SAT_DOLNGREAL   0x263A
 Saturn data prologue: LNGREAL.
#define SAT_DOLNGCOMP   0x2660
 Saturn data prologue: LNGCOMP.
#define SAT_TAGGED   0x20000000
 Constant to indicate a tagged object.
#define SAT_OPTIONAL_TAG   0x40000000
 Constant to indicate an optionally tagged argument.
#define SAT_ANY   0
 Constant to indicate a any object.
#define SAT_NUMERIC   0x10000000
 Constant to indicate any numeric object (bint, zint, hxs string or real)
#define REAL_0   0x2f937
 Predefined real number in ROM.
#define REAL_1   0x2f94c
 Predefined real number in ROM.
#define REAL_2   0x2f961
 Predefined real number in ROM.
#define REAL_3   0x2f976
 Predefined real number in ROM.
#define REAL_4   0x2f98b
 Predefined real number in ROM.
#define REAL_5   0x2f9a0
 Predefined real number in ROM.
#define REAL_6   0x2f9b5
 Predefined real number in ROM.
#define REAL_7   0x2f9ca
 Predefined real number in ROM.
#define REAL_8   0x2f9df
 Predefined real number in ROM.
#define REAL_9   0x2f9f4
 Predefined real number in ROM.
#define SAT_INTRPPTR   0x8076B
 Saturn CPU storage area: D0.
#define SAT_DSKTOP   0x806F8
 Saturn CPU storage area: D1.
#define SAT_RSKTOP   0x806F3
 Saturn CPU storage area: B.
#define SAT_AVMEM   0x80E9B
 Saturn CPU storage area: D.
#define SAT_TEMPTOP   0x806EE
 Saturn emu storage area: TEMPTOP.
#define SAT_TEMPOB   0x806E9
 Saturn emu storage area: TEMPOB.
#define SAT_EDITLINE   0x806FD
 Saturn emu storage area: EDITLINE.
#define SAT_ERROR   0x80EA5
 Saturn error number: ERROR.
#define SAT_TEMPENV   0x80702
 Saturn emu storage area: TEMPENV.
#define SAT_TOUCHTAB   0x8070c
 Saturn emu storage area: TOUCHTAB.
#define SAT_FSTVGERPTR   0x8072f
 Saturn emu storage area: FSTVGERPTR.
#define SAT_CONTEXT   0x8071b
 Saturn emu storage area: CONTEXT.
#define SAT_USEROB   0x80711
 Saturn emu storage area: USEROB.
#define SAT_TRUE   0x3a81
 SysRPL flags: TRUE.
#define SAT_FALSE   0x3ac0
 SysRPL flags: FALSE.
#define SATERR_TOOFEWARGS   0x201
 Calculator error: Too Few Arguments.
#define SATERR_BADARGTYPE   0x202
 Calculator error: Bad Argument Type.
#define SATERR_BADARGVALUE   0x203
 Calculator error: Bad Argument Value.
#define SATERR_INSUFFMEMORY   0x001
#define SATERR_UNDEFLOCALNAME   0x003
#define SATERR_UNDEFXLIBNAME   0x004
#define SATERR_MEMORYCLEAR   0x005
#define SATERR_INVALIDCARDDATA   0x008
#define SATERR_OBJECTINUSE   0x009
#define SATERR_PORTNOTAVAILABLE   0x00A
#define SATERR_NOROOMINPORT   0x00B
#define SATERR_NOROOMTOSAVESTACK   0x101
#define SATERR_INVALIDUSERFUNCTION   0X103
#define SATERR_INVALIDSYNTAX   0X106
#define SATERR_WRONGARGUMENTCOUNT   0X128
#define SATERR_NONEMPTYDIR   0X12B
#define SATERR_INVALIDDEFINITION   0X12C
#define SATERR_MISSINGLIBRARY   0X12D
#define SATERR_UNABLETOISOLATE   0X130
#define SATERR_OUTOFMEMORY   0X135
#define SATERR_TOOFEWARGS   0x201
 Calculator error: Too Few Arguments.
#define SATERR_BADARGTYPE   0x202
 Calculator error: Bad Argument Type.
#define SATERR_BADARGVALUE   0x203
 Calculator error: Bad Argument Value.
#define SATERR_UNDEFINEDNAME   0X204
#define SATERR_POSITIVEUNDERFLOW   0X301
#define SATERR_NEGATIVEUNDERFLOW   0X302
#define SATERR_OVERFLOW   0X303
#define SATERR_UNDEFINEDRESULT   0X304
#define SATERR_INFINITERESULT   0X305
#define SATERR_INVALIDDIMENSION   0X501
#define SATERR_INVALIDARRAYELEM   0X502
#define sat3_zintdigits(zint)   (sat3_strsize(zint)-1)
 Get the number of digits in a ZINT.
#define sat3_strlen(cstr)   (sat3_strsize(cstr)>>1)
 Get the number of characters in a string.
#define sat3_hxssize(hxs)   sat3_strsize(hxs)
 Get the number of nibbles in a hex string.
#define sat3_taglen(tag)   sat3_idlen(tag)
 Get the number of characters in the tag of a tagged object.
#define sat3_isreal(obj)   sat3_checktype(obj,SAT_DOREAL)
 Check object type on a given object.
#define sat3_iscplx(obj)   sat3_checktype(obj,SAT_DOCMP)
 Check object type on a given object.
#define sat3_isbint(obj)   sat3_checktype(obj,SAT_DOBINT)
 Check object type on a given object.
#define sat3_iszint(obj)   sat3_checktype(obj,SAT_DOINT)
 Check object type on a given object.
#define sat3_ischar(obj)   sat3_checktype(obj,SAT_DOCHAR)
 Check object type on a given object.
#define sat3_iscstr(obj)   sat3_checktype(obj,SAT_DOCSTR)
 Check object type on a given object.
#define sat3_ishxs(obj)   sat3_checktype(obj,SAT_DOHXS)
 Check object type on a given object.
#define sat3_islist(obj)   sat3_checktype(obj,SAT_DOLIST)
 Check object type on a given object.
#define sat3_ismatrix(obj)   sat3_checktype(obj,SAT_DOMATRIX)
 Check object type on a given object.
#define sat3_isid(obj)   sat3_checktype(obj,SAT_DOIDNT)
 Check object type on a given object.
#define sat3_istag(obj)   sat3_checktype(obj,SAT_DOTAG)
 Check object type on a given object.
#define sat3_issymb(obj)   sat3_checktype(obj,SAT_DOSYMB)
 Check object type on a given object.
#define sat3_isdir(obj)   sat3_checktype(obj,SAT_DORRP)
 Check object type on a given object.

Typedefs

typedef struct _sat_cpu SAT_CPU
 The BOOLEAN constant FALSE.
typedef struct _sat_cpuSAT_PCPU
typedef unsigned int SAT_OBJECT
 Saturn object type.

Functions

void sat3_poke (SAT_OBJECT sat_addr, unsigned int val, int nibbles)
 Poke up to 8 nibbles of data to Saturn domain.
unsigned int sat3_peek (SAT_OBJECT sat_addr, int nibbles)
 Peek up to 8 nibbles of data from Saturn domain.
void sat3_memmove (SAT_OBJECT dest, SAT_OBJECT source, int nibbles)
 Move arbitrary number of nibbles from one location to another.
void sat3_memset (SAT_OBJECT dest, int value, int nibvalue, int nibbles)
 Fill an area of memory with the given nibble pattern.
SAT_OBJECT sat3_alloc (SAT_OBJECT where, int nibbles)
 Allocate arbitrary number of nibbles at the specified location.
int sat3_free (SAT_OBJECT block)
 Releases a block of memory allocated by sat3_alloc.
SAT_OBJECT sat3_copyobject (SAT_OBJECT dest, SAT_OBJECT source)
 Copy an object to the specified location.
int sat3_sizeof (SAT_OBJECT obj)
 Get size in nibbles of a calculator object.
int sat3_getfreetempob ()
 Return the amount of usable tempob memory, in nibbles.
int sat3_getfreeuserob ()
 Return the amount of usable userob memory, in nibbles.
SAT_OBJECT sat3_createtemp (int objsize)
 Create a memory block in TEMPOB.
SAT_OBJECT sat3_skipob (SAT_OBJECT object)
 Skip an object, find next object within a composite.
SAT_OBJECT sat3_sknameup (SAT_OBJECT name)
 Skip the name on a named object.
SAT_OBJECT sat3_sknamedn (SAT_OBJECT name)
 Skip the name on a named object, reverse direction.
LONGLONG sat3_bcd2llong (SAT_OBJECT data, int digits)
 Read a 4-bit packed BCD number.
void sat3_errorsto (int errno)
 Set calculator error number.
void sat3_exiterror (int errno)
 Set calculator error number and exit the program generating an error in the calculator.
void sat3_garbcol ()
 Perform a garbage collection in TEMPOB memory.
unsigned int sat3_s2a (SAT_OBJECT sat_addr)
 Convert a SAT_OBJECT pointer into a valid ARM domain address.
int sat3_typesize (int prologtype)
 Get the size in nibbles for objects of a given type, similar to sizeof() in C.
SAT_OBJECT sat3_createbint_int (SAT_OBJECT where, int value)
 Create a system bint from an int.
int sat3_convertbint_int (SAT_OBJECT bint)
 Convert a system bint into a 32-bit int.
unsigned int sat3_convertbint_uint (SAT_OBJECT bint)
 Convert a system bint into a 32-bit unsigned integer.
SAT_OBJECT sat3_createreal_xreal (SAT_OBJECT where, XREAL *value)
 Create a real from extended precision real numbers (XREAL).
BOOL sat3_convertreal_xreal (SAT_OBJECT real, XREAL *result)
 Convert a real into an extended precision real (XREAL).
SAT_OBJECT sat3_createreal_decn (SAT_OBJECT where, decNumber *value)
 Create a real from variable precision real numbers (decNumber).
BOOL sat3_convertreal_decn (SAT_OBJECT real, decNumber *result)
 Convert a real into a variable precision real (decNumber).
SAT_OBJECT sat3_createreal_dbl (SAT_OBJECT where, double value)
 Create a real from double.
double sat3_convertreal_dbl (SAT_OBJECT real)
 Convert a real into a double.
SAT_OBJECT sat3_createreal_int (SAT_OBJECT where, int value)
 Create a real from an int.
int sat3_convertreal_int (SAT_OBJECT real)
 Convert a real into a 32-bit int.
SAT_OBJECT sat3_createreal_llong (SAT_OBJECT where, LONGLONG value)
 Create a real from a LONGLONG.
LONGLONG sat3_convertreal_llong (SAT_OBJECT real)
 Convert a real into a 64-bit int.
SAT_OBJECT sat3_createcplx_xreal (SAT_OBJECT where, XREAL *real, XREAL *imag)
 Create a complex from extended precision real numbers (XREAL).
BOOL sat3_convertcplx_xreal (SAT_OBJECT cplx, XREAL *real, XREAL *imag)
 Convert a complex into two extended precision reals (XREAL).
SAT_OBJECT sat3_createcplx_decn (SAT_OBJECT where, decNumber *real, decNumber *imag)
 Create a complex from variable precision real numbers (decNumber).
BOOL sat3_convertcplx_decn (SAT_OBJECT cplx, decNumber *real, decNumber *imag)
 Convert a complex into a variable precision real (decNumber).
SAT_OBJECT sat3_createcplx_dbl (SAT_OBJECT where, double real, double imag)
 Create a complex from two double's (real and imaginary parts).
BOOL sat3_convertcplx_dbl (SAT_OBJECT cplx, double *real, double *imag)
 Convert a complex into a pair of double's (real and imaginary parts).
SAT_OBJECT sat3_createcplx_int (SAT_OBJECT where, int real, int imag)
 Create a complex from two integers.
BOOL sat3_convertcplx_int (SAT_OBJECT cplx, int *real, int *imag)
 Convert a complex into two 32-bit integers.
SAT_OBJECT sat3_createcplx_llong (SAT_OBJECT where, LONGLONG real, LONGLONG imag)
 Create a complex from two LONGLONG integers (real and imaginary parts).
BOOL sat3_convertcplx_llong (SAT_OBJECT cplx, LONGLONG *real, LONGLONG *imag)
 Convert a complex into a pair of 64-bit integers.
SAT_OBJECT sat3_createzint_xreal (SAT_OBJECT where, XREAL *value)
 Create a ZINT from extended precision real numbers (XREAL).
BOOL sat3_convertzint_xreal (SAT_OBJECT zint, XREAL *value)
 Convert a zint into an extended precision real (XREAL).
SAT_OBJECT sat3_createzint_decn (SAT_OBJECT where, decNumber *value)
 Create a zint from variable precision real numbers (decNumber).
BOOL sat3_convertzint_decn (SAT_OBJECT zint, decNumber **result)
 Convert a zint into an variable precision real (decNumber).
SAT_OBJECT sat3_createzint_dbl (SAT_OBJECT where, double value)
 Create a zint from double precision real numbers.
double sat3_convertzint_dbl (SAT_OBJECT zint)
 Convert a zint into a double precision real.
SAT_OBJECT sat3_createzint_int (SAT_OBJECT where, int value)
 Create a zint from an int.
int sat3_convertzint_int (SAT_OBJECT zint)
 Convert a zint into a 32-bit int.
SAT_OBJECT sat3_createzint_llong (SAT_OBJECT where, LONGLONG value)
 Create a zint from a LONGLONG.
LONGLONG sat3_convertzint_llong (SAT_OBJECT zint)
 Convert a zint into a 64-bit integer.
SAT_OBJECT sat3_createchar_char (SAT_OBJECT where, char value)
 Create a char object from a char.
char sat3_convertchar_char (SAT_OBJECT ochar)
 Convert a char into a calculator char object.
SAT_OBJECT sat3_createcstr_bytes (SAT_OBJECT where, char *data, int nbytes)
 Create a string object from a sequence of bytes.
BOOL sat3_convertcstr_bytes (SAT_OBJECT cstr, char *data, int maxbytes)
 Extract a sequence of bytes from a calculator string.
SAT_OBJECT sat3_createcstr_str (SAT_OBJECT where, char *string)
 Create a string object from a C-style string.
BOOL sat3_convertcstr_str (SAT_OBJECT cstr, char *string, int maxchars)
 Extract a C-style string from a calculator string.
SAT_OBJECT sat3_createcstr_substr (SAT_OBJECT where, char *string, int startpos, int nchars)
 Create a string object from a C-style string.
BOOL sat3_convertcstr_substr (SAT_OBJECT cstr, char *string, int startpos, int nchars)
 Extract a C-style string from a calculator string.
int sat3_strsize (SAT_OBJECT obj)
 Get the number of nibbles in a string.
SAT_OBJECT sat3_createhxs_int (SAT_OBJECT where, int value)
 Create a hex string object from a 32-bit integer.
int sat3_converthxs_int (SAT_OBJECT hxs)
 Extract an integer from a hex string.
SAT_OBJECT sat3_createhxs_llong (SAT_OBJECT where, LONGLONG value)
 Create a hex string object from a 64-bit integer.
LONGLONG sat3_converthxs_llong (SAT_OBJECT hxs)
 Extract a 64-bit integer from a hex string.
SAT_OBJECT sat3_createhxs_bytes (SAT_OBJECT where, char *data, int nbytes)
 Create a hex string object from a sequence of bytes.
BOOL sat3_converthxs_bytes (SAT_OBJECT hxs, char *data, int maxbytes)
 Extract a sequence of bytes from a hex string.
SAT_OBJECT sat3_createid_str (SAT_OBJECT where, char *string)
 Create an ID object from a C-style string.
BOOL sat3_convertid_str (SAT_OBJECT cstr, char *string, int maxchars)
 Extract a C-style string from a calculator ID.
int sat3_idlen (SAT_OBJECT idnt)
 Get the number of characters in an ID.
SAT_OBJECT sat3_createtag_str (SAT_OBJECT where, char *tag, SAT_OBJECT obj)
 Create a tagged object from a C-style string and an arbitrary object.
BOOL sat3_converttag_str (SAT_OBJECT tagged, char *string, int maxchars)
 Extract a C-style string from a tagged object.
SAT_OBJECT sat3_striptag (SAT_OBJECT obj)
 Isolate the object on a tagged object.
SAT_OBJECT sat3_createrarray (SAT_OBJECT where, int rows, int cols)
 Create a real array object with the given dimensions.
void sat3_rarrayput_dbl (SAT_OBJECT array, int row, int col, double value)
 Set the element of an array to the given value (as a double).
void sat3_rarrayput_xreal (SAT_OBJECT array, int row, int col, XREAL *value)
 Set the element of an array to the given value (XREAL).
void sat3_rarrayput_int (SAT_OBJECT array, int row, int col, int value)
 Set the element of an array to the given value (int).
void sat3_rarrayput_llong (SAT_OBJECT array, int row, int col, LONGLONG value)
 Set the element of an array to the given value (long long).
void sat3_rarrayput_decn (SAT_OBJECT array, int row, int col, decNumber *value)
 Set the element of an array to the given value (as a decNumber).
double sat3_rarrayget_dbl (SAT_OBJECT array, int row, int col)
 Get the element of an array as a double.
BOOL sat3_rarrayget_xreal (SAT_OBJECT array, int row, int col, XREAL *result)
 Get the element of an array as a XREAL.
int sat3_rarrayget_int (SAT_OBJECT array, int row, int col)
 Get the element of an array as an (int).
LONGLONG sat3_rarrayget_llong (SAT_OBJECT array, int row, int col)
 Get the element of an array as an (long long).
BOOL sat3_rarrayget_decn (SAT_OBJECT array, int row, int col, decNumber *result)
 Get the element of an array as a variable precision decNumber.
BOOL sat3_rarraysize (SAT_OBJECT array, int *rowptr, int *colptr)
 Get the size of a real array object.
SAT_OBJECT sat3_createcarray (SAT_OBJECT where, int rows, int cols)
 Create a complex array object with the given dimensions.
void sat3_carrayput_dbl (SAT_OBJECT array, int row, int col, double rpart, double ipart)
 Set the element of an array to the given value (as a double).
void sat3_carrayput_xreal (SAT_OBJECT array, int row, int col, XREAL *rpart, XREAL *ipart)
 Set the element of an array to the given value (as XREAL's).
void sat3_carrayput_int (SAT_OBJECT array, int row, int col, int rpart, int ipart)
 Set the element of an array to the given value (as int's).
void sat3_carrayput_llong (SAT_OBJECT array, int row, int col, LONGLONG rpart, LONGLONG ipart)
 Set the element of an array to the given value (as long long's).
void sat3_carrayput_decn (SAT_OBJECT array, int row, int col, decNumber *rpart, decNumber *ipart)
 Set the element of an array to the given value (as decNumber's).
BOOL sat3_carrayget_dbl (SAT_OBJECT array, int row, int col, double *rpart, double *ipart)
 Get the element of an array in double format.
BOOL sat3_carrayget_xreal (SAT_OBJECT array, int row, int col, XREAL *rpart, XREAL *ipart)
 Get the element of an array in XREAL format.
BOOL sat3_carrayget_int (SAT_OBJECT array, int row, int col, int *rpart, int *ipart)
 Get the element of an array in (int) format.
BOOL sat3_carrayget_llong (SAT_OBJECT array, int row, int col, LONGLONG *rpart, LONGLONG *ipart)
 Get the element of an array in (long long) format.
BOOL sat3_carrayget_decn (SAT_OBJECT array, int row, int col, decNumber *rpart, decNumber *ipart)
 Get the element of an array in (decNumber) format.
BOOL sat3_carraysize (SAT_OBJECT array, int *rowptr, int *colptr)
 Get the size of a complex array object.
SAT_OBJECT sat3_creatematrix (SAT_OBJECT where, int rows, int cols, SAT_OBJECT fillobj, int allocsize)
 Create a matrix object with the given dimensions.
SAT_OBJECT sat3_matrixgetrow (SAT_OBJECT matrix, int row)
 Get a pointer to a specific row of a matrix.
SAT_OBJECT sat3_matrixget (SAT_OBJECT matrix, int row, int col)
 Get a pointer to a specific element of a matrix.
SAT_OBJECT sat3_matrixfirst (SAT_OBJECT obj)
 Get a pointer to the first element of a matrix.
SAT_OBJECT sat3_matrixnext (SAT_OBJECT obj)
 Get a pointer to the next element of a matrix.
BOOL sat3_matrixsize (SAT_OBJECT matrix, int *rowptr, int *colptr)
 Get the size of a matrix object.
BOOL sat3_matrixrowinsert (SAT_OBJECT matrix, int rowpos, SAT_OBJECT fillobj)
 Insert a row on a matrix.
BOOL sat3_matrixrowremove (SAT_OBJECT matrix, int rowpos)
 Delete a row on a matrix.
BOOL sat3_matrixcolinsert (SAT_OBJECT matrix, int colpos, SAT_OBJECT fillobj)
 Insert a column on a matrix.
BOOL sat3_matrixcolremove (SAT_OBJECT matrix, int colpos)
 Delete a column on a matrix.
BOOL sat3_matrixput (SAT_OBJECT matrix, int row, int col, SAT_OBJECT obj)
 Put an element on the matrix.
SAT_OBJECT sat3_createlist (SAT_OBJECT where, int allocsize)
 Create an empty list object.
SAT_OBJECT sat3_listhead (SAT_OBJECT list)
 Get the first object (head) on a list.
SAT_OBJECT sat3_listnext (SAT_OBJECT obj)
 Get the next object on a list.
SAT_OBJECT sat3_listtail (SAT_OBJECT list)
 Get the tail of a list.
SAT_OBJECT sat3_listget (SAT_OBJECT list, int position)
 Get a pointer to the specified object within a list.
int sat3_listcount (SAT_OBJECT list)
 Get the number of elements on a list.
BOOL sat3_listclose (SAT_OBJECT position)
 Truncate a list.
BOOL sat3_listinsert (SAT_OBJECT position, SAT_OBJECT object)
 Insert an object into a list.
BOOL sat3_listremove (SAT_OBJECT position)
 Remove an object from a list.
BOOL sat3_listappend (SAT_OBJECT list, SAT_OBJECT object)
 Insert an object at the end of a list.
SAT_OBJECT sat3_home ()
 Get HOME directory.
SAT_OBJECT sat3_hiddendir ()
 Get the Hidden directory.
SAT_OBJECT sat3_getcwd ()
 Get current work directory.
BOOL sat3_setcwd (SAT_OBJECT dir)
 Set the current work directory.
SAT_OBJECT sat3_findfirst (SAT_OBJECT dir)
 Get first object in a directory.
SAT_OBJECT sat3_findnext (SAT_OBJECT dir, SAT_OBJECT diritem)
 Get next object in a directory.
BOOL sat3_getvarname (SAT_OBJECT obj, char *namebuffer, int max_chars)
 Get next name of an object in a directory.
int sat3_getvarnamelen (SAT_OBJECT obj)
 Get next length of the name of an object in a directory.
SAT_OBJECT sat3_updir (SAT_OBJECT dir)
 Get parent directory.
SAT_OBJECT sat3_rclindir (SAT_OBJECT dir, char *name)
 Find an object within a dir given its name.
SAT_OBJECT sat3_rclhere (char *name)
 Find an object in the current work directory.
SAT_OBJECT sat3_rcl (char *name)
 Find an object in the current work directory or its parent directories.
BOOL sat3_getpath (SAT_OBJECT obj, char *pathbuffer, int maxchars)
 Get the full path and name of an object.
BOOL sat3_purgeobj (SAT_OBJECT varobject)
 Delete an object in a directory.
BOOL sat3_purge (char *varpath)
 Delete an object in the current work directory.
BOOL sat3_purgeindir (SAT_OBJECT dir, char *varname)
 Delete an object in the given directory.
BOOL sat3_stoindir (SAT_OBJECT dir, SAT_OBJECT obj, char *name)
 Store an object in the given directory.
BOOL sat3_sto (SAT_OBJECT obj, char *varname)
 Store an object in the current work directory.
BOOL sat3_crdir (char *name)
 Create a directory in the current work directory.
BOOL sat3_pgdir (char *name)
 Purge an entrire directory tree.
BOOL sat3_chdir (char *dir)
 Change the current work directory, given a directory name.
int sat3_depth ()
 Get number of elements on the RPL stack (DEPTH)
void sat3_drop ()
 Pop one element off the stack (DROP)
void sat3_dropn (int n)
 Pop several elements off the stack (DROPN)
void sat3_swap ()
 Swap elements on level 1 and 2 (SWAP)
BOOL sat3_push (SAT_OBJECT object)
 Push an object to the stack.
SAT_OBJECT sat3_pop ()
 Pop an object from the stack. Stack Level 1 is dropped.
SAT_OBJECT sat3_pick (int level)
 Get an object at an arbitrary stack level. Stack remains unaltered.
BOOL sat3_pushtruefalse (BOOL arg)
 Push saturn flag FALSE if arg is FALSE, TRUE otherwise.
BOOL sat3_checktype (SAT_OBJECT obj, unsigned int prolog)
 Verify object type.
BOOL sat3_checkargs (int n,...)
 Check for multiple stack arguments.
void sat3_checkargserror (int n,...)
 Check for multiple stack arguments, and exit with an error if types don't match.
BOOL sat3_ckn (int n)
 Check for enough stack arguments, and protect the calculator stack.
void sat3_cknerror (int n)
 Check for enough stack arguments, protect the calculator stack, and exit with error.
BOOL sat3_israrray (SAT_OBJECT obj)
 Check object type on a given object.
BOOL sat3_iscarray (SAT_OBJECT obj)
 Check object type on a given object.
BOOL sat3_isptr (SAT_OBJECT obj)
 Check if SAT_OBJECT is a PTR to an object in ROM.

Detailed Description

Interface module with the calculator.

The Saturn module enables interaction with the calculator, access to variables, the stack, etc.

Definition in file sat3.h.