SX/B -- Arrays and Bit-Index
Regarding arrays and bit indexing:
Symbol VAR Byte { (Size) } {.bitIndex}
Can't the·bitIndex number be a VARiable?
·I'm trying to bit-bang out a byte (on RA.0) without using >>.
·** Post Edit **· No Replies.· Dang.· Moving forward with SHR (a.k.a. >>.)· Transmitting data 1200, 8-E-1.· So far, so good; no parity, frame or block errors.· Huzzah.
Post Edited (PJ Allen) : 12/17/2006 1:37:26 AM GMT
Symbol VAR Byte { (Size) } {.bitIndex}
Can't the·bitIndex number be a VARiable?
FOR [color=red]X[/color] = 0 TO 7 iso_bit = xmt_string(0).[color=red]X [/color] RA.0 = iso_bit PAUSEUS duration NEXT
·I'm trying to bit-bang out a byte (on RA.0) without using >>.
·** Post Edit **· No Replies.· Dang.· Moving forward with SHR (a.k.a. >>.)· Transmitting data 1200, 8-E-1.· So far, so good; no parity, frame or block errors.· Huzzah.
FOR parse = 0 TO 7 iso = xmt_str & $01 'result = $00 or $01 RA.0 = iso.0 'output bit 0 of iso parbit = parbit + iso PAUSEUS 833.3 xmt_str = xmt_str SHR 1 'Shift Right xmt_str NEXT 'NEXT parse
Post Edited (PJ Allen) : 12/17/2006 1:37:26 AM GMT
Comments
No the bitIndex CANNOT be a variable. This is mainly due to the fact that the SX processor does not allow it in assembly either.
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