08-06-2012, 07:20 AM
na_th_an Wrote:Arrays uses an extra binary data header. To obtain the address of the first element, use @mapdata(0) instead ;-)slenkar Wrote:thanks for the explanation,
how is @mapdata first defined? is it an array,a memory address?
"mapdata" is a label, look at the code. It marks a "spot" in memory. Just afterwards, you have an "asm - end asm" block which includes a defs "command" which is just defining 2400 zeroes.
So @mapdata is the address of such space with 2400 zeroes where compressed maps will decompress in my example. Think of it like an unsigned byte array:
Code:Dim mapdata (2399) as uByte
I think that would be exactly the same thing.