Keil Logo Arm Logo

Discussion Forum

passing array to inline assembly

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
damodar naidu
Posted
28-Mar-2007 20:57 GMT
Toolset
C51
New! passing array to inline assembly

i am sending details of my problem,i want to send array values stored in c function to inline assembly created in separate file .i have array declared in main file as extern like below

extern unsigned char read_val[3];

and in assembly i have used

mov r0, read_val[0]
mov r1,read_val[1]
mov r2,read_val[3]
between # pragma asm &#pragma endasm
Also i have to pass value stored im memoty locations
k1 EQU 14H
K2 EQU 15H
K3 EQU 16H
K4 EQU 17H to c function in main file

Read-Only
Author
erik malund
Posted
28-Mar-2007 21:20 GMT
Toolset
C51
New! RE: passing array to inline assembly

if you read your original thread http://www.keil.com/forum/docs/thread9602.asp instead of posting the same question again, you would find the answer.

mov r0, read_val[0]
I know of no assembler that would understand that one. It seems you need bone up on your assembler skills.

Erik

Read-Only
Author
Andy Neil
Posted
28-Mar-2007 23:48 GMT
Toolset
C51
New! Inline??

... values stored in c function to inline assembly created in separate file... "

What is the point of having "inline" assembly is in a separate file?!

Surely, if it's in a separate file you're going to have to Call it anyway - so why not just make it proper assembler?!

Next Thread | Thread List | Previous Thread Start a Thread | Settings

arm-logo-small

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.