Discussion about the ZBasic language including the System Library. If you're not sure where to post your message, do it here. However, do not make test posts here; that's the purpose of the Sandbox.
The System Library Reference suggests that the value in ShiftOutEx can be Int8/16. Int8 seems not to work, however. I can get the correct bits sent only with a shifted Int16, i.e.
GTBecker wrote:I can get the correct bits sent only with a shifted Int16
When shifting out data MSB first, the first bit to be output is always bit 15 irrespective of whether the supplied data value is 8-bit or 16-bit.
The documentation should be more clear, perhaps, that if you provide an 8-bit data value, it is merely promoted to a 16-bit value but not shifted in any way. To do this would require compile-time knowledge of the value of the "number of bits' parameter which is not always possible.