Jump to content

Recommended Posts

I would like to use call and rcall in in-line assembler, for example:

 

asm{

loop

some code

call test

some code

goto loop

test:

some code

return

}

 

Unfortunately I get an error saying the procedure I want to call (test in this example) doesn't exist. Are call and rcall supported in inline assember? If yes what anm I doing wrong, if no what would be the workaround?

 

Cheers,

Bert

 

PS Yes I know it would be easier in C but I need it in in-line assembler.

Share this post


Link to post
Share on other sites

Bert,

 

You may need to put a C wrapper around any called subroutines.

 

void test(void);  // Prototype.

void test(void)
{
 asm {
 // code here...
 }
}

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites

If you are not using .h files to declare your subroutines then define a subroutine in the file before you use ( call ) it. This applies to all the

c routines I am used to.

 

 

I would like to use call and rcall in in-line assembler, for example:

 

asm{

loop

some code

call test

some code

goto loop

test:

some code

return

}

 

Unfortunately I get an error saying the procedure I want to call (test in this example) doesn't exist. Are call and rcall supported in inline assember? If yes what anm I doing wrong, if no what would be the workaround?

 

Cheers,

Bert

 

PS Yes I know it would be easier in C but I need it in in-line assembler.

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...