I need some help...
I am brand new to SX development - I have been using BS2's for quite some time.
I have a question that may be pretty basic, but it is driving me crazy.
I am using SX/B only (no in line assembly) and I am trying to run through a series of baud rates in the SERIN command using a program line like this:···
I have defined a number of constants like this:
So, I am trying to assign the values in the Baud1 through Baud4 to the Baud variable like this:
And I am getting a compile error.
Would someone please help a new guy out and tell me how to do this with SX/B?· I have been trying to use the SX/B help file but I can't figure it out.· There are references to something called a "z-string", but I don't know what this is and I can't find a clear definition anywhere.· I have also been reading about the "READ" command that works with the "DATA" command, but I don't know if that is an appropriate set of commands to use, or not.
Any help or tips would be appreciated.
Thanks
Mike
I have a question that may be pretty basic, but it is driving me crazy.
I am using SX/B only (no in line assembly) and I am trying to run through a series of baud rates in the SERIN command using a program line like this:···
SERIN RA.0, Baud, tmpB1
I have defined a number of constants like this:
Baud1··········· CON···· "T3600"
Baud2··········· CON···· "OT3600"
Baud3··········· CON···· "N3600"
Baud4··········· CON···· "ON3600"
Baud2··········· CON···· "OT3600"
Baud3··········· CON···· "N3600"
Baud4··········· CON···· "ON3600"
So, I am trying to assign the values in the Baud1 through Baud4 to the Baud variable like this:
Baud = Baud1
And I am getting a compile error.
Would someone please help a new guy out and tell me how to do this with SX/B?· I have been trying to use the SX/B help file but I can't figure it out.· There are references to something called a "z-string", but I don't know what this is and I can't find a clear definition anywhere.· I have also been reading about the "READ" command that works with the "DATA" command, but I don't know if that is an appropriate set of commands to use, or not.
Any help or tips would be appreciated.
Thanks
Mike
Comments
... but you can do this (I do it all the time):
The reason is that Baud1 is a string and that is not a valid type in SX/B so the assignment you're attempting is not valid. What this means, though, is that you can't change baud rates on the fly.