Syntax Error in Line 1 with PIC Simulator IDE

Thread Starter

jlaverty

Joined Mar 22, 2020
13
Post #16:
By loading the code into the assembler, I was able to get a little further. Now I'm getting an "Unrecognized instruction" error for line 2 and on. I've added ; to each line, made sure they are all lined up by using the TAB, and nothing seems to work.
 

jpanhalt

Joined Jan 18, 2008
11,087
Have you tried the PIC/Microchip mnemonics. For example, as mentioned, "addc" could be a macro (btfsc STATUS,0; incf regB,f) or a single instruction, addwfc. If the former, wrong result; if the latter, maybe OK given your next step.

Is this "homework?"
 

Thread Starter

jlaverty

Joined Mar 22, 2020
13
Have you tried the PIC/Microchip mnemonics. For example, as mentioned, "addc" could be a macro (btfsc STATUS,0; incf regB,f) or a single instruction, addwfc. If the former, wrong result; if the latter, maybe OK given your next step.
I haven't yet. That will be my next step. Thanks for the tip.
 

atferrari

Joined Jan 6, 2004
5,012
To be honest, I'm fumbling my way through this course. I think I was able to figure it out. By loading the code into the assembler, I was able to get a little further. Now I'm getting an "Unrecognized instruction" error for line 2 and on. I've added ; to each line, made sure they are all lined up by using the TAB, and nothing seems to work.
Why you do not post the code as Eric told you? What game are you playing?
Blah, blah, blah, no good.
 

djsfantasi

Joined Apr 11, 2010
9,237
Why do you not read the whole thread before posting? I posted the assembly code in the first post.
Cool down. The code in the first post is assembly code. But you kept talking about BASIC code.

For most of us here, BASIC code looks and is written completely different than the code you posted.

Hence, we were looking for BASIC code to be posted. And you most definitely did not post anything remotely resembling BASIC.
 

Thread Starter

jlaverty

Joined Mar 22, 2020
13
Cool down. The code in the first post is assembly code. But you kept talking about BASIC code.

For most of us here, BASIC code looks and is written completely different than the code you posted.

Hence, we were looking for BASIC code to be posted. And you most definitely did not post anything remotely resembling BASIC.
Apologies. I made the realization that it was not BASIC and posted about it in post 16. I am definitely not trying to play any games, as was insinuated. I am simply trying to understand this a little more. These errors have me all twisted.
 

Thread Starter

jlaverty

Joined Mar 22, 2020
13
I figured it out. After taking a break, I realized that the commands weren't complete as needed - the mnemonics were wrong as jpanhalt suggested. I was able to solve it.
 

Ian Rogers

Joined Dec 12, 2012
1,136
Just for clarity for all members who posted.. The pic simulator from Oshonsoft also has a full assembler built in.. The basic compiler uses this assembler to make the binary... It can produce MPASM or assemble same...
 

MrChips

Joined Oct 2, 2009
34,823
I figured it out. After taking a break, I realized that the commands weren't complete as needed - the mnemonics were wrong as jpanhalt suggested. I was able to solve it.
Nice. So you solved your problem. For the benefit of all readers would you consider telling us what was the problem and what you did to solve it?

AAC is a community helping each other. It promotes sharing all solutions with everyone.
 
Top