27 lines
253 B
ArmAsm
27 lines
253 B
ArmAsm
|
|
//
|
|
// Sets .X to number of open RS-232 channels
|
|
//
|
|
|
|
|
|
#if HAS_RS232
|
|
|
|
|
|
rs232_count_channels:
|
|
|
|
ldx #$00
|
|
ldy LDTND
|
|
!:
|
|
dey
|
|
bmi close_rs232_search_done
|
|
lda FAT, y
|
|
cmp #$02
|
|
bne !-
|
|
inx
|
|
bpl !- // branch always
|
|
|
|
rts
|
|
|
|
|
|
#endif
|