Hi Vasile, You can search for keywords in all JAL libraries I assume.
But swapping can be done simpler I think. For example. var word crc_in var byte crc_in_low at crc_in var byte crc_in_high at crc_in + 1 var word crc_out var byte crc_out_high at crc_out var byte crc_out_low at crc_out + 1 crc_out_low = crc_in_low crc_out_high = crc_in_high Kind regards, Rob ________________________________ Van: [email protected] <[email protected]> namens vsurducan <[email protected]> Verzonden: woensdag 18 september 2024 12:55 Aan: [email protected] <[email protected]> Onderwerp: [jallib] Re: searching for procedures in jal lib files var byte LSB_crc, MSB_crc procedure swap_LSB_MSB (word in crc, word out swapped_crc) is -- When the CRC is placed into the message, its upper and lower bytes must be swapped crc_lo; crc_hi LSB_crc = byte (crc & 0x00ff) crc = crc >> 8 MSB_crc = byte (crc) swapped_crc = 256*LSB_crc + MSB_crc end procedure Obviously the procedure in the email below was wrong...not really sure about this one (from the compiler perspective)....:) On Wed, Sep 18, 2024 at 12:28 PM vsurducan <[email protected]<mailto:[email protected]>> wrote: I think this topic was previously discussed a long time ago... How can I search for a specific procedure ( for example swapping bytes in a word) in order to find different types of implementation (for lower code length, etc)? thx, procedure swap_LSB_MSB (word in crc, word out swapped_crc) is -- When the CRC is placed into the message, its upper and lower bytes must be swapped crc_lo; crc_hi LSB_crc = byte (crc & 0x00ff) MSB_crc = byte (crc & 0xff00) swapped_crc = 256*LSB_crc + MSB_crc end procedure -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]<mailto:[email protected]>. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/CAM%2Bj4quAieRNT9RWkHa-qS2EjA9SNXA6qL%3DTvdg2WVcyLmwhaQ%40mail.gmail.com<https://groups.google.com/d/msgid/jallib/CAM%2Bj4quAieRNT9RWkHa-qS2EjA9SNXA6qL%3DTvdg2WVcyLmwhaQ%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- You received this message because you are subscribed to the Google Groups "jallib" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jallib/GVXP195MB16374CA1EFBBC80E1D78B647E6622%40GVXP195MB1637.EURP195.PROD.OUTLOOK.COM.
