41. Branch to SubRoutine

41.1. Name

BSR -- Branch to subroutine

41.2. Synopsis

        BSR        <label>

        Size = (Byte, Word)
        Size = (Byte, Word, Long)        (68020+)

41.3. Function

Pushes the long word address which follows the BSR instruction to stack. Program execution continues at location (PC) + offset. Offset is the relative gap between PC value and label. This gap is calculated by complement to two and is coded on 8 bits or on 16 bits.

41.4. Format

        -----------------------------------------------------------------
        |15 |14 |13 |12 |11 |10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
        |---|---|---|---|---|---|---|---|-------------------------------|
        | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 |         8 BITS OFFSET         |
        |---------------------------------------------------------------|
        |            16 BITS OFFSET, IF 8 BITS OFFSET = $00             |
        |---------------------------------------------------------------|
        |            32 BITS OFFSET, IF 8 BITS OFFSET = $FF             |
        -----------------------------------------------------------------

41.5. Result

        None.

41.6. See also

JSR BRA RTS RTD RTR