I'd like to use strings and arrays in my paged code, but I seem to have reached a blockage whereby, even though my paged-code looks like:
and when I compile with :
then I still seem to end up with some kind of header code that makes a call to $46A4...
which I think must be some kind of heap management setup...
...so please may I ask...
Is there a compiler switch or directive whereby I can get the heap management code tacked on just after my code ends, so that I can have private heap management per 8KB segment of paged code ?
Thank you.
Code:
#PRAGMA push(case_insensitive)
#PRAGMA case_insensitive = True
#define STANDALONE ' remove ROM initialization and SysVars...
Asm
org $6000
di
End Asm
s_stage_init()
Asm
ret
End Asm
#include "constants.bas"
#include "globals.bas"
#include "stage-include.bas"
Sub s_init_keyboard_table_ZX_keys()
' effect: populates the lookup table for the 40-key spectrum matrix
' row 0: port $FEFE
gub_zxkeys(0) = 0 ' caps shift
'...
gub_zxkeys(55) = 127 ' delete (standard)
End Sub
Sub s_init_keyboard_table_ZX_symkeys()
' row 0: z, x, c, v
gub_zxsymkeys(1) = 58 ' :
'...
gub_zxsymkeys(55) = 127 ' delete (standard)
End Sub
Sub s_init_title_screen()
' footer prompt
s_print_string_at( 28, 21, "Press any key to begin..." , UB_BRIGHT_YELLOW )
' wait for player input
s_get_key()
' check if the one-hour timeout occurred
If guw_key_code = 0 Then gub_core_end = true
End Sub
Sub s_stage_init()
s_init_keyboard_table_ZX_keys()
s_init_keyboard_table_ZX_symkeys()
s_init_title_screen()
End Suband when I compile with :
Code:
python $Compiler "$($Name).bas" -f bin -o "$($Name).bin" --org 24576 -W150 --headerless --explicit --strict --zxnext -i --arch zxnext --opt-strategy size --heap-address 32000 --heap-size 767 -M "$($Name).map"then I still seem to end up with some kind of header code that makes a call to $46A4...
Code:
>6001 CALL 46A4 PC 6001
6004 NOP SP FFFA
6005 NOP AF FFFF'3C40
6006 NOP SZ5H3PNC
6007 NOP HL 0001'3C44
6008 NOP DE 0000'FFFF
6009 NOP BC 0000'5393
600A LD BC, 6013 IX FFF1
600D EX AF, AF' IY EFF3
600E LD B, A IR 001B
600F NOP IM1 IFF--
6010 NOP (HL) F3 00
6011 NOP (DE) 00 F3
(BC) 00 F3
(SP) 0C3C 010B 0000 F300 C300 0which I think must be some kind of heap management setup...
...so please may I ask...
Is there a compiler switch or directive whereby I can get the heap management code tacked on just after my code ends, so that I can have private heap management per 8KB segment of paged code ?
Thank you.

