SX/B Branch Command Error?
pjv
Posts: 1,903
Hi All;
There is something I don't understand about the SX/B BRANCH command; perhaps there is an error.·One is to make sure the branch offset number does not exceed the number of labels-1, and that's fine.
In looking at the compiled listing, however, it appears the compiler itself does a check on this, but the place it calculates to jump to in case of a failure is not where one would expect it to go. Instead it jumps into the middle of commands following the branch command. Eventhough this situation is not supposed to occur, it does indeed seem odd.
The calculation varies with the number of branch lables issued.
Furthermore, what happens when the branch is to a label on another page. A page instruction seems to be missing.
Anyone???
Thanks,
Peter
·
There is something I don't understand about the SX/B BRANCH command; perhaps there is an error.·One is to make sure the branch offset number does not exceed the number of labels-1, and that's fine.
In looking at the compiled listing, however, it appears the compiler itself does a check on this, but the place it calculates to jump to in case of a failure is not where one would expect it to go. Instead it jumps into the middle of commands following the branch command. Eventhough this situation is not supposed to occur, it does indeed seem odd.
The calculation varies with the number of branch lables issued.
Furthermore, what happens when the branch is to a label on another page. A page instruction seems to be missing.
Anyone???
Thanks,
Peter
·
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Peter.
Say, I just had another thought; several in fact, listed in order of importance to me.
1) Would it be possible to set the origin for the __PARAM(1-4) sytem variables at location $0A rather than at $08.?
2) And similarly for the __REMAINDER system variable to be at $0A?
That way, those of us who are using·the SX48/52 would still be able to use I/O ports D and E which are located at $08 and $09.
3) And while you're at it, how about leaving two spaces for our own TRISD and TRISE at $FA and $FB by setting the origin for TRIS(A-C) at $F7. This way we could pretty much use the SX/B on a SX48/52, and still have plenty of extra code, ram and port·space.
4) Also could there be a switch to disable generation of·the power-up sequence code.?
5) How about permitting CONstants to be negative numbers?
This would sure make my life easier on a SX52 project I'm currently doing.
Many thanks for your consideration,
Peter
·
Does my request seem possible, or even make sense?
Perhaps, if it's too much to include in your next release, then how about in a later one?
Peter
Thanks for the input. I can't make any specific promises because I write the help file, but not the actual compiler. Your suggestions have been passed on to that engineer. We're going to have a minor release tomorrow, then a bigger one in a month or so (that included SX48 and SX52 support). Our goal is to make SX/B useful, without being too complicated.
Tomorrow's release (version 1.10) has a NOPRESEVERE option for INTERRUPT that removes the code that saves and restores the __PARAMx variables when going into and out of the ISR. Perhaps we can have a NOSTARTUP option for PROGRAM that works similarly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Thanks for your consideration. I'm looking forward to the new release(s).
Peter