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

Call functions

Hi,

I have some assembly routines located in ROM memory, for example asmfunc that is located at address 0xF700 - is absolute address of flash memory.

The program memory is organized:
ROM code from address 0xF000 - 0xFFFF
Flash code from address 0x0000 - 0xEFFF

I have my C code and I want to call from C the assembly function asmfunc located at address 0xF700, how I can do this?

I know to call function asmfunc if my code is in Assembly using for example this:

asmfunc equ 0xF700
. .
lcall asmfunc
. .

Thanks,
Nels

Parents Reply Children
  • Hi,

    First of all I read the manual. I think the problem is not "underscore" in assembly function but:

    My flash memory is mapped 0x0000-0xF000 for flash code, 0xF000-0xFFFF this address is re-mapped to other memory - ROM memory, here I have assembly code with some routines.

    so in my case I have two firmware projects! one project_rom.Uv2 written in assembly located in ROM, other project_flash.Uv2 located in the flash.

    I would like to call directly some assembly routines located in ROM from "C" in the flash memory --> that corresponds to the project_flash.Uv2

    Thanks you.