include lib/intelhex.4th               \ Intel hex file demo

[HEX]
OFFSET HEXDUMP
  0F3 C, 0E5 C, 0D5 C, 0C5 C, 0F5 C, 0DD C, 0E5 C,
  0FD C, 0E5 C, 0ED C, 057 C, 0F5 C, 008 C, 0D9 C,
  0E5 C, 0D5 C,                        ( 0FD)
  0C5 C, 0F5 C, 0D9 C, 008 C, 021 C, 018 C, 000 C,
  039 C, 006 C, 00B C, 0EB C, 021 C, 0E4 C, 00F C,
  02B C, 072 C,                        ( 012)
  02B C, 073 C, 0D1 C,                 ( 05A)
TAG HEXDUMP /MYBUFFER

/MYBUFFER BUFFER: MYBUFFER

/MYBUFFER 0 ?DO I HEXDUMP MYBUFFER I TH C! LOOP
1400 BASE-ADDRESS !
MYBUFFER /MYBUFFER .INTELHEX
MYBUFFER /MYBUFFER S" intel.hex" WRITE-INTELHEX
[DECIMAL]

\ Result should be:
\ :10140000F3E5D5C5F5DDE5FDE5ED57F508D9E5D5FD
\ :10141000C5F5D90821180039060BEB21E40F2B7212
\ :031420002B73D15A