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

include a c function within an assembler project

Hi all,
I have a project (in uv2) with 3 differents asm files.
The first one (BIOS) is located in the lower part of CODE MEMORY between 0x0000 and 0x03FF, the second one (APP) is located between 0x0400 and 0xF5FF and the last one is located in the upper part of CODE MEMORY starting an 0xF600.
In other words my software structure is:

BIOS.asm (1st file)
-------- CSEG at 0x0000

;... ;asm code ;...

APP.asm (2nd file)
------- CSEG at 0x0400

;... ;asm code ;...

LOADER.asm (3th file)
---------- CSEG at 0xF600

;... ;asm code ;...

Now I need to add a C-function inside my project (I don't want to translate it in assembler) and I need my function should in the 2nd memory space, just like APP code (is not important the absolute address but is important it should within 0x0400 and 0xF5FF).
The c-function will be called from APP code.
I have 2 questions about this issue:

1st question)How can locate my function within boundaries I need?

2nd question)How can exchange data between c-function and asm code?

I already tried with suggestions reported in C51 manual and in keil application notes, but without success.

Thanks in advance
Maurizio