![]() |
![]() |
![]() |
![]() |
80x86 Constants (x86.hhf)
The Arrays Module (arrays.hhf)
- Declarations, Allocation, and Predicates
#macro array.dArray( type, dimensions)
#macro array.daAlloc( dynamicArrayName, <<list of dimension bounds>> );
#macro array.daFree( dynamicArrayName );
#macro array.IsItVar( objectName )
#macro array.IsItDynamic( arrayName )
- Accessing Dynamic Array Objects
#macro array.index( reg32, arrayName, <<list of indicies>> );
iterator array.element( arrayName );
- Array Operations/Functions
#macro array.cpy( srcArray, destArray );
#macro array.transpose( srcArray, destArray, optionalDimension);
- Lookup Tables in the Arrays Module
Bit Manipulation (bits.hhf)
- Bit Counting Functions
bits.cnt( b:dword ); @returns( "EAX" );
- Bit Movement, Insertion, and Extraction Functions
bits.reverse32( b:dword ); @returns( "EAX" ); 11 bits.merge32( even:dword; odd:dword ); @returns( "EDX:EAX" ); 12 bits.nibbles32( d:dword ); @returns( "EDX:EAX" ); 12 procedure bits.extract( var d:dword ); 13 bits.distribute( source:dword; mask:dword; dest:dword ); 13 bits.coalese( source:dword; mask:dword ); 14Character Classification and Utilities Module (chars.hhf)
- Conversion Functions
chars.toUpper( c:byte ); @returns( "AL" );
chars.toLower( c:byte ); @returns( "AL" );
- Predicates (Tests)
chars.isAlpha( c:byte ); @returns( "EAX" );
chars.isUpper( c:byte ); @returns( "EAX" );
chars.isLower( c:byte ); @returns( "EAX" );
chars.isAlphaNum( c:byte ); @returns( "EAX" );
chars.isDigit( c:byte ); @returns( "EAX" );
chars.isXDigit( c:byte ); @returns( "EAX" );
chars.isGraphic( c:byte ); @returns( "EAX" );
chars.isSpace( c:byte ); @returns( "EAX" );
chars.isASCII( c:byte ); @returns( "EAX" );
chars.isCtrl( c:byte ); @returns( "EAX" );
Character Sets (cset.hhf)
- Predicates (tests)
cs.IsEmpty( src: cset ); @returns( "AL" );
cs.member( c:char; theSet:cset ); @returns( "AL" );
cs.subset( src1:cset; src2:cset ); @returns( "AL" ); 18
- Character Set Construction and Manipulation
cs.empty( var dest:cset );
cs.cpy( src:cset; var dest:cset );
procedure cs.charToCset( c:char; var dest:cset );
procedure cs.rangeChar( first:char; last:char; var dest:cset );
procedure cs.strToCset( s:string; var dest:cset );
procedure cs.strToCset2( s:string; offs:uns32; var dest:cset );
procedure cs.extract( var dest:cset ); @returns( "EAX" );
- Set Operations
cs.setunion( src:cset; var dest:cset );
cs.intersection( src:cset; var dest:cset );
cs.difference( src:cset; var dest:cset );
cs.complement( src:cset; var dest:cset );
procedure cs.unionChar( c:char; var dest:cset );
procedure cs.removeChar( c:char; var dest:cset );
procedure cs.unionStr( s:string; var dest:cset );
procedure cs.unionStr2( s:string; offs:uns32; offs:uns32; var dest:cset );
procedure cs.removeStr( s:string; var dest:cset );
procedure cs.removeStr2( s:string; offs:uns32; var dest:cset );
Classification and Constants (hla.hhf)
- Classification Macros
hla.IsUns( identifier )
hla.IsInt( identifier )
hla.IsHex( identifier )
hla.IsNumber( identifier )
hla.IsReal( identifier )
hla.IsNumeric( identifier )
hla.IsOrdinal( identifier )
- @class Constants
- HLA pType Constants
- @pClass Return Values
- @section Return Results
- hla.genLabel Macro
Command Line Arguments (args.hhf)
arg.cmdLn; @returns( "eax" ); arg.a_cmdLn; @returns( "eax" );
arg.c; @returns( "eax" );
arg.v( index:uns32 ); @returns( "eax" ); arg.a_v( index:uns32 ); @returns( "eax" );
arg.args;
arg.delete( index:uns32 )
arg.destroy( index:uns32 )
arg.globalOptions( options:cset)
arg.localOptions( index:uns32; options:cset );
The Console Module (console.hhf)
- Cursor Positioning Functions
procedure console.gotoxy( x:dword; y:dword ); procedure console.gotorc( y:dword; x:dword );
procedure console.up;
procedure console.nup( n:uns32 );
procedure console.down;
procedure console.ndown( n:uns32 );
procedure console.left;
procedure console.nleft( n:uns32 );
procedure console.right;
procedure console.nright( n:uns32 );
procedure console.saveCursor;
procedure console.restoreCursor;
- Console Clearing Functions
procedure console.home; procedure console.cls;
procedure console.clrToEOLN;
procedure console.clrToBOLN;
procedure console.clrToBOLN;
procedure console.clrLn;
procedure console.clrToEOScrn;
procedure console.clrToBOScrn;
- Character Insertion/Removal
procedure console.insertChar;
procedure console.insertChars( n:dword );
procedure console.insertLine;
procedure console.insertLines( n:dword );
procedure console.deleteChar;
procedure console.deleteChars( n:word );
procedure console.deleteLine;
procedure console.deleteLines( n:word );
- Console Output Colors
procedure console.setAttrs( foreground:uns32; background:uns32 );
- Console Scrolling Functions
procedure console.scrollUp;
procedure console.scrollDn;
Control Structures (hll.hhf)
The switch/case/default/endswitch Statement
Conversions (conv.hhf)
- Conversion Format Control
conv.setUnderscores( OnOff: boolean ) conv.getUnderscores; @returns( "eax" );
- Hexadecimal Conversions
conv.byteToHex( b:byte in al );
- Hexadecimal Numeric to String Convesions
conv.bToStr ( b:byte; size:dword; fill:char; buffer:string ); 35conv.strTob( s:string; index:dword ) 36
- Hexadecimal String to Numeric Conversions
- Integer Conversions
- Integer Size Calculations
conv.i8Size( b:byte in al ) 36conv.i8ToBuf( i8:int8 in al ) 37 conv.u8ToBuf( u8: uns8 in al ) 37
- Integer Numeric to String Conversions
conv.atou( bufPtr: dword in esi ); 38 conv.strTob( s:string; index:dword ) 38 conv.strToi8( s:string; index:dword ) 38 conv.strTou8( s:string; index:dword ) 38
- Integer String to Numeric Conversions
- Floating Point Conversions
- Floating Point Numeric to String Conversions, Exponential Form
conv.e80ToStr 39 conv.e64ToStr 40 conv.e32ToStr 40conv.r80ToStr 41 conv.r64ToStr 41 conv.r32ToStr 42
- Floating Point Numeric to String Conversions, Decimal Form
- Floating Point String to Numeric Conversions
conv.atof( bufptr: dword in esi ); @returns( "st0" );
- Zero Terminated String Conversions
conv.cStrToStr( var buffer:var; dest:string )
conv.a_cStrToStr( var buffer:var )
- Roman Numeral Conversion
conv.roman( Arabic:uns32; rmn:string )
conv.a_roman( Arabic:uns32 )
The Coroutines Module (coroutines.hhf)
procedure coroutine.create( size:uns32; theProc:procedure );
procedure coroutine.cocall;
procedure coret;
method coroutine.cofree;
static mainPgm:coroutine; external( "?MainPgmCoroutine" );
The Date & Time Module (datetime.hhf)
- Date Functions
date.daterec
date.IsLeapYear( y:uns32 ) @returns( "al" ); 46 date.validate( m:byte; day:byte; year:word ); 46 date.isValid( m:byte; day:byte; year:word ); 46date.outputFormat
date.setFormat( fmt : OutputFormat );
date.setSeparator( chr:char );
date.toString( m:byte; d:byte; y:word; s:string ); 47 date.a_toString( m:byte; d:byte; y:word ); @returns( "eax" ); 47 date.print( m:byte; d:byte; y:word ); 47 date.Julian( m:byte; d:byte; y:word ); @returns( "eax" ); 47date.fromJulian( jd:uns32; var gd:date.daterec );
date.dayNumber( m:byte; d:byte; y:word ); @returns( "eax" ); 47 date.daysLeft( m:byte; d:byte; y:word ); @returns( "eax" ); 48 date.dayOfWeek( m:byte; d:byte; y:word ); @returns( "eax" ); 48 date.daysBetween( m1:byte; d1:byte; y1:word; m2:byte; d2:byte; y2:word ); 48 date.daysBetween( m1:byte; d1:byte; y1:word; dr:date.daterec ); 48 date.daysBetween( dr:date.daterec; m:byte; d:byte; y:word ); 48 date.daysBetween( dr1:date.daterec; dr2:date.daterec ); 48date.datePlusDays( days:uns32; var dr:date.daterec );
date.datePlusMonths( months:uns32; var dr:date.daterec );
date.today( var dr:date.daterec );
- Time Functions
time.timerec
time.curTime( theTime: time.timerec );
time.hmsToSecs( theTime: time.timerec); @returns( "eax"); 49time.secsToHMS( seconds:uns32; var HMS:time.timerec );
Environment Strings (env.hhf)
- Retrieving Environment Strings
env.get( envVar:string; dest:string ); 50 env.a_get( envVar:string ); 50Exceptions (excepts.hhf)
- Exception Constants
- ex.UnknownException (0)
- ex.StringOverflow (1)
- ex.StringIndexError (2)
- ex.ValueOutOfRange (3)
- ex.IllegalChar (4)
- ex.ConversionError (5)
- ex.BadFileHandle (6)
- ex.FileOpenFailure (7)
- ex.FileCloseError (8)
- ex.FileWriteError (9)
- ex.FileReadError (10)
- ex.DiskFullError (11)
- ex.EndOfFile (12)
- ex.MemoryAllocationFailure (13)
- ex.AttemptToDerefNULL (14)
- ex.CannotFreeMemory (15)
- ex.WidthTooBig (16)
- ex.TooManyCmdLnParms (17)
- ex.ArrayShapeViolation (18)
- ex.ArrayBounds (19)
- ex.InvalidDate (20)
- ex.InvalidDateFormat (21)
- ex.TimeOverflow (22)
- ex.AssertionFailed (23)
- ex.ExecutedAbstract (24)
- ex.AccessViolation ($c0000005)
- ex.Breakpoint ($80000003)
- ex.SingleStep ($80000004)
- ex.PrivInstr ($c0000096)
- ex.IllegalInstr ($c000001d)
- ex.BoundInstr ($c000008c)
- ex.IntoInstr ($c0000095)
- ex.DivideError ($c0000094)
- ex.fDenormal ($c000008d)
- ex.fDivByZero ($c000008e)
- ex.fInexactResult ($c000008f)
- ex.fInvalidOperation ($c0000090)
- ex.fOverflow ($c0000091)
- ex.fStackCheck ($c0000092)
- ex.fUnderflow ($c0000093)
- ex.InvalidHandle ($c0000008)
- ex.StackOverflow ($c00000fd)
- ex.ControlC ($c000013a)
- PrintExceptionError
- Assertions
- Miscellaneous
File Class (fileclass.hhf)
- General File Operations
filevar.create; @returns( "esi" ); 57filevar.handle; @returns( "eax" );
filevar.open( filename:string; access:dword )
filevar.openNew( filename:string )
filevar.close;
- File Class Output Routines
- Miscellaneous Output
filevar.write( var buffer:byte; count:dword )
filevar.putbool( b:boolean );
filevar.newln( );
- Character, Character Set, and String Output
filevar.putc( c:char )
filevar.putcSize( c:char; width:int32; fill:char )
filevar.putcset( cst:cset );
filevar.puts( s:string );
filevar.putsSize( s:string; width:int32; fill:char )
- Hexadecimal Numeric Output
filevar.putb( b:byte ) filevar.putbSize( b:byte; size:dword; fill:char )
filevar.putw( w:word ) filevar.putwSize( w:word; size:dword; fill:char )
filevar.putd( dw:dword ) filevar.putdSize( d:dword; size:dword; fill:char )
filevar.putq( qw:qword ) filevar.putqSize( q:qword; size:dword; fill:char )
filevar.puttb( tb:tbyte )
- Signed Integer Numeric Output
filevar.puti64Size( q:qword; width:int32; fill:char )
filevar.puti32Size( d:dword; width:int32; fill:char )
filevar.puti16Size( w:word; width:int32; fill:char )
filevar.puti8Size ( b:byte; width:int32; fill:char )
filevar.puti64( q:qword )
filevar.puti32( d:dword )
filevar.puti16( w:word )
filevar.puti8 ( b:byte )
- Unsigned Integer Numeric Output
filevar.putu64Size( q:qword; width:int32; fill:char )
filevar.putu32Size( d:dword; width:int32; fill:char )
filevar.putu16size( w:word; width:int32; fill:char )
filevar.putu8size( b:byte; width:int32; fill:char )
filevar.putu64( q:qword )
filevar.putu32( d:dword )
filevar.putu16( w:word )
filevar.putu8 ( b:byte )
- Floating Point Output
- Real Output Using Scientific Notation
filevar.pute80( r:real80; width:uns32 )
filevar.pute64( r:real64; width:uns32 )
filevar.pute32( r:real32; width:uns32 )
- Real Output Using Decimal Notation
filevar.putr80pad( r:real80; width:uns32; decpts:uns32; pad:char )
filevar.putr64pad( r:real64; width:uns32; decpts:uns32; pad:char )
filevar.putr32pad( r:real32; width:uns32; decpts:uns32; pad:char )
filevar.putr80( r:real80; width:uns32; decpts:uns32 )
filevar.putr64( r:real64; width:uns32; decpts:uns32 )
filevar.putr32( r:real32; width:uns32; decpts:uns32 )
- Generic File Output
filevar.put( parameter_list )
- File Input
- Generic File Input
filevar.read( var buffer:byte; count:dword )
filevar.readln
filevar.eoln
- Character and String Input
filevar.getc; @returns( "al" );
filevar.gets( s:string )
filevar.a_gets; @returns( "eax" );
- Signed Integer Input
filevar.geti8; @returns( "al" );
filevar.geti16; @returns( "ax" );
filevar.geti32; @returns( "eax" );
filevar.geti64( var q:qword );
- Unsigned Integer Input
filevar.getu8; @returns( "al" );
filevar.getu16; @returns( "ax" );
filevar.getu32; @returns( "eax" );
filevar.getu64( var q:qword );
- Hexadecimal Input
filevar.getb; @returns( "al" );
filevar.getw; @returns( "ax" );
filevar.getd; @returns( "eax" );
filevar.getq( var q:qword );
- Floating Point Input
filevar.getf; @returns( "st0" );
- Generic File Input
filevar.get( List_of_items_to_read );
The File I/O Module (fileio.hhf)
- General File I/O Functions
fileio.open( FileName: string; Access:dword ); @returns( "eax" );
fileio.openNew( FileName: string ); @returns( "eax" );
fileio.close( Handle:dword );
fileio.eof( Handle:dword ); @returns( "al" );
- Directory and File Manipulation Functions
fileio.rewind( Handle:dword ); @returns( "eax" );
fileio.append( handle:dword ); @returns( "eax" );
fileio.position( Handle:dword ); @returns( "eax" );
fileio.seek( Handle:dword; offset:dword ); @returns( "eax" );
fileio.rSeek( Handle:dword; offset:dword ); @returns( "eax" );
fileio.truncate( Handle:dword ); @returns( "eax" );
fileio.copy( source:string; dest:string; failIfExists:boolean ); @returns( "eax" );
fileio.move( source:string; dest:string ); @returns( "eax" );
fileio.delete( filename:string ); @returns( "eax" );
fileio.mkdir( dirname:string ); @returns( "eax" );
fileio.cd( dirname:string ); @returns( "eax" );
fileio.exists( pathname:string ); @returns( "eax" );
fileio.gwd( dest:string );
fileio.size( Handle:dword ); @returns( "eax" );
fileio.size( filename:string ); @returns( "eax" );
- File Output Routines
- Miscellaneous Output Routines
fileio.write( Handle:dword; var buffer:byte; count:uns32 )
fileio.newln( Handle:dword )
fileio.putbool( Handle:dword; b:boolean )
- Character, String, and Character Set Output Routines
fileio.putc( Handle:dword; c:char )
fileio.putcSize( Handle:dword; c:char; width:int32; fill:char )
fileio.putcset( Handle:dword; cs:cset )
fileio.puts( Handle:dword; s:string )
fileio.putsSize( Handle:dword; s:string; width:int32; fill:char )
- Hexadecimal Output Routines
fileio.putb( Handle:dword; b:byte ) fileio.putbSize( Handle:dword; b:byte; size:dword; fill:char )
fileio.putw( Handle:dword; w:word ) fileio.putwSize( Handle:dword; w:word; size:dword; fill:char )
fileio.putd( Handle:dword; dw:dword ) fileio.putdSize( Handle:dword; d:dword; size:dword; fill:char )
fileio.putq( Handle:dword; qw:qword ) fileio.putqSize( Handle:dword; q:qword; size:dword; fill:char )
fileio.puttb( Handle:dword; tb:tbyte )
fileio.putl( Handle:dword; l:lword ) fileio.putlSize( Handle:dword; l:lword; size:dword; fill:char )
- Signed Integer Output Routines
fileio.puti8Size ( Handle:dword; b:byte; width:int32; fill:char )
fileio.puti16Size( Handle:dword; w:word; width:int32; fill:char )
fileio.puti32Size( Handle:dword; d:dword; width:int32; fill:char )
fileio.puti64Size( Handle:dword; q:qword; width:int32; fill:char )
fileio.puti128Size( Handle:dword; l:lword; width:int32; fill:char )
fileio.puti8 ( Handle:dword; b:byte )
fileio.puti16( Handle:dword; w:word )
fileio.puti32( Handle:dword; d:dword )
fileio.puti64( Handle:dword; q:qword )
fileio.puti128( Handle:dword; l:lword )
- Unsigned Integer Output Routines
fileio.putu8Size( Handle:dword; b:byte; width:int32; fill:char )
fileio.putu16Size( Handle:dword; w:word; width:int32; fill:char )
fileio.putu32Size( Handle:dword; d:dword; width:int32; fill:char )
fileio.putu64Size( Handle:dword; q:qword; width:int32; fill:char )
fileio.putu128Size( Handle:dword; l:lword; width:int32; fill:char )
fileio.putu8 ( Handle:dword; b:byte )
fileio.putu16( Handle:dword; w:word )
fileio.putu32( Handle:dword; d:dword )
fileio.putu64( Handle:dword; q:qword )
fileio.putu128( Handle:dword; l:lword )
- Floating Point Output Routines
- Real Output Using Scientific Notation
fileio.pute80( Handle:dword; r:real80; width:uns32 )
fileio.pute64( Handle:dword; r:real64; width:uns32 )
fileio.pute32( Handle:dword; r:real32; width:uns32 )
- Real Output Using Decimal Notation
fileio.putr80pad( Handle:dword; r:real80; width:uns32; decpts:uns32; pad:char )
fileio.putr64pad( Handle:dword; r:real64; width:uns32; decpts:uns32; pad:char )
fileio.putr32pad( Handle:dword; r:real32; width:uns32; decpts:uns32; pad:char )
fileio.putr80( Handle:dword; r:real80; width:uns32; decpts:uns32 )
fileio.putr64( Handle:dword; r:real64; width:uns32; decpts:uns32 )
fileio.putr32( Handle:dword; r:real32; width:uns32; decpts:uns32 )
- Generic File Output Routine
fileio.put( list_of_items )
- File Input Routines
- General File Input Routines
fileio.read( Handle:dword; var buffer:byte; count:uns32 )
fileio.readLn( Handle:dword );
fileio.eoln( Handle:dword ); @returns( "al" );
- Character and String Input Routines
fileio.getc( Handle:dword ); @returns( "al" );
fileio.gets( Handle:dword; s:string );
fileio.a_gets( Handle:dword ); @returns( "eax" );
- Signed Integer Input Routines
fileio.geti8( Handle:dword ); @returns( "al" );
fileio.geti16( Handle:dword ); @returns( "ax" );
fileio.geti32( Handle:dword ); @returns( "eax" );
fileio.geti64( Handle:dword );
fileio.geti128( Handle:dword; var dest:lword );
- Unsigned Integer Input Routines
fileio.getu8( Handle:dword ); @returns( "al" );
fileio.getu16( Handle:dword ); @returns( "ax" );
fileio.getu32( Handle:dword ); @returns( "eax" );
fileio.getu64( Handle:dword );
fileio.getu128( Handle:dword; var dest:lword );
- Hexadecimal Input Routines
fileio.getb( Handle:dword ); @returns( "al" );
fileio.getw( Handle:dword ); @returns( "ax" );
fileio.getd( Handle:dword ); @returns( "eax" );
fileio.getq( Handle:dword );
fileio.getl( Handle:dword; var dest:lword );
- Floating Point Input
fileio.getf( Handle:dword );
- Generic File Input
fileio.get( List_of_items_to_read );
The Linux Module (linux.hhf)
The Lists Module (lists.hhf)
- List Maintenance
procedure list.create; @returns( "esi" );
method list.destroy;
- Adding Nodes to a List
method list.append_index( var n:node; posn: dword ); @returns( "esi" );
method list.append_node( var n:node; var after: node ); @returns( "esi" );
method list.append_last( var n:node ); @returns( "esi" );
method list.insert_index( var n:node; posn:dword ); @returns( "esi" );
method list.insert_node( var n:node; var before:node ); @returns( "esi" );
method list.insert_first( var n:node ); @returns( "esi" );
- Removing Nodes from a List
method list.delete_index( posn:dword ); @returns( "esi" );
method list.delete_node( var n:node ); @returns( "esi" );
method list.delete_first; @returns( "esi" );
method list.delete_last; @returns( "esi" );
- Accessing Nodes in a List
method list.index( posn:dword ); @returns( "esi" );
iterator list.itemInList;
method list.numNodes; @returns( "eax" );
Mathematical Functions, Trigonometic and Logarithmic (math.hhf)
math.cot; @returns( "st0" ); // Macro that overloads the following functions: 97 math._cot; @returns( "st0" ); 97math.csc
math._csc; @returns( "st0" ); 97math.sec
math._sec; @returns( "st0" ); 97math.asin
math._asin; @returns( "st0" ); 98math.acos
math._acos; @returns( "st0" ); 98math.acot
math._acot; @returns( "st0" ); 98math.acsc
math._acsc; @returns( "st0" ); 99math.asec
math._asec; @returns( "st0" ); 99math.twoToX
math._twoToX; @returns( "st0" ); 99math.TenToX
math._tenToX; @returns( "st0" ); 99math.exp
math._exp; @returns( "st0" ); 100math.ytoX; @returns( "st0" );
math._yToX; // Y is at ST1, X is at ST0. 100math.log
math._log; @returns( "st0" ); 100math.ln
math._ln; @returns( "st0" ); 101Memory Allocation (memory.hhf)
- Generic Memory Allocation
mem.alloc( size:dword ); @returns( "eax" );
malloc( size:dword ); @returns( "eax" ); // Depreciated name
mem.zalloc( size:dword ); @returns( "eax" );
mem.free( memptr:dword );
free( memptr:dword ); // Depreciated name
mem.realloc( memptr:dword; newsize:dword ); @returns( "eax" );
realloc( memptr:dword; newsize:dword ); @returns( "eax" ); // Depreciated name
mem.talloc( size ); (returns "eax" as macro result)
talloc( size ); (returns "eax" as macro result) // Depreciated name
mem.isInHeap( memptr:dword );
isInHeap( memptr:dword ); // Depreciated name
mem.stat;
mem.newref( memblk:dword );
mem.getref( memblk:dword );
iterator mem.blockInHeap;
iterator mem.freeBlockInHeap;
- String Memory Allocation
str.alloc( size:dword ); @returns( "eax" ); 104 stralloc( size:dword ); @returns( "eax" ); // Depreciated name 104str.talloc( size ); (returns pointer to new string in EAX ).
tstralloc( size ); (returns pointer to new string in EAX ). // Depreciated name
str.newref( memblk:dword );
str.getref( memblk:dword );
Memory Mapped I/O (MMAP.HHF)
filePtr:dword;
fileSize:dword;
endFilePtr:string;
procedure mmap.create;
method mmap.destroy;
method mmap.openNew( filename:string; maxSize:dword );
method mmap.open( filename:string; Access:dword );
method mmap.close;
method mmap.getFileName;
method mmap.getOpen;
method mmap.getMalloc;
OS Support Routines
- SYSTEM Function
HLA Pattern Matching Routines (patterns.hhf)
- Pat.match and Pat.endmatch Syntax
- Alternation
- Pattern Matching Macros
pat.EOS
pat.position( n )
pat.atPos( n )
pat.skip( n )
pat.getPos( dest )
pat.fail
pat.fence
pat.onePat;
<< pattern matching statements >>
pat.endOnePat;
pat.zeroOrOnePat;
<< pattern matching statements >>
pat.endZeroOrOnePat;
pat.zeroOrMorePat;
<< pattern matching statements >>
pat.endZeroOrMorePat
pat.oneOrMorePat
<< pattern matching statements >>
pat.endOneOrMorePat
- Pattern Matching Functions
- Character Set Matching Procedures
procedure pat.peekCset( cst:cset );
procedure pat.oneCset( cst:cset );
procedure pat.upToCset( cst:cset );
procedure pat.zeroOrOneCset( cst:cset )
procedure pat.l_ZeroOrOneCset( cst:cset )
procedure pat.zeroOrMoreCset( cst:cset );
procedure pat.l_ZeroOrMoreCset( cst:cset );
procedure pat.oneOrMoreCset( cst:cset );
procedure pat.l_OneOrMoreCset( cst:cset );
procedure pat.exactlyNCset( cst:cset; n:uns32 );
procedure pat.firstNCset( cst:cset; n:uns32 ); external;
procedure pat.norLessCset( cst:cset; n:uns32 );
procedure pat.l_NorLessCset( cst:cset; n:uns32 );
procedure pat.norMoreCset( cst:cset; n:uns32 );
procedure pat.l_NorMoreCset( cst:cset; n:uns32 );
procedure pat.ntoMCset( cst:cset; n:uns32; m:uns32 );
procedure pat.l_NtoMCset( cst:cset; n:uns32; m:uns32 ); external;
procedure pat.exactlyNtoMCset( cst:cset; n:uns32; m:uns32 );
procedure pat.l_ExactlyNtoMCset( cst:cset; n:uns32; m:uns32 ); external;
- Character Matching Procedures
procedure pat.peekChar( c:char );
procedure pat.oneChar( c:char );
procedure pat.upToChar( c:char );
procedure pat.zeroOrOneChar( c:char );
procedure pat.l_ZeroOrOneChar( c:char );
procedure pat.zeroOrMoreChar( c:char );
procedure pat.l_ZeroOrMoreChar( c:char );
procedure pat.oneOrMoreChar( c:char );
procedure pat.l_OneOrMoreChar( c:char );
procedure pat.exactlyNChar( c:char; n:uns32 );
procedure pat.firstNChar( c:char; n:uns32 );
procedure pat.norLessChar( c:char; n:uns32 );
procedure pat.l_NorLessChar( c:char; n:uns32 );
procedure pat.norMoreChar( c:char; n:uns32 );
procedure pat.ntoMChar( c:char; n:uns32; m:uns32 );
procedure pat.l_NtoMChar( c:char; n:uns32; m:uns32 );
procedure pat.exactlyNtoMChar( c:char; n:uns32; m:uns32 );
procedure pat.l_ExactlyNtoMChar( c:char; n:uns32; m:uns32 );
- Case Insensitive Character Matching Routines
procedure pat.peekiChar( c:char );
procedure pat.oneiChar( c:char );
procedure pat.upToiChar( c:char );
procedure pat.zeroOrOneiChar( c:char );
procedure pat.l_ZeroOrOneiChar( c:char );
procedure pat.zeroOrMoreiChar( c:char );
procedure pat.l_ZeroOrMoreiChar( c:char );
procedure pat.oneOrMoreiChar( c:char );
procedure pat.l_OneOrMoreiChar( c:char );
procedure pat.exactlyNiChar( c:char; n:uns32 );
procedure pat.firstNiChar( c:char; n:uns32 );
procedure pat.norLessiChar( c:char; n:uns32 );
procedure pat.l_NorLessiChar( c:char; n:uns32 );
procedure pat.norMoreiChar( c:char; n:uns32 );
procedure pat.l_NorMoreiChar( c:char; n:uns32 );
procedure pat.ntoMiChar( c:char; n:uns32; m:uns32 );
procedure pat.l_NtoMiChar( c:char; n:uns32; m:uns32 );
procedure pat.exactlyNtoMiChar( c:char; n:uns32; m:uns32 );
procedure pat.l_ExactlyNtoMiChar( c:char; n:uns32; m:uns32 );
- String matching procedures
procedure pat.matchStr( s:string );
procedure pat.matchToStr( s:string );
procedure pat.upToStr( s:string );
procedure pat.matchToiStr( s:string );
procedure pat.upToiStr( s:string );
procedure pat.matchWord( s:string );
procedure pat.matchiWord( s:string );
procedure pat.getWordDelims( var cst:cset );
procedure pat.setWordDelims( cst:cset);
- String Extraction Procedures
procedure pat.extract( s:string );
procedure pat.a_extract( var s:string );
- Whitespace and End of String Matching Procedures
procedure pat.getWhiteSpace( var cst:cset );
procedure pat.setWhiteSpace( cst:cset);
procedure pat.zeroOrMoreWS;
procedure pat.oneOrMoreWS;
procedure pat.WSorEOS;
procedure pat.WSthenEOS;
procedure pat.peekWS;
procedure pat.peekWSorEOS;
- Match an Arbitrary Sequence of Characters
procedure pat.arb;
procedure pat.l_arb; external;
- Writing Your Own Pattern Matching Routines
Random Number Generators (rand.hhf)
rand.randomize;
rand.uniform; @returns( "eax" );
rand.urange( startRange:int32; endRange:int32 ); @returns( "eax" );
rand.random; @returns( "eax" );
rand.range( startRange:int32; endRange:int32 ); @returns( "eax" );
rand.deal( count:uns32 ); // Iterator returns value in EAX.
Standard Input Routines (stdin.hhf)
- General Input Functions
stdin.handle; @returns( "eax" );
stdin.flushInput;
stdin.read( Handle:dword; var buffer:byte; count:uns32 )
stdin.readLn;
stdin.eoln; @returns( "al" ); 138
- Character and String Input Functions
stdin.peekc; @returns( "al" );
stdin.getc; @returns( "al" );
stdin.gets( s:string );
stdin.a_gets; @returns( "eax" );
- Hexadecimal Input Functions
stdin.getb; @returns( "al" );
stdin.getw; @returns( "ax" );
stdin.getd ; @returns( "eax" );
stdin.getq; @returns( "edx:eax" );
This function reads a 64-bit hexadecimal integer in the range 0..$FFFF_FFFF_FFFF_FFFF from the file. The number may begin with any number of delimiter characters (see the conv.setDelimiter and conv.getDelimiter functions for details on the delimiter characters) followed by a string of one or more hexadecimal digits. Note that the value may not have a leading "$" unless you add this character to the delimiter character set. The number must end with a valid delimiter character or the end of the file. This function allows underscores in the interior of the number. The stdin.getq function raises an appropriate exception if the input violates any of these rules or the value is outside the range 0..$FFFF_FFFF_FFFF_FFFF. This function returns the 64-bit result in EDX:EAX.
stdin.getl( l:lword ) ;
- Signed Integer Input Functions
stdin.geti8; @returns( "al" );
stdin.geti16; @returns( "ax" );
stdin.geti32; @returns( "eax" );
stdin.geti64; @returns( "edx:eax" );
stdin.geti128( var l: lword );
- Unsigned Integer Input Routines
stdin.getu8; @returns( "al" );
stdin.getu16; @returns( "ax" );
stdin.getu32; @returns( "eax" );
stdin.getu64; @returns( "edx:eax" );
stdin.getu128( var q:qword );
- Floating Point Input
stdin.getf; @returns( "st0" );
Standard Output Routines (stdout.hhf)
- General Output Functions
stdout.handle; @returns( "eax" );
stdout.write( Handle:dword; var buffer:byte; count:uns32 )
stdout.newln;
- Boolean Output
stdout.putbool( b:boolean );
- Character, String, and Cset Output
stdout.putcset( cs:cset );
stdout.putc( c:char );
stdout.putcSize( c:char; width:int32; fill:char );
stdout.puts( s:string );
stdout.putsSize( s:string; width:int32; fill:char );
- Hexadecimal Output
stdout.putb( b:byte ); stdout.putbSize( b:byte; size:dword; fill:char)
stdout.putw( w:word ); stdout.putwSize( w:word; size:dword; fill:char)
stdout.putd( dw:dword ); stdout.putdSize( d:dword; size:dword; fill:char)
stdout.putq( qw:qword ); stdout.putqSize( q:qword; size:dword; fill:char)
stdout.puttb( tb:tbyte );
stdout.putl( l:lword ); stdout.putlSize( l:lword; size:dword; fill:char)
- Signed Integer Output
stdout.puti8size ( b:byte; width:int32; fill:char );
stdout.puti16Size( w:word; width:int32; fill:char );
stdout.puti32Size( d:dword; width:int32; fill:char );
stdout.puti64Size( q:qword; width:int32; fill:char );
stdout.puti128Size( l:lword; width:int32; fill:char );
stdout.puti8 ( b:byte );
stdout.puti16( w:word );
stdout.puti32( d:dword );
stdout.puti64( q:qword );
stdout.puti128( l:lword );
- Unsigned Integer Output
stdout.putu8Size ( b:byte; width:int32; fill:char );
stdout.putu16Size( w:word; width:int32; fill:char );
stdout.putu32Size( d:dword; width:int32; fill:char );
stdout.putu64Size( q:qword; width:int32; fill:char );
stdout.putu128Size( l:lword; width:int32; fill:char );
stdout.putu8 ( b:byte );
stdout.putu16( w:word );
stdout.putu32( d:dword );
stdout.putu64( d:dword );
stdout.putu128( d:dword );
- Floating Point Output
- Real Output Using Scientific Notation
stdout.pute80( r:real80; width:uns32 );
stdout.pute64( r:real64; width:uns32 );
stdout.pute32( r:real32; width:uns32 );
- Real Output Using Decimal Notation
stdout.putr80pad( r:real80; width:uns32; decpts:uns32; pad:char );
stdout.putr64pad( r:real64; width:uns32; decpts:uns32; pad:char );
stdout.putr32pad( r:real32; width:uns32; decpts:uns32; pad:char );
stdout.putr80( r:real80; width:uns32; decpts:uns32 );
stdout.putr64( r:real64; width:uns32; decpts:uns32 );
stdout.putr32( r:real32; width:uns32; decpts:uns32 );
- The stdout.put Macro
stdout.put( output_list );
Strings (strings.hhf)
- String Allocation Macros and Functions
str.strvar( size )
str.init( var b:var; numBytes:dword ); @returns( "eax" );
- String Length Calculation
str.length( src ); @returns( "eax" );
str.mLength( src ); // returns the value in EAX
- String Assignment, Substring, and Concatenation Functions
str.cpy( src:string; dest:string );
str.a_cpy( src:string ); @returns( "eax" );
str.setstr( src:char; dest:string; cnt:uns32 ); 155 str.cat( src:string; dest:string ) 155
- String Comparison, Search, and Scanning Functions
str.eq( left:string; right:string ); @returns( "al" );
str.ne( left:string; right:string ); @returns( "al" );
str.lt left:string; right:string ); @returns( "al" );
str.le( left:string; right:string ); @returns( "al" );
str.gt( left:string; right:string ); @returns( "al" );
str.ge( left:string; right:string ); @returns( "al" );
str.ieq( left:string; right:string ); @returns( "al" );
str.ine( left:string; right:string ); @returns( "al" );
str.ilt left:string; right:string ); @returns( "al" );
str.ile( left:string; right:string ); @returns( "al" );
str.igt( left:string; right:string ); @returns( "al" );
str.ige( left:string; right:string ); @returns( "al" );
str.index( src1:string; src2:string ); @returns( "eax" ); 156 str.iindex( src1:string; src2:string ); @returns( "eax" ); 156 str.index2( src1:string; offs:uns32; src2:string ); @returns( "eax" ); 156 str.iindex2( src1:string; offs:uns32; src2:string ); @returns( "eax" ); 157str.rindex( src1:string; src2:string ); @returns( "eax" );
str.irindex( src1:string; src2:string ); @returns( "eax" );
str.rindex2( src1:string; offs:uns32; src2:string ); @returns( "eax" );
str.irindex2( src1:string; offs:uns32; src2:string ); @returns( "eax" );
str.prefix( src1:string; src2:string ); @returns( "al" ); 157 str.prefix2( src1:string; offs:uns32; src2:string ); @returns( "al" ); 157 str.iprefix( src1:string; src2:string ); @returns( "al" ); 157 str.iprefix2( src1:string; offs:uns32; src2:string ); @returns( "al" ); 157str.chpos( src1:string; src2:char ); @returns( "eax" );
str.chpos2( src1:string; offs:uns32; src2:char ); @returns( "eax" );
str.rchpos( src1:string; src2:char ); @returns( "eax" );
str.rchpos2( src1:string; offs:uns32; src2:char ); @returns( "eax" );
str.span( src1: string; src2:cset ); @returns( "eax" );
str.span2( src1: string; start:int32; src2:cset ); @returns( "eax" );
str.rspan( src1: string; src2:cset ); @returns( "eax" ); 158str.brk( src1: string; src2:cset ); @returns( "eax" );
str.brk2( src1: string; start:int32; src2:cset ); @returns( "eax" );
str.rbrk( src1: string; src2:cset ); @returns( "eax" ); 158str.tokenize( src: string; var dest:dword ); @returns( "eax" );
- String Insertion, Deletion and Extraction Functions
str.substr( src:string; dest:string; start:dword; len:dword )
str.a_substr( src:string; start:dword; len:dword ); @returns( "eax" );
str.insert( src:string; dest:string; start:dword )
str.a_insert( src1:string; src2:string; start:dword ); @returns( "eax" );
str.delete( dest:string; start:dword; length:dword )
str.a_delete( src:string; start:dword; length:dword ); @returns( "eax" );
str.truncate( dest:string; length:dword )
str.a_truncate( src:string; start:dword; length:dword ); @returns( "eax" );
str.replace( dest: string; fromStr:string; toStr:string ) 160
- String Conversion Functions
str.upper( dest: string ) 161 str.delspace( dest: string ) 161 str.trim( dest: string ) 161
- String Construction Functions
- Boolean Concatenation Function
str.catbool( b:boolean; dest:string );
- Character and String Concatenation Functions
str.catc( c:char; dest:string );
str.catcSize( c:char; width:int32; fill:char; dest:string );
str.cats( s:string; dest:string );
str.catsSize( s:string; width:int32; fill:char; dest:string );
str.catcset( c:cset; dest:string );
- Hexadecimal String Concatentation Functions
str.catb( b:byte; dest:string ); str.catbSize( b:byte; size:dword; fill:char )
str.catw( w:word; dest:string ); str.catwSize( w:word; size:dword; fill:char )
str.catd( d:dword; dest:string ) str.catdSize( d:dword; size:dword; fill:char )
str.catq( q:qword; dest:string ) str.catqSize( q:qword; size:dword; fill:char )
- Unsigned Integer String Concatenation Functions
str.catu8size 163 str.catu16size 163 str.catu32size 164 str.catu64size 164str.catu8( u8:byte; dest:string );
str.catu16( u16:word; dest:string );
str.catu32( u32:dword; dest:string );
str.catu64( u64:qword; dest:string );
- Signed Integer String Concatenation Functions
str.cati8size 165 str.cati16size 165 str.cati32size 166 str.cati64size 166str.cati8( i8:byte; dest:string );
str.cati16( i16:word; dest:string ); 166str.cati32( i32:dword; dest:string );
str.cati64( i64:qword; dest:string );
- Floating Point String Concatenation Using Scientific Notation
str.cate80 167 str.cate64 167 str.cate32 168str.catr80 169 str.catr64 169 str.catr32 169
- Floating Point String Concatentation Using Decimal Notation
- Generic String Formatting Function
str.put( dest:string, values_to_convert );
- Zero-Terminated String Support
- ZString Length
str.zlen( var zstring:var ); @returns( "eax" );
- Converting a ZString to an HLA String
str.cpyz( var zsrc:var; dest:string ); str.a_cpyz( var zsrc:var ); @returns( "eax" );
- Concatenting a ZString to the End of an HLA String
- Copying a ZString
- Concatenating ZStrings
- Comparing ZStrings
HLA Table Support (tables.hhf)
table.create( HashSize:uns32 );
table.destroy( FreeValue:procedure );
table.lookup( id:string );
table.getNode( id:string );
table.item;
The HLA Timer Module (timer.hhf)
timer.Accumulated
timer.DateStarted 180timer.Running
timer.create;
timer.start;
timer.checkPoint;
timer.restart;
Win32 Constants (win32.hhf)
![]() |
![]() |
![]() |
![]() |
![]() |