array in DAT section?
EricR
Posts: 35
Is there any way to declare an array in the DAT section for use in Spin?
So far, I do this:
DAT
A_DAT_Array············ long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
However, I want the size definable by a constant, not by typing all these zeros.
Any comments are appreciated.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric
So far, I do this:
DAT
A_DAT_Array············ long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
However, I want the size definable by a constant, not by typing all these zeros.
Any comments are appreciated.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric
It is necessary to change at least 1 bit of the code to have multiple instances of a singleton object.· Example, in two files:
in "FullDuplexSerial128.spin" (similar to SerialMirror) I have
· dummy········ long 0··· ' marker to make file instances recognizeable as different
in "Fish128.spin" (almost identical to above) I have
· dummy········ long 1··· ' marker to make file instances recognizeable as different
This is enough to make the Propeller Tool create two instances of this singleton object.· I am using version 1.2.5 of the tool.
My OBJ section in the program that needs two instances looks like this:
· ConsoleSerialDriver : "FullDuplexSerial128"
· DebugSerialDriver : "fish128"
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Eric