fixed comparing uninitialized streing descriptor
This commit is contained in:
1 parent
626dbc1eac
commit
cabcfb6b35
2 files changed
+80
-10
No files matched your search
@@ -11,16 +11,20 @@ cmd_let:
|
|||||||
jsr fetch_variable
|
jsr fetch_variable
|
||||||
|
|
||||||
#if HAS_OPCODES_65CE02
|
#if HAS_OPCODES_65CE02
|
||||||
|
|
||||||
bcs_16 do_SYNTAX_error
|
bcs_16 do_SYNTAX_error
|
||||||
jsr injest_assign
|
jsr injest_assign
|
||||||
bcs_16 do_SYNTAX_error
|
bcs_16 do_SYNTAX_error
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
bcs !+
|
bcs !+
|
||||||
jsr injest_assign
|
jsr injest_assign
|
||||||
bcc !++
|
bcc !++
|
||||||
!:
|
!:
|
||||||
jmp do_SYNTAX_error
|
jmp do_SYNTAX_error
|
||||||
!:
|
!:
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Determine variable type and push it to the stack
|
// Determine variable type and push it to the stack
|
||||||
@@ -132,16 +136,21 @@ cmd_let_assign_string:
|
|||||||
|
|
||||||
#if CONFIG_MEMORY_MODEL_60K
|
#if CONFIG_MEMORY_MODEL_60K
|
||||||
|
|
||||||
// XXX
|
ldx #<VARPNT
|
||||||
// XXX: implement this
|
|
||||||
// XXX
|
ldy #$00
|
||||||
|
jsr peek_under_roms
|
||||||
|
sta DSCPNT+0
|
||||||
|
iny
|
||||||
|
jsr peek_under_roms
|
||||||
|
sta DSCPNT+1
|
||||||
|
iny
|
||||||
|
jsr peek_under_roms
|
||||||
|
sta DSCPNT+2
|
||||||
|
|
||||||
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||||
// XXX consider optimized version without multiple JSRs
|
|
||||||
|
|
||||||
// XXX
|
jsr helper_let_strdesccpy
|
||||||
// XXX: implement this
|
|
||||||
// XXX
|
|
||||||
|
|
||||||
#else // CONFIG_MEMORY_MODEL_38K
|
#else // CONFIG_MEMORY_MODEL_38K
|
||||||
|
|
||||||
@@ -269,10 +278,14 @@ cmd_let_assign_string_not_text_area:
|
|||||||
ldy #$00
|
ldy #$00
|
||||||
|
|
||||||
#if CONFIG_MEMORY_MODEL_60K
|
#if CONFIG_MEMORY_MODEL_60K
|
||||||
|
|
||||||
ldx #<VARPNT
|
ldx #<VARPNT
|
||||||
jsr poke_under_roms
|
jsr poke_under_roms
|
||||||
|
|
||||||
#else // CONFIG_MEMORY_MODEL_38K || CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
#else // CONFIG_MEMORY_MODEL_38K || CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||||
|
|
||||||
sta (VARPNT), y
|
sta (VARPNT), y
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
lda __FAC1+0
|
lda __FAC1+0
|
||||||
@@ -284,9 +297,26 @@ cmd_let_assign_string_not_text_area:
|
|||||||
|
|
||||||
#if CONFIG_MEMORY_MODEL_60K
|
#if CONFIG_MEMORY_MODEL_60K
|
||||||
|
|
||||||
// XXX
|
ldx #<VARPNT
|
||||||
// XXX: implement this
|
|
||||||
// XXX
|
ldy #$02
|
||||||
|
jsr peek_under_roms
|
||||||
|
sta DSCPNT+2
|
||||||
|
dey
|
||||||
|
jsr peek_under_roms
|
||||||
|
sta DSCPNT+1
|
||||||
|
dey
|
||||||
|
|
||||||
|
// .Y is now 0 - copy the content
|
||||||
|
!:
|
||||||
|
|
||||||
|
ldx #<__FAC1+1
|
||||||
|
jsr peek_under_roms
|
||||||
|
ldx #<DSCPNT+1
|
||||||
|
jsr poke_under_roms
|
||||||
|
iny
|
||||||
|
cpy __FAC1+0
|
||||||
|
bne !-
|
||||||
|
|
||||||
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
#elif CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
// #LAYOUT# STD * #TAKE-HIGH
|
||||||
|
// #LAYOUT# * BASIC_0 #TAKE-HIGH
|
||||||
|
// #LAYOUT# * * #IGNORE
|
||||||
|
|
||||||
|
// This has to go $E000 or above - routines below banks out the main BASIC ROM!
|
||||||
|
|
||||||
|
//
|
||||||
|
// Helper routine to copy string descriptor, for LET command
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#if CONFIG_MEMORY_MODEL_46K || CONFIG_MEMORY_MODEL_50K
|
||||||
|
|
||||||
|
helper_let_strdesccpy:
|
||||||
|
|
||||||
|
// Unmap BASIC lower ROM
|
||||||
|
|
||||||
|
lda #$26
|
||||||
|
sta CPU_R6510
|
||||||
|
|
||||||
|
// Retrieve pointer to destination
|
||||||
|
|
||||||
|
ldy #$00
|
||||||
|
lda (VARPNT), y
|
||||||
|
sta DSCPNT+0
|
||||||
|
iny
|
||||||
|
lda (VARPNT), y
|
||||||
|
sta DSCPNT+1
|
||||||
|
iny
|
||||||
|
lda (VARPNT), y
|
||||||
|
sta DSCPNT+2
|
||||||
|
|
||||||
|
// Restore default memory mapping
|
||||||
|
|
||||||
|
lda #$27
|
||||||
|
sta CPU_R6510
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in new issue
Block a user