2
\$\begingroup\$

I have a file with a name like xxxx.asm

in it I have:

InitPORTA MACRO

pic-as throws a syntax error on this line. The code compiled fine with:
mpasmx -rdec pic-code.s
I thought *.asm files were the file type that pic-as took to mean assembly with no C contructs in them and would thus assemble them as the older assembler did.
Is there something obvious I missed?

\$\endgroup\$
2
  • \$\begingroup\$ for pic-as you nedd *.s files and not *.asm files. \$\endgroup\$
    – Mike
    Commented Apr 27, 2021 at 4:50
  • \$\begingroup\$ Also consider what file encoding is being used on the source file. Could be that the assembler is expecting a different type. \$\endgroup\$
    – rdtsc
    Commented Apr 27, 2021 at 12:16

2 Answers 2

1
\$\begingroup\$

MPASM and pic-as are using different file types:
MPASM: *.asm files
pic-as: *.s files

Please remember, there are a lot more differences between these assembler types. See this document for the details.

\$\endgroup\$
1
\$\begingroup\$

It seems to be a bug in pic-as
InitPortA(space)(space)---(space)MACRO
made the syntax error happen. Replacing the white spaces with a press of the tab key made that line compile. It seems that not all white spaces are taken as the same thing
This has become moot for me because I rolled back to v5.35 and mpasmx. I think it is better to finish my project with that version. I saw reports on line that suggested that pic-as is quite buggy. Perhaps my issue was one of the bugs.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ What exactly is '(space)(space)---(space)'? Please show your actual source code text, using the 'code sample' tag. \$\endgroup\$ Commented Apr 27, 2021 at 7:03
  • \$\begingroup\$ At about line 3 of my initial question is a copy-and-paste of the line of text from the source file. My '(space)(space)---(space)' represents some number of presses of the space bar that I don't know. I didn't keep the original so how many it was would be an estimate. The word "MACRO" was aligned at column 16 so 7 would be the number of spaces. \$\endgroup\$
    – Ken Smith
    Commented Apr 28, 2021 at 14:09
  • \$\begingroup\$ Maybe edit your answer with the <code sample tag> \$\endgroup\$
    – Mike
    Commented Apr 29, 2021 at 4:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.