This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

about start.a51 files

i trying to understand startup files, here an example
start_mx.a51

;----------------------------------------------------;  START_MX.A51:  This code is executed after processor reset.
;  You may add this file to a uVision2 project.


according to this defintion, always after reset this codes will execute

here is an another part:

PDATASTART      EQU     0H      ; the absolute start-address of PDATA memory
PDATALEN        EQU     0H      ; the length of PDATA memory in bytes.


for example if i determine program data memory 100H PDATALEN EQU 100H ;

IF PDATALEN <> 0
                MOV     R0,#PDATASTART
                MOV     R7,#LOW (PDATALEN)
                CLR     A
PDATALOOP:      MOVX    @R0,A
                INC     R0
                DJNZ    R7,PDATALOOP
ENDIF


according to this code all the program memory will clear after reset. why this codes necessary? why the programmers wants clear their program memory, if i clears program memory , program dosent work. is it true?

0