Knowledge Base

Builder: Standard segment names

You are free to invent your own segment names for use with Builder. The only exception is that there is one special, predefined segment called -UNAMED- which captures anything in your source files that appears before a <…> segment tag and emits them first.

In any library functions that we make we will stick as far as possible to the following list of names. It’s a good idea if you use the same names for corresponding function.

DOCCOSEGContains any documentation on how to use a library file. DISCARD from your builds
IOSEGInput and output assignments, including analogs
CONSTSEGConstant values, for example time intervals
MEQUSEGContains any mEQU RAM allocations (say for PermStore). Must appear before any defBYTEdefFloatdefSEM etc automatic RAM allocations.
DEFSEGContains automatic RAM allocations defBYTEdefSEM etc. use this only if your prefer (stylistically) to have all your RAM allocations near the start of your program.
TESTSEGTest code that should always be DISCARDed from production builds
INITSEGInitialize code – stuff that should run once at startup. Generally calls initialize routines for various modules/objects.
LAUNCHSEGContains a RunTasksForever to start up MultiTrack. Should be used in .b1d files with ONEONLY
CODESEGActual active code. May also contain defXXX memory allocations if you prefer having them inside the module that owns them (c.f. near the top of your program.)
NVEM0DIRContains a NVEM0 directive. Should be used in .b1d files with ONEONLY Must appear before any other NVEM related segment.
NVEM0DATAContains NVEM page 0 tables or data.
XWIREINITContains an instruction (typically XwireMaster XwireTab) that will start up Xwire using the configuration data located under the label XwireTab in NVEM0. Should be used in .b1d files with ONCEINLINE. Used by any of our library of Active Template modules that use Xwire.
XWIREMTABContains the line label (typically XwireTab)in NVEM0 that signals the Xwire configuration table. Should be used in .b1d files with ONEONLY. Used by any of our library of Active Template modules that use Xwire.
XWIREMDATAContains configuration data, in NVEM0, for Xwire master operation. Used by any of our library of Active Template modules that use Xwire.
XWIREMENDContains an end of table sentinel for Xwire master configuration data. Should be used in .b1d files with ONEONLY. Used by any of our library of Active Template modules that use Xwire
DEBUG1Only ever used in <=IF tags. If enabled switches on debug features to help you debug your system.
DEBUG2Only ever used in <=IF tags. If enabled switches on debug features to help you debug your system.
DEBUG3Only ever used in <=IF tags. If enabled switches on debug features to help you debug your system.

Note that Builder will raise an error if there is a segment name in a .spt file that is not listed in the .b1d file, i.e. you must explicitly DISCARD unwanted segments. The inverse is not the case: you can have segment names in the .b1d file that do not exist in any .spt file.