TDL relative hex loader record format from TDL Z80 ZPU manual and relocating loader program for ZAP monitor V2.0 Jan 1977 and Loader V3.2 Dec 1976. Herb Johnson Oct 2012 Intel/TDL hex record format first char is ';' for relative format or ':' for Intel absolute hex format rest of record is hex byte values as pair of ASCII hex chars 0-9 and A-F capitals. first byte is record length as in Intel format address bytes + data bytes + checksum second/third byte is 16 bit address high/low byte 4th byte is 01 for data format record, I think 00 is a jump-to-address record remaining bytes is data except last byte last byte is checksum of all previous bytes, modulo 256 compliment (zero sum) LF or CRLF ends record. Absolute or Intel data format: all data bytes are memory content from start of record address. TDL Relative record format, as interpreted by Herb Johnson, from loader program. Relative loader saves in BC' register, the relative page (high byte in B) offset as read from front-panel data switches. This 16 bit value is saved in HL and IX registers. IX is used as index plus record address, to load into memory. E is used to count down bytes to read and load from record. When zero, the last byte is read as checksum. Relative record data format is first byte is bit pattern for next eight bytes 2nd-9th bytes in record are data. 10th byte is bit pattern for next eight bytes 11th-18th bytes in record are data. ...and so on until the last data byte, followed by checksum byte. The bit pattern does not carry over to the next record. The bit pattern byte is left-shifted into carry, before the data byte is read. If carry is set for a data byte, then that byte and the next must be a low/high byte address. The second data byte is read, the relocation value is added to the low/high byte pair, and the low/high bytes are stored as a relocated address. Otherwise, bytes are stored without "relocation". Therefore, the bit pattern byte indicates the relative location (to the bit pattern byte) of the low byte of a low/high address byte pair in the record. Here's an example of a pair of relative format records and the resulting code, from the 1K ZAP monitor V2.0 and a recovered paper tape image of that same monitor. ;1800000149C30803C37403C37D2403C32202C33302C3902202C3820292 ;18001501093E00C9C31700C3FF2002CD1303F90E2ACD80220218150D45 ;first record 49 ;relocation, 01001001, shift LEFT to read each bit C30803 JMP 0308 ;relocate address C37403 JMP 0374 ;relocate address C37D 24 ;relocation, 00100100 03 JMP 037D C32202 JMP 0222 C33302 JMP 0233 C3 90 ;relocation, 10010000 2202 JMP 0222 C38202 JMP 0282 ;second record 09 ;relocation, 00001001 3E 00 MVI A,00H C9 RET C31700 JMP 0017 ;relocate address C3FF 20 ;relocation, 00100000 02 JMP 02FF ;relocate address CD1303 CALL 0313 F9 SPHL 0E2A MVI C,2AH CD 80 ;reloation, 10000000 2202 CALL 0222 1815 JMPR 15H 0D DB CR ;next record..... Herb Johnson