Where to store the HUB(s) PropBasic
denno
Posts: 223
Bean, good morning, just wondering if it makes a difference where to put the HUB declaration for address location. In the beginning, along with the CONSTANTS, before the "PROGRAM start", or can the HUB(s) go in the individual COG(s), along with the VAR(s) in the individual COG(s)? Does it make any difference?
Another question, can a program in a certain COG, within a DO/LOOP get "lost", and the rest of the DO/LOOP past that picitular line of code not...well not go any further? I can SEROUT 30, baud2 a "before" and an "after", when that picitular line is NOT commented out, and I will get the "before", but not the "after". If I comment out that line, I will get the "LOOPING", with the words "before and after" on the screen. I just found it interesting, as the program does load into the FLIP successfully..
DennO
Another question, can a program in a certain COG, within a DO/LOOP get "lost", and the rest of the DO/LOOP past that picitular line of code not...well not go any further? I can SEROUT 30, baud2 a "before" and an "after", when that picitular line is NOT commented out, and I will get the "before", but not the "after". If I comment out that line, I will get the "LOOPING", with the words "before and after" on the screen. I just found it interesting, as the program does load into the FLIP successfully..
DennO
Comments
I usually declare things in this order:
CON
PIN
HUB
TASK
VAR
SUB/FUNC
PROGRAM Start
program code
END
SUBs/Func code
TASK code
As for the DO...LOOP, there must be kind of error that is preventing the loop from exiting.
Can you post the code in that DO...LOOP ?
Bean
If a VAR is used inside a TASK, doesn't that VAR have to be declared inside that TASK, and the same for PIN. Or can the PIN and all VAR(s) for any TASK be declared outside the TASK, and before the PROGRAM start?
As far as the DO/LOOP program freeze, I have not been able to duplacate the error...must have been something I just did not see, or perhaps, it is the fact that it has finally stopped raining up here in Michigan...LOL
DennO
Bean