/* CRC16 for MODBUS RTU protocol ------------------------------------- This macro transmits a message from the send dialog and appends two bytes with CRC at the end */ main() { var s; s = crc()%0xFFFF; putx(s&0xFF); putx(shr(s,8)&0xFF); flush(); } crc() { var s,j,t,i; s = 0xFFFF; for(i=0; i