HTBasic Help
×
Menu
Index

CSUB Overview

 
The CSUB Toolkit allows one to build compiled subprograms for HTBasic. A compiled subprogram, or CSUB, runs directly on the processor hardware and has access to all of it’s power and functionality. Many functions can be performed with CSUBs that otherwise would be impossible with BASIC programs.
 
Once built, a CSUB may be loaded into HTBasic with LOADSUB and deleted with DELSUB just as any other SUB program. CSUBs may be stored in a PROG file and loaded along with other subprograms.
 
The topics in this sedtion present the basic information required to write, test, and build a CSUB routine.
 
The following list explains what each topic describes.
 
CSUB Overview, contains information about the required tools, supported CSUB development languages, development support options, special projects support, distribution media, and installation instructions.
 
CSUB Environment, describes the CSUB execution environment, error reporting conventions, elements of a CSUB, and CSUB resource restrictions.
 
CSUB Parameters, describes how HTBasic passes CALL parameters to the CSUB, data and dimension pointer types, the dimension table, how to handle OPTIONAL arguments, and the NPAR value.
 
Building a CSUB, presents the steps required to build a CSUB for use with the HTBasic version.
 
COM Variables, describes the com_var function, used to locate COM memory variables, the movable nature of COM data, and the use of COM statements in CSUB prototype definitions. Two program examples are presented that demonstrate how to use the com_var function.
 
Display and Keyboard Routines, describes the display and keyboard routines available to a CSUB.
 
C Examples, provides simple C language CSUB examples. Also included is an example that defines several CSUBs combined into one CSUB context.
Include File Listings, lists the C language include files.