     $D137/53559:   Get a byte from buffer

    Jump from $D0A4, $D0A9, $D156, $D172, $D17B, $D192, $D433, $DAAA, $DE9A,
              $DE9F, $ED67, $EDF3, $EDF8:

    D137: 20 2F D1  JSR $D12F       ; get buffer and channel number
    D13A: B9 44 02  LDA $0244,Y     ; end pointer
    D13D: F0 12     BEQ $D151
    D13F: A1 99     LDA ($99,X)     ; get byte from buffer
    D141: 48        PHA
    D142: B5 99     LDA $99,X       ; buffer pointer
    D144: D9 44 02  CMP $0244,Y     ; equal end pointer?
    D147: D0 04     BNE $D14D       ; no
    D149: A9 FF     LDA #$FF
    D14B: 95 99     STA $99,X       ; buffer pointer to -1

    Jump from $D147:

    D14D: 68        PLA             ; data byte
    D14E: F6 99     INC $99,X       ; increment buffer pointer
    D150: 60        RTS

    Jump from $D13D:

    D151: A1 99     LDA ($99,X)     ; get character from buffer
    D153: F6 99     INC $99,X       ; increment buffer pointer
    D155: 60        RTS

        Previous Page / Next Page