Click here to Skip to main content
15,891,718 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question[SOLVED] Inline assembly syntax error.. Pin
CodingLover30-Oct-11 21:59
CodingLover30-Oct-11 21:59 
AnswerRe: Inline assembly syntax error.. Pin
Malli_S30-Oct-11 22:39
Malli_S30-Oct-11 22:39 
GeneralRe: Inline assembly syntax error.. Pin
CodingLover30-Oct-11 23:41
CodingLover30-Oct-11 23:41 
AnswerRe: Inline assembly syntax error.. Pin
Richard MacCutchan30-Oct-11 23:50
mveRichard MacCutchan30-Oct-11 23:50 
GeneralRe: Inline assembly syntax error.. Pin
CodingLover30-Oct-11 23:56
CodingLover30-Oct-11 23:56 
GeneralRe: Inline assembly syntax error.. Pin
enhzflep31-Oct-11 0:51
enhzflep31-Oct-11 0:51 
GeneralRe: Inline assembly syntax error.. Pin
CodingLover31-Oct-11 1:02
CodingLover31-Oct-11 1:02 
GeneralRe: Inline assembly syntax error.. Pin
enhzflep31-Oct-11 1:18
enhzflep31-Oct-11 1:18 
Woooooah! Hold on just a minute. Did you say you're trying this code in mplab?

That code is obviously x86 inline assembly, yet I though MPLab was for embedded devices - i.e mainly PICs.

Looking at your compile log, it seems remarkably similar to the exerpt I just gotfor the HiTech C compiler, as shown below:


Executing: "C:\Program Files (x86)\HI-TECH Software\PICC\9.80\bin\picc.exe" --pass1 C:\Users\enhzflep\Documents\mplab\proj1\..\main.c -q --chip=16F84A -P --runtime=default --opt=default -D__DEBUG=1 -g --asmlist "--errformat=Error [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s"
Error [317] C:\Users\enhzflep\Documents\mplab\proj1\..\main.c; 5.5 "(" expected
Error [318] C:\Users\enhzflep\Documents\mplab\proj1\..\main.c; 5.5 string expected
Error [194] C:\Users\enhzflep\Documents\mplab\proj1\..\main.c; 5.5 ")" expected
Error [312] C:\Users\enhzflep\Documents\mplab\proj1\..\main.c; 5.5 ";" expected
Error [285] C:\Users\enhzflep\Documents\mplab\proj1\..\main.c; 15.1 no identifier in declaration
Warning [374] C:\Users\enhzflep\Documents\mplab\proj1\..\main.c; 15.1 missing basic type; int assumed
Error [314] C:\Users\enhzflep\Documents\mplab\proj1\..\main.c; 15.1 ";" expected

********** Build failed! **********


In that case, I think the problem is something else - i.e No, this compiler
(a) won't accept the asm keyword (but you can easily make functions in asm files then link them together into your program)

and more importantly (just now)
(b) won't build programs that you can run on your PC - I'd have expected to see the code snippet in concern built using VS or GCC.


Though, perhaps I'm just missing something?
GeneralRe: Inline assembly syntax error.. Pin
David Crow31-Oct-11 3:13
David Crow31-Oct-11 3:13 
GeneralRe: Inline assembly syntax error.. Pin
enhzflep31-Oct-11 3:19
enhzflep31-Oct-11 3:19 
GeneralRe: Inline assembly syntax error.. Pin
Richard MacCutchan31-Oct-11 0:54
mveRichard MacCutchan31-Oct-11 0:54 
GeneralRe: Inline assembly syntax error.. Pin
CodingLover31-Oct-11 1:03
CodingLover31-Oct-11 1:03 
GeneralRe: Inline assembly syntax error.. Pin
Snorri Kristjansson31-Oct-11 1:09
professionalSnorri Kristjansson31-Oct-11 1:09 
GeneralRe: Inline assembly syntax error.. Pin
CodingLover31-Oct-11 1:12
CodingLover31-Oct-11 1:12 
AnswerRe: Inline assembly syntax error.. Pin
CodingLover31-Oct-11 23:53
CodingLover31-Oct-11 23:53 
JokeRe: Inline assembly syntax error.. Pin
David Crow1-Nov-11 2:57
David Crow1-Nov-11 2:57 
QuestionHow to get the current active document of MDI application? Pin
rahul.kulshreshtha30-Oct-11 20:41
rahul.kulshreshtha30-Oct-11 20:41 
AnswerRe: How to get the current active document of MDI application? Pin
«_Superman_»30-Oct-11 21:55
professional«_Superman_»30-Oct-11 21:55 
QuestionIIS Metadata, can't write the default pages and Mimes. Pin
jkirkerx30-Oct-11 6:43
professionaljkirkerx30-Oct-11 6:43 
AnswerRe: IIS Metadata, can't write the default pages and Mimes. Pin
jkirkerx30-Oct-11 9:42
professionaljkirkerx30-Oct-11 9:42 
AnswerI'm almost there, how to add to safe array Pin
jkirkerx31-Oct-11 13:18
professionaljkirkerx31-Oct-11 13:18 
QuestionBuild problems Pin
columbos1492730-Oct-11 1:24
columbos1492730-Oct-11 1:24 
AnswerRe: Build problems Pin
Richard MacCutchan30-Oct-11 2:51
mveRichard MacCutchan30-Oct-11 2:51 
AnswerRe: Build problems Pin
_AnsHUMAN_ 30-Oct-11 22:02
_AnsHUMAN_ 30-Oct-11 22:02 
GeneralRe: Build problems Pin
columbos1492731-Oct-11 2:53
columbos1492731-Oct-11 2:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.