Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
aplib decompressor for ZX Basic.
#19
na_th_an Wrote:
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.
Arrays uses an extra binary data header. To obtain the address of the first element, use @mapdata(0) instead ;-)
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)