Compare commits

...

2 Commits

2 changed files with 10 additions and 1 deletions

View File

@@ -48,10 +48,14 @@ INPLOOP
beq NOCHAR@ beq NOCHAR@
cmpa #$1B ; ESC? cmpa #$1B ; ESC?
beq HESC@ ; Handle ESC beq HESC@ ; Handle ESC
cmpa #$08 ; BS?
beq HBACKSPC@ ; Backup a char
cmpa #$0D ; CR? cmpa #$0D ; CR?
beq EXIT@ ; Then parse input buffer beq EXIT@ ; Then parse input buffer
cmpy #BBIN_DEPTH ; Are we at the end of the input buffer? cmpy #BBIN_DEPTH ; Are we at the end of the input buffer?
beq FULLBUF@ ; Handle the buffer being full beq FULLBUF@ ; Handle the buffer being full
ECHO@
jsr POUTCHAR ; Echo char back, this includes BS chars
sta BBIN_BASE,y ; Add it to the input buffer sta BBIN_BASE,y ; Add it to the input buffer
leay 1,y leay 1,y
NOCHAR@ NOCHAR@
@@ -81,6 +85,11 @@ HESC@
jsr POUTCHAR jsr POUTCHAR
ldy #$0000 ; On return we cmpy #$0000 and if eq then newline. ldy #$0000 ; On return we cmpy #$0000 and if eq then newline.
rts rts
HBACKSPC@
clrb ; Clear last char
leay -1,y
stb BBIN_BASE
bra ECHO@ ; Echo the char in A
FULLBUF@ FULLBUF@
lda #$07 ; ASCII BEL lda #$07 ; ASCII BEL
jsr POUTCHAR jsr POUTCHAR

View File

@@ -18,7 +18,7 @@
; RAM testing routine. Ported to 6809 from 6800, based on source for ROBIT-2 for ; RAM testing routine. Ported to 6809 from 6800, based on source for ROBIT-2 for
; MIKBUG. ; MIKBUG.
RAMTEST RAMTEST
ldx #SRAM_BASE ldx #STACK_TOP+1 ; bottom of testable SRAM, $0200
AGAIN@ ; Store 1 in memory AGAIN@ ; Store 1 in memory
lda #1 ; Set [X] to 1 lda #1 ; Set [X] to 1
sta 0,x sta 0,x