|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Assembly code in C?
I have a quick question: is it possible to use assembly code in C?
My experience was that in C++ (oh, how I miss C++), you could have code like this: Code:
_asm
{
/* Assembly code goes here */
}
Thanks in advance! |
|
#2
|
||||
|
||||
|
Re: Assembly code in C?
Quote:
From ifi_startup.c: Code:
void _startup (void)
{
_asm
/* Initialize the stack pointer */
lfsr 1, _stack lfsr 2, _stack clrf TBLPTRU, 0 /* 1st silicon doesn't do this on POR */
bcf FPFLAGS,RND,0 /* Initialize rounding flag for floating point libs */
/* initialize the flash memory access configuration. this is harmless */
/* for non-flash devices, so we do it on all parts. */
bsf 0xa6, 7, 0
bcf 0xa6, 6, 0
_endasm
loop:
Clear_Memory();
_do_cinit ();
/* Call the user's main routine */
main ();
goto loop;
} /* end _startup() */
|
|
#3
|
|||
|
|||
|
Re: Assembly code in C?
Thanks for your response! That clears up a lot of questions.
|
|
#4
|
|||
|
|||
|
Re: Assembly code in C?
Just in case anyone else might find assembly code useful, I found a link containing a list of commands - I'll have to test it but from the source code I've seen these are the commands used to program low level functions for the robot controller.
http://www.picbasic.co.uk/forum/showthread.php?t=222 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Out of the Box Camera Code | russell | Programming | 9 | 21-10-2009 05:28 |
| Code suddenly fails to initialize | miketwalker | Programming | 11 | 19-02-2005 15:23 |
| Team THRUST - Kevin's Code and Camera Code Combine | Chris_Elston | Programming | 3 | 31-01-2005 22:28 |
| Sourceforge for Code Repository and other stuff | SilverStar | Programming | 9 | 15-01-2005 21:16 |
| heres the code. y this not working | omega | Programming | 16 | 31-03-2004 15:18 |