you need in two programs: the first one that is executed on the host computer, the second one that is executed on the target computer.
The first program is not big and is not small... about 30Kb for DOS (10-15=EBb in =F3), the second is about 5-10Kb in C.
Check sum, ACK/NACK, diagnostics... etc. Some problems can be if you load in a flash-memory the second program consists in ... well... to be short:
The first program: open file, init port - send string - receive ACK -
etc. till the END - close file
The second program: init port - recieve string - check sum - send ACK - w=
rite in
memory - etc. till the END - the next step (RUN the code, etc.)
> how can i download a hex file to serial port using c language? <
i dont know exactly wht you want to know, as friends said, they want to know in the language side of the problem. i dont know much about language, so i wish i could help you with some info about hex file structure (if you not know yet)