A method and system are provided for controlling a computer, data, or
media system in response to state changes in the computer system. At
least one state table having a first dimension and a second dimension is
created. At least one programming element is listed along the first
dimension and a plurality of states of the computer system are listed
along the second dimension. At each intersection of the first dimension
and the second dimension is a cell in which an operand is specified for
the programming element at each state. For each state change of the
computer system, each programming element listed along the first
dimension is executed according to the operand listed for a current
state.