small CHRIN optimization
This commit is contained in:
1 parent
54fd24d704
commit
2398616bee
1 file changed
+7
-7
@@ -33,12 +33,15 @@ chrin_repeat:
|
|||||||
rts
|
rts
|
||||||
|
|
||||||
not_end_of_input:
|
not_end_of_input:
|
||||||
// Return next byte of waiting input and advance index
|
// Advance index
|
||||||
|
inc CRSW
|
||||||
|
|
||||||
|
// Return next byte of waiting
|
||||||
tay
|
tay
|
||||||
|
chrin_keyboard_return_byte:
|
||||||
plx_trash_a
|
plx_trash_a
|
||||||
lda (LXSP),y
|
lda (LXSP),y
|
||||||
jsr screen_code_to_petscii
|
jsr screen_code_to_petscii
|
||||||
inc CRSW
|
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
|
|
||||||
@@ -84,13 +87,10 @@ chrin_enter:
|
|||||||
sty INDX
|
sty INDX
|
||||||
lda #$01
|
lda #$01
|
||||||
sta CRSW
|
sta CRSW
|
||||||
|
|
||||||
// Return first char of line
|
// Return first char of line
|
||||||
ldy #$00
|
ldy #$00
|
||||||
plx_trash_a
|
beq chrin_keyboard_return_byte // branch always
|
||||||
lda (LXSP),y
|
|
||||||
jsr screen_code_to_petscii
|
|
||||||
clc
|
|
||||||
rts
|
|
||||||
|
|
||||||
empty_line:
|
empty_line:
|
||||||
// For an empty line, just return the carriage return
|
// For an empty line, just return the carriage return
|
||||||
|
|||||||
Reference in new issue
Block a user