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

initialisze xdata and code memory

Can I get some info on how to initialise the Code memory and data memory

1)Unsigned char xdata temp _at_ 0x8000;
2)unsigned char code temp1_at_0x8000;

In the cases mentioned above , how
do i initialise 20 bytes of data conitiugously

Parents
  • If you really want to hack an initialisation to a fixed memory
    location, you could compile a file which might say:

    #pragma SRC
    unsigned int xdata variable = 0x1234;
    
    then look up the ?C_INITSEG-Part of the generated
    Src-file and copy this into a separate assembly - module,
    adding:
    EXTRN XDATA variable
    
    I've once tried this and it worked fine, but I never tried it
    with fixed memory locations.

    Norbert

Reply
  • If you really want to hack an initialisation to a fixed memory
    location, you could compile a file which might say:

    #pragma SRC
    unsigned int xdata variable = 0x1234;
    
    then look up the ?C_INITSEG-Part of the generated
    Src-file and copy this into a separate assembly - module,
    adding:
    EXTRN XDATA variable
    
    I've once tried this and it worked fine, but I never tried it
    with fixed memory locations.

    Norbert

Children
No data