CHARACTER - overview of the character macros.

Description:

The B macro package supplies a set of macros for assembling ASCII text into your program in a relatively simple manner without requiring the programmer to count characters or remember octal equivalents.

The actual text data is never assembled at the location of the macro, but is collected under location counter "errtxt". A B pointer to the text string or a tallyb describing the text may be assembled at the current location.

Text representation:

Text strings are passed to the macros as a single argument enclosed in parentheses. Because all GMAP input is in BCD, some convention is needed to represent ASCII. Upper case characters are represented by preceding the character with a '%'. Control characters (octal values 000-037) are represented by preceding the character with a '^'. For example, the ASCII linefeed is control-j and is therefore represented as '^j'. The sequences '%%' and '%^' are used to represent the characters '%' and '^' respectively.

Brief descriptions:

There are five user-callable macros in the character macro set. These are CINIT, CFLUSH, CPACK, BSTR and BSTRNG. CINIT and CFLUSH are used to start and finish character processing. CPACK is used to build a tallyb to a string. The text from successive CPACK macros is tightly packed and does not necessarily start on word boundaries; instead, it starts at the next available character. BSTR contructs a B string and defines a label with the address of the string. BSTRNG constructs a B string and assembles a B pointer to the string.

Known Bugs:

There are several ASCII characters that cannot currently be repesented by this technique. The most noticeable is the character ')'. This can be fixed if there is a need.

Copyright © 1996, Thinkage Ltd.