View Single Post
Old 29th Oct 2021, 10:01 pm   #111
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,556
Default Re: MK14 Programming Interface

I have no objection to that idea - especially of allowing comment lines prefixed by '#' but I'm not sure how many hex file editors or readers will accept files with so much non-code outside of the code portions of the file.

Basically, you risk creating Hex files which are compatible with send14 but very little else. I can't think of any common hex file format which actually makes specific provision for the addition of text comments - they are supported as standard in source code, yes, but rarely or never in hex files.

Instead of the end of the file try appending your text to the right hand end of each line instead - the uploader does not look at anything in the line beyond the checksum byte and it does not look for CR or LF so it doesn't depend on those characters to know where the end of the line is.

From memory, the way it parses the line is, it looks for the 'start of line' character ':' Then it gets the 'number of data bytes in this line' figure from the appropriate offset into the line, and it uses that data byte count to determine how many data fetches to do from the line.

Try adding a space + "Hello World" to the end of the first line of an otherwise standard Intel Hex and see if that makes it throw a wobbler.

You're right that the script does not specifically deal with the 'end of file' record, there wasn't actually a need for it do do so until now.
SiriusHardware is offline