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

Passing arguments between c and assembler functions

I am trying to write a c program in keil, which interfaces with assembler functions. I have managed to allow the c program to call these functions but i'm unsure of how to pass arguments between them.

My assembler function is as follows. However, i wish to replace the #55h with an argument from the function call in c.

?PR?write_text?WRITE_TEXT SEGMENT CODE
PUBLIC write_text
RSEG ?PR?write_text?WRITE_TEXT
write_text:
SETB EN
SETB RW
MOV CMD,#55h
CLR EN
ACALL WAIT_LCD
RET

Any help would be much appreciated.

Thank You,

Tim Wood

0