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?
2 Answers 2
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.
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.
-
1\$\begingroup\$ What exactly is '(space)(space)---(space)'? Please show your actual source code text, using the 'code sample' tag. \$\endgroup\$Bruce Abbott– Bruce Abbott2021年04月27日 07:03:49 +00:00Commented 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– Ken Smith2021年04月28日 14:09:55 +00:00Commented Apr 28, 2021 at 14:09
-
\$\begingroup\$ Maybe edit your answer with the <code sample tag> \$\endgroup\$Mike– Mike2021年04月29日 04:53:08 +00:00Commented Apr 29, 2021 at 4:53
*.s
files and not*.asm
files. \$\endgroup\$