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

need help in file start166 for clr_memory

I want read the port P2 (SAB167CR) in startA166 module and testing value for enable or not the clr_memory

example:
if P2^1 = 0 i will clear memory
else P2^1 = 1 no clear memory

if you know who do this function please send me a message.
Best regard

  • It's easy. Find the following in START167.A66:

    ; The following code is necessary to set RAM variables to 0 at start-up
    ; (RESET) of the C application program.
    ;
    
    $IF (CLR_MEMORY = 1)
    and modify it:
    ; The following code is necessary to set RAM variables to 0 at start-up
    ; (RESET) of the C application program.
    ;
    
    P2 DEFR 0FFC0H
    JB P2.0 EndClear
    
    $IF (CLR_MEMORY = 1)
    That will skip the 'clear variables' portion if P2.0 is set. If you'd rather skip variable initialization as well, replace EndClear with EndInit.

    Regards,
    - mike

  • thanks a lot it work good

    Regard Yuri