Compile Error on Timer.SXB example
MikeS
Posts: 131
I am getting the following compile error when I try to compile the TIMER.SXB project and am not sure why.
TIMER.SXB(116) Line 116, Error 8, Pass 1:INVALID PARAMETER "DigiMap"
This line in the program is highlighted in yellow.
READ DigMap + digPntr, DigCtrl··············· ' update digit control
I am using IDE 3.1 and the TIMER.SXB is dated 07 July 2005.
Any assistance would be appreciated.
TIMER.SXB(116) Line 116, Error 8, Pass 1:INVALID PARAMETER "DigiMap"
This line in the program is highlighted in yellow.
READ DigMap + digPntr, DigCtrl··············· ' update digit control
I am using IDE 3.1 and the TIMER.SXB is dated 07 July 2005.
Any assistance would be appreciated.
Comments
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"One experiment is worth a thousand theories"
·
It is DigMap. I typed the error message wrong.
TIMER.SXB(116) Line 116, Error 8, Pass 1:INVALID PARAMETER "DigMap"
DigMap is a label for the start of the DATA statements.
Please post the complete program.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"One experiment is worth a thousand theories"
·
What happened is that the SX/B "READ" command now has a requirement that the label be defined before the code that uses it.
This is because READ now allows you to use two variables OR a label and a variable. If you didn't define the label before the command it wouldn't know if you had misspelled a variable name, or if it was a label that had not been defined yet.
You need to move the data table before the READ command that uses it.
Now it's a little more complecated because no code or data can be before the INTERRUPT command. I fixed it like this:
'
INTERRUPT
GOTO ISR_Start
DigMap: ' digit select map
DATA %11111110
DATA %11111101
DATA %11111011
DATA %11110111
ISR_Start:
'
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"One experiment is worth a thousand theories"
·
Thanks alot for your help.
I figured the problem might have been the READ statement in the ISR. comming before the DATA statements but I was not sure how to correct it.
thanks again
Mike S.