diff --git a/core/boot.asm b/core/boot.asm index 65b8db5..71d99ae 100644 --- a/core/boot.asm +++ b/core/boot.asm @@ -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 diff --git a/devices/video.asm b/devices/video.asm index ee0c7fc..cbc0cd4 100644 --- a/devices/video.asm +++ b/devices/video.asm @@ -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 diff --git a/progs/woz_shell.asm b/progs/woz_shell.asm index 82020b8..8ce2acf 100644 --- a/progs/woz_shell.asm +++ b/progs/woz_shell.asm @@ -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