next up previous contents
Next: 15 IC File Formats Up: 14 Binary Programs Previous: 14.4 Loading an ICB

14.5 Passing Array Pointers to a Binary Program

A pointer to an array is a 16-bit integer address. To coerce an array pointer to an integer, use the following form:

array_ptr= (int) array;

where array_ptr is an integer and array is an array.

When compiling code that performs this type of pointer conversion, IC \ must be used in a special mode. Normally, IC does not allow certain types of pointer manipulation that may crash the system. To compile this type of code, use the following invokation:

ic -wizard

Arrays are internally represented with a two-byte length value followed by the array contents.



Fred G. Martin
Fri Mar 29 17:44:15 EST 1996