code cleanup
This commit is contained in:
1 parent
eefbaf76d8
commit
ae5ea2e6d6
4 files changed
+3
-24
No files matched your search
@@ -276,30 +276,12 @@ cmd_let_assign_string_try_reuse:
|
|||||||
|
|
||||||
sec
|
sec
|
||||||
lda DSCPNT+0
|
lda DSCPNT+0
|
||||||
sbc __FAC1+0
|
cmp __FAC1+0
|
||||||
bcc cmd_let_assign_string_try_reuse_unsuccesful
|
|
||||||
|
|
||||||
// If size of both string equals - simply reuse it
|
// If size of both string equals - simply reuse it
|
||||||
|
|
||||||
beq_16 helper_let_strvarcpy
|
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:
|
cmd_let_assign_string_try_reuse_unsuccesful:
|
||||||
|
|
||||||
// No special case optimization is possible - but first get rid of the old string
|
// No special case optimization is possible - but first get rid of the old string
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
helper_let_strvarcpy:
|
helper_let_strvarcpy:
|
||||||
|
|
||||||
// Retrieve pointer to destination
|
// Retrieve pointer to destination
|
||||||
// XXX this part is probably not needed
|
|
||||||
|
|
||||||
ldy #$02
|
ldy #$02
|
||||||
lda (VARPNT), y
|
lda (VARPNT), y
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ helper_let_strvarcpy:
|
|||||||
sta CPU_R6510
|
sta CPU_R6510
|
||||||
|
|
||||||
// Retrieve pointer to destination
|
// Retrieve pointer to destination
|
||||||
// XXX this part is probably not needed
|
|
||||||
|
|
||||||
ldy #$02
|
ldy #$02
|
||||||
lda (VARPNT), y
|
lda (VARPNT), y
|
||||||
@@ -29,7 +28,7 @@ helper_let_strvarcpy:
|
|||||||
sta DSCPNT+1
|
sta DSCPNT+1
|
||||||
dey
|
dey
|
||||||
|
|
||||||
// .Y is now 0 - copy the content
|
// Copy the string content
|
||||||
!:
|
!:
|
||||||
lda (__FAC1+1),y
|
lda (__FAC1+1),y
|
||||||
sta (DSCPNT+1),y
|
sta (DSCPNT+1),y
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ helper_let_strvarcpy:
|
|||||||
ldx #<VARPNT
|
ldx #<VARPNT
|
||||||
|
|
||||||
// Retrieve pointer to destination
|
// Retrieve pointer to destination
|
||||||
// XXX this part is probably not needed
|
|
||||||
|
|
||||||
ldy #$02
|
ldy #$02
|
||||||
jsr peek_under_roms
|
jsr peek_under_roms
|
||||||
|
|||||||
Reference in new issue
Block a user