Changes to I/O access

This commit is contained in:
Wayne Parham
2021-06-09 10:23:42 -05:00
parent 2a25921515
commit 7d6541274d
8 changed files with 219 additions and 583 deletions

View File

@@ -29,7 +29,11 @@ begin: dec ptr2
beq done ; If buffer full, return
getch: jsr INTCHR ; Get character using Monitor ROM call
and #$7F ; Clear hi bit
jsr OUTCHR ; Echo it
and #$7F ; Clear hi bit and check for '\r'
cmp #$0D
bne putch
lda #$0A ; Replace with '\n' and set count to zero
putch: ldy #$00 ; Put char into return buffer
sta (ptr1),y