     $D37F/54143:   Find channel and allocate

    Jump from $D1E9:

    D37F: A0 00     LDY #$00
    D381: A9 01     LDA #$01        ; set bit 0

    Jump from $D38A:

    D383: 2C 56 02  BIT $0256
    D386: D0 09     BNE $D391       ; channel free?
    D388: C8        INY
    D389: 0A        ASL             ; rotate bit to left
    D38A: D0 F7     BNE $D383       ; all channels checked?
    D38C: A9 70     LDA #$70
    D38E: 4C C8 C1  JMP $C1C8       ; 70, 'no channel'

    Jump from $D386:

    D391: 49 FF     EOR #$FF        ; rotate bit model
    D393: 2D 56 02  AND $0256       ; erase bit
    D396: 8D 56 02  STA $0256       ; allocate channel
    D399: 98        TYA
    D39A: 60        RTS

        Previous Page / Next Page