
Instruction

  CASEx

    Purpose:        perform multi-way branching depending on arithmetic
                    input
    Format:         opcode selector.rx,base.rx,limit.rx,disp[0].bw,...,
                    disp[limit].bw
    Operation:      tmp = selector - base; PC = PC + if tmp LEQU limit
                    then SEXT (displ[tmp]) else {2 + 2*ZEXT (limit)}
    C. Codes:       N = {tmp LSS limit}, Z = {tmp EQL limit}, V = 0,
                    C = {tmp LSSU limit}
    Exceptions:     None
    Opcodes:        8F    CASEB    Case byte [780-2.40]
                    AF    CASEW    Case word [780-2.40]
                    CF    CASEL    Case long [780-2.20]
    Description:    base is subtracted from selector and tmp is replaced
                    by the result. The temporary tmp is compared with
                    limit and if it is less than or equal (unsigned) a
                    branch displacement is selected by tmp added to PC
                    and PC is replaced by the result. Otherwise 2 *
                    (limit+1) is added to PC and the result is placed
                    in PC. This causes PC to be moved past the table of
                    branch displacements. The condition codes are always
                    affected by the comparison of tmp with limit.
    Notes:          The times shown assume the branch is taken. If the
                    branch is not taken the time for all CASE
                    instructions is [780-2.20].

