diff --git a/src/basic/engine_variables/array_create.s b/src/basic/engine_variables/array_create.s index bf867cc2..867d1e89 100644 --- a/src/basic/engine_variables/array_create.s +++ b/src/basic/engine_variables/array_create.s @@ -169,6 +169,10 @@ array_create_store_loop: dex bne array_create_store_loop + // Store .Y in a safe place - this is the header size + + sty __FAC1+5 + // FALLTROUGH array_create_store_dims_done: @@ -241,8 +245,64 @@ array_create_store_dims_done: #endif - // Clear newly alocated area, adjust STREND + // First increase STREND past the header - // XXX implement this + clc + lda __FAC1+5 + adc STREND+0 + sta STREND+0 + bcc !+ + inc STREND+1 +!: + // Clear the newly alocated area - jmp do_NOT_IMPLEMENTED_error + ldy #$00 +#if CONFIG_MEMORY_MODEL_60K + ldx #