LOAD compilation error in SXB
Sens-a-Dat
Posts: 44
It has been a number of years since I programmed in SXB. It was version 2.xx at the time. I am now trying V3.3.0. In Version 2, I was able to write the following without an error warning upon compiling. Now, I receive an error message NO "PROGRAM" CONTROL USED. Have things changed with the latest version? Or do I need to do something else in order to make this work?
DEVICE SX28, OSCXT1, TURBO, STACKX, OPTIONX '
FREQ 4_000_000
ID "Test"
STACK 16
LOAD pins.sxb
LOAD constants.sxb
LOAD variables.sxb
LOAD interrupt.sxb
PROGRAM Start
DEVICE SX28, OSCXT1, TURBO, STACKX, OPTIONX '
FREQ 4_000_000
ID "Test"
STACK 16
LOAD pins.sxb
LOAD constants.sxb
LOAD variables.sxb
LOAD interrupt.sxb
PROGRAM Start
Comments
Historically, there were a lot of upgrades to SX/B and documentation was migrated to be HTML. And then we suddenly got an EOL announcements. Not sure what the final status of SX/B was.
The later versions of SXB had a directive for include files that allowed one file to contain the header and code info.
The LOAD files were actually processed multiply times automatically by SXB. If I remember correctly it was processed once when the LOAD command was issued, then again automatically at the PROGRAM line, then again at the end of the main file.
Can you move the "PROGRAM Start" line to it is before the LOADs ?
Let me know if moving PROGRAM doesn't fix it. I'll review the source code and try to help.
Bean
P.S. I just looked and SX/B version 2.00.31 was the latest. Where did you find a version 3.3.0 ? Or is that the IDE version ? Sorry it's been quite a while since I did anything with the SX.