From 925d0670c45e1100e412070fa0ce2405604f219a Mon Sep 17 00:00:00 2001 From: Attila Veghelyi Date: Thu, 29 Jun 2023 16:24:54 +0200 Subject: Init repo --- ihex.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 ihex.c (limited to 'ihex.c') diff --git a/ihex.c b/ihex.c new file mode 100644 index 0000000..39d3b94 --- /dev/null +++ b/ihex.c @@ -0,0 +1,15 @@ +#include +#include +#include + + +int main (int argc, char **argv) { + int i,s=0,t; + for (i = 1; i < argc; i++){ + sscanf(argv[i], "%X", &t); + s+=t; + } + printf("checksum=%02X\n",(-s)&0xff); + return 0; +} + -- cgit v1.2.3-54-g00ecf