OpenCores
URL https://opencores.org/ocsvn/eco32/eco32/trunk

Subversion Repositories eco32

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /eco32/trunk/tools/bin2mcs
    from Rev 40 to Rev 234
    Reverse comparison

Rev 40 → Rev 234

/bin2mcs.c
48,13 → 48,15
if (outfile == NULL) {
error("cannot open output file %s", argv[3]);
}
fprintf(outfile, ":02000004");
fprintf(outfile, "%04X", loadAddr >> 16);
chksum = 0x02 + 0x04 +
((loadAddr >> 24) & 0xFF) +
((loadAddr >> 16) & 0xFF);
fprintf(outfile, "%02X\n", (-chksum) & 0xFF);
while (1) {
if ((loadAddr & 0xFFFF) == 0) {
fprintf(outfile, ":02000004");
fprintf(outfile, "%04X", loadAddr >> 16);
chksum = 0x02 + 0x04 +
((loadAddr >> 24) & 0xFF) +
((loadAddr >> 16) & 0xFF);
fprintf(outfile, "%02X\n", (-chksum) & 0xFF);
}
chksum = 0;
for (numBytes = 0; numBytes < 16; numBytes++) {
c = fgetc(infile);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.