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

Locating code at a certain address

How can one locate a table of constants at a certain address in C ?

Parents Reply Children
  • >But why does it need to be fixed?

    I want to rewrite the table of coefficients with the help of bootloading software. I set my chip in 'BIOS' mode, perform the necessary operations and then reactivate my program. In 'BIOS' mode my chip doesn't 'know' where the coefficients are located. In this mode it can only perform generic read/write operations. So I must provide the fixed address.

  • Okay,
    if you always know about values of fixed addresses then you may use direct addressing in your program. For example, coefficients' tables are always placed at addresses 0x1234, 0x2345, 0x3456 and 0x4567. Then for redefinition, just use:
    current_table = 0x2345 etc.
    Good days!