What is the function of Pgm_ID: in the SX/B template?
![John Kauffman](https://forums.parallax.com/uploads/userpics/555/nZBNEPT0B6FMD.jpg)
What is the function of Pgm_ID: in the SX/B template?
·
The SX/B template (downloaded from Parallax & copied below) includes a line to create a table in the program that holds a string and a zero (following).
·
Pgm_ID:
· DATA· "SX/B Template", 0
·
That line is not used in the SX/B examples (Dice, Keypad, etc.). I am guessing that it is a standardized place to hold the name of the program. I’m guessing the second datum in the table might be the version number. So when I save version 2 of my program I would change the command to be:
·
Pgm_ID:
· DATA· "MyProgramName", 2
·
Questions:
ð······ Are above assumptions correct?
ð······ When I remove this line there seems to be no effect. Is it optional?
ð······ Is there a convention that when a programmer wants to check the name or version of the running program it will look at this specific table?
·
Thanks.
·
The SX/B template (downloaded from Parallax & copied below) includes a line to create a table in the program that holds a string and a zero (following).
·
Pgm_ID:
· DATA· "SX/B Template", 0
·
That line is not used in the SX/B examples (Dice, Keypad, etc.). I am guessing that it is a standardized place to hold the name of the program. I’m guessing the second datum in the table might be the version number. So when I save version 2 of my program I would change the command to be:
·
Pgm_ID:
· DATA· "MyProgramName", 2
·
Questions:
ð······ Are above assumptions correct?
ð······ When I remove this line there seems to be no effect. Is it optional?
ð······ Is there a convention that when a programmer wants to check the name or version of the running program it will look at this specific table?
·
Thanks.
Comments
If this function isn't part of your program you can delete the string.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
There is an ID command. That allows upto an 8 character string to be stored in the SX chip. This is used to determine what version of firmare is in a SX chip. If from the IDE you choose RUN->DEVICE then click the READ button the ID field will be set to the ID when the SX was programmed. This is very important when you choose to PROTECT the code in the SX, because the ID can always be read whether the device is protected or not.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
"SX-Video OSD module" Now available from Parallax for only·$49.95
http://www.parallax.com/detail.asp?product_id=30015
Product web site: www.sxvm.com
"Wise men know when they're right. The wisest also·know when they're wrong."
·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax