Hi, I recently started using OSS's Action, but I've run into some problems. In short, is there a limit on the size of arrays? I find that when I try to create a BYTE ARRAY of >256 elements, the compiler starts each array only a few bytes apart (as if it is ignoring the MSB of the size.)
To expand a bit... I was trying to do a Life simulation and wanted to create several linked lists. I've since concluded that can't be done since the language doesn't seem to be able to dynamically allocate memory. So I decided to do a sort of pseudo-linked-list, creating a record with CARDs for capacity and current size and a BYTE for the start of a virtual x,y coordinate array. Then I created a BYTE ARRAY to hold the record with the virtual array and declared the record and assigned it the address of the BYTE ARRAY. When I tried to Zero() the arrays, I ran into trouble, and when I investigated further I found the problem mentioned above. (I've appended the code below to clarify.)
When I run this with a BYTE ARRAY size of 256, it creates three arrays and prints out the starting addresses:
which is as expected.
But if i increase the BYTE ARRAY size to 257, it prints:
with the arrays overlapping...
I didn't see any mention of an array size limit in the manual (and they even show a 1000 byte array in the advanced record example.)
I'm running this on the Atari800 emulator (3.1.0) in 800XL mode with the Action 3.5 cart on a Linux Mint 18.1 laptop.
Thanks for any help you can offer.
TYPE LIST=[CARD CAPACITY, size BYTE xy]
BYTE ARRAY _ba1(ARRAY_SIZE)
BYTE ARRAY _ba2(ARRAY_SIZE)
BYTE ARRAY _ba3(ARRAY_SIZE)
BYTE POINTER ptr