small 65C02 optimizations in many places

This commit is contained in:
FeralChild64 committed 2019-10-10 19:45:40 +02:00
1 parent 3e5c80bbf1
commit ce8c84a20c
22 files changed
+103 -159

No files matched your search

+5 -10
View File
@@ -44,8 +44,7 @@ chrin_done_fail:
chrin_keyboard:
// Save X
txa
pha
_phx
chrin_repeat:
@@ -65,8 +64,7 @@ chrin_repeat:
// Return carriage return and clear pending input flag
lda #$00
sta CRSW
pla
tax
_plx
clc
lda #$0d
rts
@@ -74,8 +72,7 @@ chrin_repeat:
not_end_of_input:
// Return next byte of waiting input and advance index
tay
pla
tax
_plx
lda (LXSP),y
jsr screen_code_to_petscii
inc CRSW
@@ -126,8 +123,7 @@ read_from_keyboard:
sta CRSW
// Return first char of line
ldy #$00
pla
tax
_plx
lda (LXSP),y
jsr screen_code_to_petscii
clc
@@ -137,8 +133,7 @@ empty_line:
// For an empty line, just return the carriage return
// (and don't forget to actually print the carriage return, so that
// the cursor advances and screen scrolls as required)
pla
tax
_plx
clc
lda #$0d
rts