Hi Herbert, If you look in the Microchip Assembler user's guide, there is a description of the Intel .HEX format. Some of the fields are for checksum, others for address, etc. For the programmer I built, I had to write a conversion program to convert between the Intel .HEX file and the downloader's file format. As for the incongruities, you might be using the wrong HEX format. Is it set to INHX8M? I think INHX8S splits the hex into two halves, and the INHX32 is for 32 bit stuff. You probably want INHX8M. Hope this helps, Eric ______________________________ Reply Separator _________________________________ Subject: Odd Problem Author: Herbert Graf at INTERNET Date: 9/9/97 8:48 PM I am planning to build the PC Parallel port programmer in I believe application note an589 from microchip, the problem is it only includes routines for programming the pic, not decoding the hex file. This is not much of a problem, I can program that myself, the problem is some incongruities between the asm file and the lst file produced by the MPASM program, here is an example: the .lst file: 0000 00068 ORG 0 0000 2850 00069 GOTO Start 00070 00071 ;-------------------------------------------------------------------------- 00072 ; Main Program 00073 ;-------------------------------------------------------------------------- 00074 0050 00075 ORG H'50' 00076 0050 00077 Start 0050 30FF 00078 MOVLW 255 ; Initialize the variables to 0051 00A0 00079 MOVWF CountDown ; their starting values. 0052 3001 00080 MOVLW 1 0053 00A1 00081 MOVWF Doubler 0054 3007 00082 MOVLW 7 0055 00A2 00083 MOVWF OuterLoop 0056 00084 Loop 0056 205A 00085 CALL Reduce ; Perform the inner portion of 0057 0BA2 00086 DECFSZ OuterLoop,f ; the loop. 0058 2856 00087 GOTO Loop 00088 0059 2850 00089 GOTO Start ; Repeat the whole thing. 00090 00091 ;-------------------------------------------------------------------------- 005A 00092 Reduce 005A 0EA1 00093 SWAPF Doubler,f ; Reduce CountDown by the 005B 0E21 00094 SWAPF Doubler,w ; value of Doubler. Then 005C 0EA1 00095 SWAPF Doubler,f ; call the doubling routine. 005D 02A0 00096 SUBWF CountDown,f 005E 2060 00097 CALL Double 005F 3400 00098 RETLW 0 00099 00100 ;-------------------------------------------------------------------------- 0060 00101 Double 0060 0EA1 00102 SWAPF Doubler,f ; Double the value of Doubler 0061 0E21 00103 SWAPF Doubler,w ; by adding it to itself. 0062 0EA1 00104 SWAPF Doubler,f 0063 07A1 00105 ADDWF Doubler,f 0064 3400 00106 RETLW 0 MPASM 01.99.33 Intermediate TUTOR.ASM 9-9-1997 20:06:25 PAGE 3 ---------------------------------------------------------------------------- ------------------------------------------------------------ the .hex file (i've put spaces in to make sense of it) :02 0000 00 5028 86 :10 00A0 00 FF30 A000 0130 A100 0730 A200 5A20 A20B AF :10 00B0 00 5628 5028 A10E 210E A10E A002 6020 0034 67 :0A 00C0 00 A10E 210E A10E A107 0034 CD :00 0000 01 FF No if you look, according to the lst file the address of start is 0050, however the address of start is 00A0. Am I missing something? If you look at the second command on the third line of the .hex file you'll notice the command points to 0050, but start is located at 00A0. Now, I doubt I will have code that is partitioned like this, but I would like to know why it is happening. Thanks in advance for any help.