code cleanup

This commit is contained in:
FeralChild64 committed 2020-07-18 14:52:02 +02:00
1 parent eefbaf76d8
commit ae5ea2e6d6
4 files changed
+3 -24

No files matched your search

+2 -20
View File
@@ -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
@@ -12,7 +12,6 @@
helper_let_strvarcpy:
// Retrieve pointer to destination
// XXX this part is probably not needed
ldy #$02
lda (VARPNT), y
@@ -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
@@ -14,7 +14,6 @@ helper_let_strvarcpy:
ldx #<VARPNT
// Retrieve pointer to destination
// XXX this part is probably not needed
ldy #$02
jsr peek_under_roms