.segment "NBASIN" ;*************************************** ;* basin-- input character from channel* ;* input differs from get on device* ;* #0 function which is keyboard. the * ;* screen editor makes ready an entire * ;* line which is passed char by char * ;* up to the carriage return. other * ;* devices are: * ;* 0 -- keyboard * ;* 1 -- cassette #1 * ;* 2 -- rs232 * ;* 3 -- screen * ;* 4-31 -- serial bus * ;*************************************** ; nbasin lda dfltn ;check device bne bn10 ;is not keyboard... ; ;input from keyboard ; lda pntr ;save current... sta lstp ;... cursor column lda tblx ;save current... sta lsxp ;... line number jmp loop5 ;blink cursor until return ; bn10 cmp #3 ;is input from screen? bne bn20 ;no... ; sta crsw ;fake a carriage return lda lnmx ;say we ended... sta indx ;...up on this line jmp loop5 ;pick up characters ; bn20 bcs bn30 ;devices >3 cmp #2 ;rs232? ;input from serial bus bn30 lda status ;status from last beq bn35 ;was good bn31 lda #$d ;bad...all done bn32 clc ;valid data bn33 rts ; bn35 jmp acptr ;good...handshake