Recommended Additions to SX/B Online Help
John Couture
Posts: 370
In the SX/B help file (Reference / Definitions), it might help to·add to the "Variables" section.·
There is an example of a word variable IDX being split into the LSB by use of idx_LSB but there isn't any other mention of that in the formal definition above.· I found it by just guessing that MSB is also available.· Is there a way to indicate that:
·· Symbol···· ·VAR· Word
······can also be addressed as
·· Symbol_LSB· VAR· Byte
·· Symbol_MSB· VAR· Byte
A little lower down ther is a mention of:
wordVar = lsbValue, msbValue
Am I correct in assuming the lsbValue and msbValue are just arbitrary names that indicate that the lsb should always be in the first position?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College
There is an example of a word variable IDX being split into the LSB by use of idx_LSB but there isn't any other mention of that in the formal definition above.· I found it by just guessing that MSB is also available.· Is there a way to indicate that:
·· Symbol···· ·VAR· Word
······can also be addressed as
·· Symbol_LSB· VAR· Byte
·· Symbol_MSB· VAR· Byte
A little lower down ther is a mention of:
wordVar = lsbValue, msbValue
Am I correct in assuming the lsbValue and msbValue are just arbitrary names that indicate that the lsb should always be in the first position?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
John J. Couture
San Diego Miramar College
Comments
Yes, the aliases wordvar_LSB and wordvar_MSB are automatically created for any word variable.
Let's say you have a bytevar and you want to make a wordvar = bytevar * 256. You could do
wordvar = 0, bytevar
This would be the same as:
wordvar_LSB = 0
wordvar_MSB = bytevar
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
"You're braver than you believe, stronger than you seem, and smarter than you think" Christopher Robin to Pooh
·