DAT declaration
I have a simple problem that's driving me mad as I can't get it to work!
In my main module I (want to) declare a DAT block of bytes, that I get the address of via F8
I then use this address within a 'MemoryMap.spin' file:
I then include the MemoryMap.spin object in all the spin files that need to access the memory block.
The main files memory block can then be read/written from any module using the following:
(where memmap is OBJ memmap : "MemoryMap")
Trouble is, I am having trouble getting the main module to declare an array of bytes in the DAT block:
Is this the correct syntax?
Cheers all.
In my main module I (want to) declare a DAT block of bytes, that I get the address of via F8
I then use this address within a 'MemoryMap.spin' file:
CON BaseAddr = $54 ' Base Memory location - should be address of DataBlock in main module CON Var1 = 0 Var2 = 4 Var3 = 8 Var4 = 12 ... LastVar = 192
I then include the MemoryMap.spin object in all the spin files that need to access the memory block.
The main files memory block can then be read/written from any module using the following:
readvar1 := long[noparse][[/noparse]constant(memmap#BaseAddr + memmap#Var1)] long[noparse][[/noparse]memmap#BaseAddr + memmap#Var2] := writevar2
(where memmap is OBJ memmap : "MemoryMap")
Trouble is, I am having trouble getting the main module to declare an array of bytes in the DAT block:
DAT DataBlock byte memmap#LastVar ' this is the last (i.e. size of) var in the global memory map
Is this the correct syntax?
Cheers all.
Comments
Someone else may remember more about this than I can.
I'd be interested to hear exactly what it's doing though.......
also this example: http://forums.parallax.com/showthread.php?p=586819
finally, about aliasing: http://forums.parallax.com/showthread.php?p=659730
I am starting to think we need manual 1.02
Post Edited (Fred Hawkins) : 9/17/2007 3:14:20 PM GMT
www.parallax.com/dl/docs/prod/prop/PMv1.0Supplement-v1.1.pdf