diff options
author | Attila Veghelyi <aveghelyi@dension.com> | 2023-06-29 16:24:54 +0200 |
---|---|---|
committer | Attila Veghelyi <aveghelyi@dension.com> | 2023-06-29 16:24:54 +0200 |
commit | 925d0670c45e1100e412070fa0ce2405604f219a (patch) | |
tree | 9bb4412d148bc80751b7a02023cd3e0167f588e7 /ihex.c | |
download | OpenProgrammer-925d0670c45e1100e412070fa0ce2405604f219a.tar.gz OpenProgrammer-925d0670c45e1100e412070fa0ce2405604f219a.zip |
Init repo
Diffstat (limited to 'ihex.c')
-rw-r--r-- | ihex.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -0,0 +1,15 @@ +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + + +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; +} + |