
CLK, DATA, SRQ, ATN

ENA_ATN_IRQ
DIS_ATN_IRQ
WAIT until      (mask, value, ticks)  ## wait until bits and mask == value, for at maximum ticks ticks (if mask=0 and value/=0 this can be used as plain wait)
WAIT until not  (mask, value, ticks)  ## wait until bits and mask /= value, for at maximum ticks ticks (see below)

IF              (mask, value, jump)   ## checks bits and mask == value, if true jump to addr
IF not          (mask, value, jump)   ## checks bits and mask == value, if false jump to addr
IF DATA         (<mask,value>,jump)   ## 8 bits data are encoded in mask and value together
IF DATA not     (<mask,value>,jump)   ## 8 bits data are encoded in mask and value together

SET             (mask, value)         ## changes bits according to mask and value
SHIFTOUT        (mask, invert)        ## mask determines what bits are combined (usually just one), invert optionally inverts
SHIFTIN         (mask, invert)        ## mask determines what bits are changed on output with out bit, optionally inverted

POP             ()                    ## gets data from fifo, or waits if there are none. (can also be used to sync with software)
PUSHD           ()                    ## puts data to fifo
PUSHC           ()                    ## puts a control character to fifo (up to software on how to use this)
LOAD #          (value)               ## added to output random sequences, or to push status bytes / debug values to fifo


Instruction encoding: <mask(4)> <value(4)> <ticks/jump (9)> <opcode (4)> = 21 bits

Ticks: All ticks are in s. Values > 256 are in steps of 16 s. (257 = 16s, 258 = 32s, ... 511 = 4.08 ms)

Easier to en/decode: 12 bits value operand such that asymetric encoding of time is not necessary.
Then total instruction is 24 bits.


