small 65C02 optimizations in many places
This commit is contained in:
1 parent
3e5c80bbf1
commit
ce8c84a20c
22 files changed
+103
-159
No files matched your search
@@ -14,10 +14,8 @@ iec_return_success:
|
||||
lda #$00
|
||||
sta C3PO
|
||||
// Restore registers
|
||||
pla
|
||||
tay
|
||||
pla
|
||||
tax
|
||||
_ply
|
||||
_plx
|
||||
// Report success
|
||||
clc
|
||||
rts
|
||||
@@ -30,9 +28,7 @@ iec_return_DEVICE_NOT_FOUND:
|
||||
lda #$00
|
||||
sta C3PO
|
||||
// Restore registers
|
||||
pla
|
||||
tay
|
||||
pla
|
||||
tax
|
||||
_ply
|
||||
_plx
|
||||
// Report error
|
||||
jmp kernalerror_DEVICE_NOT_FOUND
|
||||
@@ -7,10 +7,8 @@
|
||||
iec_rx_byte:
|
||||
|
||||
// Store .X and .Y on the stack - preserve them
|
||||
txa
|
||||
pha
|
||||
tya
|
||||
pha
|
||||
_phx
|
||||
_phy
|
||||
|
||||
// Timing is critical here - execute on disabled IRQs
|
||||
// The best practice would be to do PHP first, but it seems this is not
|
||||
|
||||
@@ -5,10 +5,8 @@
|
||||
iec_turnaround_to_listen:
|
||||
|
||||
// Store .X and .Y on the stack - preserve them
|
||||
txa
|
||||
pha
|
||||
tya
|
||||
pha
|
||||
_phx
|
||||
_phy
|
||||
|
||||
// Timing is critical here - execute on disabled IRQs
|
||||
php
|
||||
|
||||
@@ -5,10 +5,8 @@
|
||||
iec_turnaround_to_talk:
|
||||
|
||||
// Store .X and .Y on the stack - preserve them
|
||||
txa
|
||||
pha
|
||||
tya
|
||||
pha
|
||||
_phx
|
||||
_phy
|
||||
|
||||
// Timing is critical here - execute on disabled IRQs
|
||||
php
|
||||
|
||||
@@ -10,10 +10,8 @@
|
||||
iec_tx_byte:
|
||||
|
||||
// Store .X and .Y on the stack - preserve them
|
||||
txa
|
||||
pha
|
||||
tya
|
||||
pha
|
||||
_phx
|
||||
_phy
|
||||
|
||||
// Notify all devices that we are going to send a byte
|
||||
// and it is going to be a data byte (released ATN)
|
||||
|
||||
@@ -10,10 +10,8 @@
|
||||
iec_tx_command:
|
||||
|
||||
// Store .X and .Y on the stack - preserve them
|
||||
txa
|
||||
pha
|
||||
tya
|
||||
pha
|
||||
_phx
|
||||
_phy
|
||||
|
||||
// Notify all devices that we are going to send a byte
|
||||
// and it is going to be a command (pulled ATN)
|
||||
|
||||
@@ -6,10 +6,8 @@
|
||||
iec_tx_command_finalize:
|
||||
|
||||
// Store .X and .Y on the stack - preserve them
|
||||
txa
|
||||
pha
|
||||
tya
|
||||
pha
|
||||
_phx
|
||||
_phy
|
||||
|
||||
// Give device some time to complete command reception, release ATN,
|
||||
// give it some time again before (possible) next command
|
||||
|
||||
Reference in new issue
Block a user