Redefinition of Two Bytes as a Word Variable in SX/B?
Sparks-R-Fun
Posts: 388
Does anyone know what I need to do to redefine two existing byte variables for use as a word variable using SX/B? The goal, of course, is to make maximal use of variable space.
For example, if I have the following:
What must I do to declare Temp12 as a word variable occupying the same memory space as Temp1 and Temp2 combined?
- Sparks
For example, if I have the following:
Temp1 var byte Temp2 var byte
What must I do to declare Temp12 as a word variable occupying the same memory space as Temp1 and Temp2 combined?
- Sparks
Comments
Will actually define two bytes that you have access to:
tmpW1_LSB
tmpW1_MSB
Declaring the word variable first before the shared byte variables was the trick I was seeking! Thank you.
- Sparks
In many cases a single element array can be used too.
temp1 VAR Byte (1)
temp1(0) = 5
Arrays are stored differently than regular variables (even single element arrays). So there can be many more of them. They won't work in very case thought (like as a FOR...NEXT control variable).
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Cheap used 4-digit LED display with driver IC·www.hc4led.com
Low power SD Data Logger www.sddatalogger.com
SX-Video Display Modules www.sxvm.com
Stuff I'm selling on ebay http://search.ebay.com/_W0QQsassZhittconsultingQQhtZ-1
"USA Today has come out with a new survey - apparently, three out of every four people make up 75% of the population." - David Letterman