CHEAP - steal space from the linkage area.

Usage:

[NAME,NAME,...]  cheap  size=>VALUE,align=>VALUE

Where:

[NAME,NAME,...]
gives the names of one or more variables to create in cheap storage. All of these will be created with the same size and alignment.
size=>VALUE
is the size of each variable to be created (in words). The default is one word.
align=>VALUE
is the alignment for each symbol. VALUE can be one of the token sequences "[even]" (for an even-word boundary) or "[odd]" (for an odd-word boundary). It can also be a number N (for an N-word boundary). The default is 1 (any word boundary).

Description:

"cheap" reserves space for local variables in the CHEAP storage section of a function's linkage area. This is on the stack, in memory that would normally be used if the current function called another function. If the current function makes no function calls, some of this linkage area may be used for local storage.

The amount of storage is very limited. An error message will be printed if "cheap" tries to reserve more storage than is available. A function may contain more than one call to "cheap", but will quickly run out of cheap storage.

Examples:

 [i,j]:  cheap
 #generates
 {  #start of code block
         .origin .ic(CHEAP)
         .align 1
     i:  .space 1
         .align 1
     j:  .space 1
 }
 .if   .ic(CHEAP)-.lowest(CHEAP) > S_SIZE
     .error .concat("Too many words of cheap storage")
 .endif

Copyright © 1996, Thinkage Ltd.