Upload files to "kernal"
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
.segment "NBSOUT"
|
||||
;***************************************
|
||||
;* bsout -- out character to channel *
|
||||
;* determined by variable dflto: *
|
||||
;* 0 -- invalid *
|
||||
;* 1 -- cassette #1 *
|
||||
;* 2 -- rs232 *
|
||||
;* 3 -- screen *
|
||||
;* 4-31 -- serial bus *
|
||||
;***************************************
|
||||
;
|
||||
nbsout pha ;preserve .a
|
||||
lda dflto ;check device
|
||||
cmp #3 ;is it the screen?
|
||||
;print to crt
|
||||
;
|
||||
pla ;restore data
|
||||
jmp prt ;print on crt
|
||||
;
|
||||
;
|
||||
;print to serial bus
|
||||
;
|
||||
pla
|
||||
jmp ciout
|
||||
bcs rstor ;abort on stop key
|
||||
;
|
||||
;reset buffer pointer
|
||||
;
|
||||
iny ;make .y=1
|
||||
sty bufpt ;bufpt=1
|
||||
;
|
||||
;
|
||||
;print to crt
|
||||
;
|
||||
pla ;restore data
|
||||
jmp prt ;print on crt
|
||||
;
|
||||
;
|
||||
;print to serial bus
|
||||
;
|
||||
pla
|
||||
jmp ciout
|
||||
bcs rstor ;abort on stop key
|
||||
;
|
||||
;reset buffer pointer
|
||||
;
|
||||
iny ;make .y=1
|
||||
sty bufpt ;bufpt=1
|
||||
;
|
||||
;restore .x and .y
|
||||
;
|
||||
rstoa clc ;good return
|
||||
rstor pla
|
||||
tay
|
||||
pla
|
||||
tax
|
||||
lda t1 ;get .a for return
|
||||
bcc rstor1 ;no error
|
||||
lda #00 ;stop error if c-set
|
||||
rstor1 rts
|
||||
read rts
|
||||
wrtn rts
|
||||
wrtz rts
|
||||
Reference in New Issue
Block a user