; OSI-specific BASIC support routines. Generated by disassembling code.

        L0207           := $0207
        L020A           := $020A
        LBF6D           := $BF6D
        LBFC2           := $BFC2
        LBFD5           := $BFD5
        LBFD8           := $BFD8
        LBFDE           := $BFDE

        * = $BEE2

        .byte   0, 0

LFE02:  lda     $BF05
        lsr     a
        bcc     LFE02
        lda     $FB03
        sta     $FB07
        and     #$7F
        rts

        pha
LFE12:  lda     $FB05
        bpl     LFE12
        pla
        sta     $FB04
        rts

        lda     $FB06
        lda     #$FF
        sta     $FB05
        rts

LFE25:  lda     $FC00
        lsr     a
        bcc     LFE25
        lda     $FC01
        beq     LFE25
        and     #$7F
        rts

        pha
LFE34:  lda     $FC00
        lsr     a
        lsr     a
        bcc     LFE34
        pla
        sta     $FC01
        rts

        lda     #$03
        sta     $FC00
        lda     #$B1
        sta     $FC00
        rts

        sta     $0202
        pha
        txa
        pha
        tya
        pha
        lda     $0202
        beq     LFE8B
        ldy     $0206
        beq     LFE65
LFE5D:  ldx     #$40
LFE5F:  dex
        bne     LFE5F
        dey
        bne     LFE5D
LFE65:  cmp     #$0A
        beq     LFE94
        cmp     #$0D
        bne     LFE73
        jsr     LBFD5
        jmp     LBF6D
LFE73:  sta     $0201
        jsr     LBFC2
        inc     $0200
        lda     $FFE1
        clc
        adc     $FFE0
        cmp     $0200
        bmi     LFE91
LFE88:  jsr     LBFDE
LFE8B:  pla
        tay
        pla
        tax
        pla
        rts

LFE91:  jsr     LBFD8
LFE94:  jsr     LBFC2
        lda     $FFE0
        and     #$E0
        sta     $0202
        ldx     #$07
LFEA1:  lda     $BFF3,x
        sta     L0207,x
        dex
        bpl     LFEA1
        ldx     $BFFB,y
        lda     #$20
        ldy     $FFE1
        cpy     #$20
        bmi     LFEB7
        asl     a
LFEB7:  sta     $0208
        ldy     #$00
LFEBC:  jsr     L0207
        bne     LFEBC
        inc     $0209
        inc     $020C
        cpx     $0209
        bne     LFEBC
LFECC:  jsr     L0207
        cpy     $0202
        bne     LFECC
        lda     #$20
LFED6:  jsr     L020A
        dec     $0208
        bne     LFED6
        beq     LFE88
        ldx     $0200
        lda     $0201
LFEE6:  ldy     $FFE2
        bne     LFEEF
        sta     $D300,x
        rts

LFEEF:  sta     $D700,x
        rts

        jsr     LBFC2
        lda     $FFE0
        sta     $0200
        ldx     $0200
        lda     $D300,x
        ldy     $FFE2
        beq     LFF0A
        lda     $D700,x
LFF0A:  sta     $0201
        lda     #$5F
        bne     LFEE6
        lda     $D000,y
        sta     $D000,y
        iny
        rts

        .byte   $D3
        .byte   $D7
        .byte   0, 0, 0
