From f70fe31e0c3fbd69db5e2b958c3dff3169245986 Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Mon, 27 Jul 2020 22:16:31 +0200 Subject: [PATCH] array creation routine seems complete now --- src/basic/engine_variables/array_create.s | 66 +++++++++++++++++++++-- 1 file changed, 63 insertions(+), 3 deletions(-) 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 #