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?

Mike
2,6192 gold badges17 silver badges31 bronze badges
asked Apr 26, 2021 at 17:45
\$\endgroup\$
2
  • \$\begingroup\$ for pic-as you nedd *.s files and not *.asm files. \$\endgroup\$ 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\$ 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.

answered Apr 27, 2021 at 5:46
\$\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.

answered Apr 26, 2021 at 18:25
\$\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\$ Commented Apr 28, 2021 at 14:09
  • \$\begingroup\$ Maybe edit your answer with the <code sample tag> \$\endgroup\$ Commented Apr 29, 2021 at 4:53

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.