Multiple bug fixes - stabilize scroll & shell

This commit is contained in:
stid 2020-01-20 13:51:37 -08:00
parent f56e35cb4e
commit 1796e04cd1
3 changed files with 13 additions and 10 deletions

View File

@ -74,8 +74,8 @@ initIRQ: {
sta Cia.C2DDRA
// SET UP THE 6510 LINES
lda #%11100111 // MOTOR ON, HIRAM LOWRAM CHAREN HIGH
sta MC6502.ZR1 // set 1110 0111, motor off, enable I/O, enable KERNAL, Disable BASIC
lda #%00110111 // MOTOR OFF, HIRAM LOWRAM CHAREN HIGH
sta MC6502.ZR1 // set 1110 0111, motor off, enable I/O, enable KERNAL, Enable BASIC
lda #%00101111 // set 0010 1111, 0 = input, 1 = output
sta MC6502.ZR0 // save the 6510 I/O port direction register

View File

@ -9,7 +9,6 @@
// ////// MACROS //////////////////////////////////////////
// ========================================================
* = * "Device: Video"
// --------------------------------------------------------
@ -228,16 +227,16 @@ sendChar: {
ldy MemMap.VIDEO.CursorCol
cpy #COLUMN_NUM // Is this > col num?
bcc noEndOfLine
jsr screenNewLine // Yes? Add new list first
jsr screenNewLine // Yes? Add new line first
ldy #1
cpy MemMap.VIDEO.ScrollUpTriggered
lda #1
cmp MemMap.VIDEO.ScrollUpTriggered
bne noScrollTriggered
// Compensate Scroll
sec
lda MemMap.VIDEO.TempVideoPointer
sbc #1
sbc #40
sta MemMap.VIDEO.TempVideoPointer
bcs !+
dec MemMap.VIDEO.TempVideoPointer+1
@ -249,8 +248,8 @@ sendChar: {
// This is a backspace
cmp #BS
bne !+
lda #' '
bne !+
lda #' '
sta (MemMap.VIDEO.TempVideoPointer), y
ply
jmp exit

View File

@ -17,6 +17,8 @@
.const CR = $0d
.const BS = $14
.const MAX_CMD_BUFFER = 40
// ========================================================
// ////// METHODS /////////////////////////////////////////
// ========================================================
@ -47,6 +49,8 @@ loop: {
beq backspace
inputChar:
jsr WozShell.push // Char in Buffer
cpy #MAX_CMD_BUFFER
beq loop
PrintChar()
jmp loop
backspace:
@ -71,7 +75,7 @@ toDebug: {
push: {
ldy MemMap.SHELL.pos
iny
cpy #127
cpy #MAX_CMD_BUFFER
beq done
sty MemMap.SHELL.pos
sta MemMap.SHELL.buffer, y