X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=src%2Fcommon%2Fhexfile.c;h=c9c7de32ce9e8de8e90a4225254b7d6ea595cc1f;hb=fbbb71d6d8aa93bccc87b17408a89432e4b8161c;hp=8967cf896c08e03056a12ce61ced77c4304539a7;hpb=5419d1bd9d2faae98c78da740634b972e8f5aac1;p=emu8051.git diff --git a/src/common/hexfile.c b/src/common/hexfile.c index 8967cf8..c9c7de3 100644 --- a/src/common/hexfile.c +++ b/src/common/hexfile.c @@ -11,7 +11,6 @@ # include "config.h" #endif -#include #include #include #include @@ -35,11 +34,11 @@ void int2asciihex(int val, char *str, int width) { if (width == 1) - sprintf(str , "%.1X", (u_int8_t) val); + sprintf(str , "%.1X", (uint8_t) val); else if (width == 2) - sprintf(str , "%.2X", (u_int8_t) val); + sprintf(str , "%.2X", (uint8_t) val); else if (width == 4) - sprintf(str , "%.4X", (u_int16_t) val); + sprintf(str , "%.4X", (uint16_t) val); else sprintf(str , "Err"); } @@ -149,9 +148,9 @@ hexfile_load(const char *filename) if (rec_type == 0) { for (j = 0; j < rec_len; j++) { data = asciihex2int_len(&line[i], 2); - memory_write8(PGM_MEM_ID, - (unsigned int) (load_offset + j), - (unsigned char) data); + mem_write8(PGM_MEM_ID, + (unsigned int) (load_offset + j), + (unsigned char) data); i += 2; checksum += data; }