HPGCC3 Documentation 3.0 R003

Advanced and low-level

Data Structures

struct  _sat_cpu
 The BOOLEAN constant FALSE. More...

Typedefs

typedef struct _sat_cpu SAT_CPU
 The BOOLEAN constant FALSE.
typedef struct _sat_cpuSAT_PCPU

Functions

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.
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.

Detailed Description

All functions, constants and macros in this group are not part of the user API and its use is NOT recommended. Documentation is provided for sysRPL programmers that need low-level access to Saturn objects. Most of these functions have no error checking. Use at your own risk.


Typedef Documentation

typedef struct _sat_cpu SAT_CPU

The BOOLEAN constant FALSE.

The BOOLEAN constant TRUE

The emulated Saturn CPU registers and status

typedef struct _sat_cpu * SAT_PCPU

Function Documentation

LONGLONG sat3_bcd2llong ( SAT_OBJECT  data,
int  digits 
)

Read a 4-bit packed BCD number.

Read a BCD number of up to 18 digits and converts it to LONGLONG format

** LOW-LEVEL ROUTINE **

Parameters:
dataSAT_OBJECT pointer to bcd data.
digitsNumber of nibbles (digits) to read.
Returns:
64-bit number read (LONGLONG)
SAT_OBJECT sat3_createtemp ( int  objsize)

Create a memory block in TEMPOB.

** LOW-LEVEL ROUTINE - SUPERSEDED BY sat3_alloc ** C implementation of the HP49's ROM library routine.

Parameters:
objsizeSize of object in nibbles
Returns:
SAT_OBJECT pointer to newly created memory block or NULL on error
See also:
sat3_alloc
unsigned int sat3_s2a ( SAT_OBJECT  sat_addr)

Convert a SAT_OBJECT pointer into a valid ARM domain address.

** LOW-LEVEL ROUTINE - DO NOT USE ** This function interprets the value of a SAT_OBJECT pointer and convert it to a suitable byte-aligned ARM address for direct memory access.

Parameters:
sat_addrAny SAT_OBJECT address, pointing to Saturn RAM, ERAM, FLASH or the C heap.
Returns:
32-bit unsigned integer with the ARM address (can be type-casted directly to a (unsigned char *)
SAT_OBJECT sat3_skipob ( SAT_OBJECT  object)

Skip an object, find next object within a composite.

** LOW-LEVEL ROUTINE - USE HIGHER LEVEL FUNCTIONS FOR COMPOSITES ** C implementation of the HP49's ROM library routine SKIPOB.

Parameters:
objectObject to skip. Must be a valid object.
Returns:
SAT_OBJECT after the given object
SAT_OBJECT sat3_sknamedn ( SAT_OBJECT  name)

Skip the name on a named object, reverse direction.

** LOW-LEVEL ROUTINE - DO NOT USE **

Parameters:
nameObject name to skip.
Returns:
SAT_OBJECT before the given name
SAT_OBJECT sat3_sknameup ( SAT_OBJECT  name)

Skip the name on a named object.

** LOW-LEVEL ROUTINE - DO NOT USE **

Parameters:
nameObject name to skip.
Returns:
SAT_OBJECT after the given name
int sat3_typesize ( int  prologtype)

Get the size in nibbles for objects of a given type, similar to sizeof() in C.

Parameters:
prologtypeAny SAT_DOXXX constant corresponding to an object prolog.
Returns:
Size in nibbles of the given type if the type is fixed-size, or 0 if a prolog of a variable-size object is given (or an invalid prolog).