more 65CE02 optimizations
This commit is contained in:
1 parent
1031e44f77
commit
0f843beda1
5 files changed
+44
-1
No files matched your search
@@ -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
|
// Stack manipulation - some CPUs will leave .A unchanged, some will use it as temporary storage, so consider .A trashed
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -118,7 +118,11 @@ load_iec_loop:
|
|||||||
|
|
||||||
// Advance pointer to data; it is OK if it advances past $FFFF,
|
// Advance pointer to data; it is OK if it advances past $FFFF,
|
||||||
// one autostart technique does exactly this
|
// one autostart technique does exactly this
|
||||||
|
#if !HAS_OPCODES_65CE02
|
||||||
jsr lvs_advance_EAL
|
jsr lvs_advance_EAL
|
||||||
|
#else
|
||||||
|
inw EAL+0
|
||||||
|
#endif
|
||||||
|
|
||||||
// Handle STOP key; it is probably an overkill to do it
|
// Handle STOP key; it is probably an overkill to do it
|
||||||
// with every byte, once per 32 bytes should be enough
|
// with every byte, once per 32 bytes should be enough
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ lvs_handle_byte_verify:
|
|||||||
sec
|
sec
|
||||||
rts
|
rts
|
||||||
|
|
||||||
#if CONFIG_IEC
|
#if CONFIG_IEC && !HAS_OPCODES_65CE02
|
||||||
|
|
||||||
lvs_advance_EAL:
|
lvs_advance_EAL:
|
||||||
|
|
||||||
@@ -101,10 +101,14 @@ lvs_setup_MEMUSS:
|
|||||||
lvs_advance_MEMUSS_check_EAL:
|
lvs_advance_MEMUSS_check_EAL:
|
||||||
|
|
||||||
// Advance pointer
|
// Advance pointer
|
||||||
|
#if !HAS_OPCODES_65CE02
|
||||||
inc MEMUSS+0
|
inc MEMUSS+0
|
||||||
bne !+
|
bne !+
|
||||||
inc MEMUSS+1
|
inc MEMUSS+1
|
||||||
!:
|
!:
|
||||||
|
#else
|
||||||
|
inw MEMUSS+0
|
||||||
|
#endif
|
||||||
lda MEMUSS+1
|
lda MEMUSS+1
|
||||||
cmp EAL+1
|
cmp EAL+1
|
||||||
bne !+
|
bne !+
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
// Reeturns marker type in Carry flag, set = end of data
|
// Reeturns marker type in Carry flag, set = end of data
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#if CONFIG_TAPE_NORMAL
|
||||||
|
|
||||||
|
|
||||||
tape_normal_get_marker:
|
tape_normal_get_marker:
|
||||||
|
|
||||||
// (L,M) - end of byte, (L,S) - end of data
|
// (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
|
bcs tape_normal_get_marker // too short for a long pulse
|
||||||
|
|
||||||
jmp tape_normal_get_pulse
|
jmp tape_normal_get_pulse
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -14,9 +14,13 @@ UDTIM:
|
|||||||
// (24 hours * 60 minutes * 60 seconds * 60 jiffies),
|
// (24 hours * 60 minutes * 60 seconds * 60 jiffies),
|
||||||
// after this time we have to reset the clock.
|
// after this time we have to reset the clock.
|
||||||
|
|
||||||
|
#if !HAS_OPCODES_65CE02
|
||||||
inc TIME+0
|
inc TIME+0
|
||||||
bne udtim_time_done // done with clock
|
bne udtim_time_done // done with clock
|
||||||
inc TIME+1
|
inc TIME+1
|
||||||
|
#else
|
||||||
|
inw TIME+0
|
||||||
|
#endif
|
||||||
bne udtim_clock_rollover
|
bne udtim_clock_rollover
|
||||||
inc TIME+2
|
inc TIME+2
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user