1.2.2.5 Variables for internal use

Variables may be used to store intermediate values in the driver. For instance, a bit field status value may be read into a variable and then interpreted using the BITSET command.

Variables for internal use must be declared READONLY to work properly. Even though not required, it is recommended to give these variables a descriptive name which tells about the internal usage of this variable. The following example is taken from the SSE KStar device driver:

    VAR internal.state HEX 0 0 " " READONLY   CYCLE 2

    ...

    PROC GET WATCH internal.state
        PRINT "AL"
        INPUT "=" internal.state
        BITSET faults.01 = internal.state 9
        BITSET faults.02 = internal.state 15
        BITSET faults.03 = internal.state 11

    ...