AnsweredAssumed Answered

EPROM programming problem, HC705C8

Question asked by Bill Thomas on Aug 13, 2015
Latest reply on Aug 23, 2015 by Bill Thomas

I have a requirement to support an old product using the HC705C8. I have the LST file and the S19 file. When I try programming, it stops at a point where it is trying to rewrite a memory location. The problem piece out of the LST file is :

09D5 CD0B82    1207  DD4:      JSR    EEREAD         ; READ BYTE FROM EEPROM
09D8 D70100    1208            STA    $0100,X        ; THE FOLLOWING GIVES WORD OFFSET
09D9           1209            ORG    $-2
09D9 0020      1210            DW     {CAPBUF-CAPSTRT}
09DB 5C        1211            INCX
09DC 3AD4      1212            DEC    COUNT
09DE 26F5      1213            BNE    DD4            ; LOOP FOR NEXT DIGIT

At line 1209, the ORG statement is setting the memory location pointer back by 2, but locations 09D8, 09D9 & 09DA have already been used by 'STA $0100,X'.
I do not understand the point of the ORG  $-2   in the middle of a long file.

The originator of this code is no longer available.   Can anyone suggest the reason for this?  Is it a security 'trick'?

 

Bill

Outcomes