(Format == F_WORD) ? (MSB = 0x8000) : (MSB = 0x80);
for (i = Format; i > 0; i--)
{
((Data & MSB) == 0) ? ClrTDI() : SetTDI();
Data <<= 1;
if (i == 1) // Last bit requires TMS=1
SetTMS();
ClrTCK();
SetTCK();
TDOword <<= 1; // TDO could be any port pin
if (ScanTDO() != 0)
TDOword++;