From ae5ea2e6d6a913c835e8c63ee84654f09e05e428 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Sat, 18 Jul 2020 14:52:02 +0200 Subject: [PATCH] code cleanup --- src/basic/basic_commands/cmd_let.s | 22 ++----------------- .../basic_commands/helper_let_strvarcpy_38K.s | 1 - .../helper_let_strvarcpy_46K_50K.s | 3 +-- .../basic_commands/helper_let_strvarcpy_60K.s | 1 - 4 files changed, 3 insertions(+), 24 deletions(-) diff --git a/src/basic/basic_commands/cmd_let.s b/src/basic/basic_commands/cmd_let.s index d772c378..10311df9 100644 --- a/src/basic/basic_commands/cmd_let.s +++ b/src/basic/basic_commands/cmd_let.s @@ -276,30 +276,12 @@ cmd_let_assign_string_try_reuse: sec lda DSCPNT+0 - sbc __FAC1+0 - bcc cmd_let_assign_string_try_reuse_unsuccesful - + cmp __FAC1+0 + // If size of both string equals - simply reuse it beq_16 helper_let_strvarcpy - // Old string is longer - if difference is at least 3 bytes, we can still reuse it - - sbc #$03 - bcc cmd_let_assign_string_try_reuse_unsuccesful - - // New string is shorter - enought that we can still reuse the old one with a small trick -/* - clc - adc DSCPNT+1 - sta DSCPNT+1 - bcs !+ - inc DSCPNT+2 -*/ - // XXX - // XXX implement this part - // XXX - cmd_let_assign_string_try_reuse_unsuccesful: // No special case optimization is possible - but first get rid of the old string diff --git a/src/basic/basic_commands/helper_let_strvarcpy_38K.s b/src/basic/basic_commands/helper_let_strvarcpy_38K.s index 99efa312..65854927 100644 --- a/src/basic/basic_commands/helper_let_strvarcpy_38K.s +++ b/src/basic/basic_commands/helper_let_strvarcpy_38K.s @@ -12,7 +12,6 @@ helper_let_strvarcpy: // Retrieve pointer to destination - // XXX this part is probably not needed ldy #$02 lda (VARPNT), y diff --git a/src/basic/basic_commands/helper_let_strvarcpy_46K_50K.s b/src/basic/basic_commands/helper_let_strvarcpy_46K_50K.s index 4961a806..f8c79176 100644 --- a/src/basic/basic_commands/helper_let_strvarcpy_46K_50K.s +++ b/src/basic/basic_commands/helper_let_strvarcpy_46K_50K.s @@ -19,7 +19,6 @@ helper_let_strvarcpy: sta CPU_R6510 // Retrieve pointer to destination - // XXX this part is probably not needed ldy #$02 lda (VARPNT), y @@ -29,7 +28,7 @@ helper_let_strvarcpy: sta DSCPNT+1 dey - // .Y is now 0 - copy the content + // Copy the string content !: lda (__FAC1+1),y sta (DSCPNT+1),y diff --git a/src/basic/basic_commands/helper_let_strvarcpy_60K.s b/src/basic/basic_commands/helper_let_strvarcpy_60K.s index 7a19130d..d8e6c281 100644 --- a/src/basic/basic_commands/helper_let_strvarcpy_60K.s +++ b/src/basic/basic_commands/helper_let_strvarcpy_60K.s @@ -14,7 +14,6 @@ helper_let_strvarcpy: ldx #