more 65CE02 optimizations

This commit is contained in:
FeralChild64 committed 2019-12-23 17:56:14 +01:00
1 parent 1031e44f77
commit 0f843beda1
5 files changed
+45 -2

No files matched your search

+24
View File
@@ -47,6 +47,30 @@
}
//
// Some additional 65CE02 instructions
//
#if HAS_OPCODES_65CE02
.pseudocommand dew addr
{
.var arg = addr.getValue()
.if (arg > $FF) .error "DEW requires zeropage address"
.byte $C3, arg
}
.pseudocommand inw addr
{
.var arg = addr.getValue()
.if (arg > $FF) .error "INW requires zeropage address"
.byte $E3, arg
}
#endif
//
// Stack manipulation - some CPUs will leave .A unchanged, some will use it as temporary storage, so consider .A trashed
//
+5 -1
View File
@@ -118,8 +118,12 @@ load_iec_loop:
// Advance pointer to data; it is OK if it advances past $FFFF,
// one autostart technique does exactly this
#if !HAS_OPCODES_65CE02
jsr lvs_advance_EAL
#else
inw EAL+0
#endif
// Handle STOP key; it is probably an overkill to do it
// with every byte, once per 32 bytes should be enough
lda EAL
+5 -1
View File
@@ -75,7 +75,7 @@ lvs_handle_byte_verify:
sec
rts
#if CONFIG_IEC
#if CONFIG_IEC && !HAS_OPCODES_65CE02
lvs_advance_EAL:
@@ -101,10 +101,14 @@ lvs_setup_MEMUSS:
lvs_advance_MEMUSS_check_EAL:
// Advance pointer
#if !HAS_OPCODES_65CE02
inc MEMUSS+0
bne !+
inc MEMUSS+1
!:
#else
inw MEMUSS+0
#endif
lda MEMUSS+1
cmp EAL+1
bne !+
+7
View File
@@ -5,6 +5,10 @@
// Reeturns marker type in Carry flag, set = end of data
//
#if CONFIG_TAPE_NORMAL
tape_normal_get_marker:
// (L,M) - end of byte, (L,S) - end of data
@@ -14,3 +18,6 @@ tape_normal_get_marker:
bcs tape_normal_get_marker // too short for a long pulse
jmp tape_normal_get_pulse
#endif
+4
View File
@@ -14,9 +14,13 @@ UDTIM:
// (24 hours * 60 minutes * 60 seconds * 60 jiffies),
// after this time we have to reset the clock.
#if !HAS_OPCODES_65CE02
inc TIME+0
bne udtim_time_done // done with clock
inc TIME+1
#else
inw TIME+0
#endif
bne udtim_clock_rollover
inc TIME+2