MPASM going into an M-SPASM! - Page 1
Forum section: electronics / general

author: glossywhite
author_rank: Regular Contributor
timestamp: January 18, 2011, 12:38:24 am
content: Hi. I have 3 PCs - one has XP, the other two, Win 7. On the XP machine, the code I am trying to compile with MPASM, which compiles fine on Windows 7, throws a hissy fit:Code:Warning C:\FROM_MEMORY.ASM 1 : Found directive in column 1. (list)Error C:\FROM_MEMORY.ASM 2 : Cannot open file (Include File "P16F627.INC" not found)Warning C:\FROM_MEMORY.ASM 4 : Found directive in column 1. (__CONFIG)Error C:\FROM_MEMORY.ASM 4 : Symbol not previously defined (_INTRC_OSC_NOCLKOUT)Error C:\FROM_MEMORY.ASM 4 : Symbol not previously defined (_WDT_OFF)Error C:\FROM_MEMORY.ASM 4 : Symbol not previously defined (_PWRTE_ON)Error C:\FROM_MEMORY.ASM 4 : Symbol not previously defined (_LVP_OFF)Warning C:\FROM_MEMORY.ASM 7 : Found opcode in column 1. (MOVLW)Warning C:\FROM_MEMORY.ASM 8 : Found opcode in column 1. (MOVWF)Error C:\FROM_MEMORY.ASM 8 : Symbol not previously defined (CMCON)Warning C:\FROM_MEMORY.ASM 11 : Found opcode in column 1. (BSF)Warning C:\FROM_MEMORY.ASM 14 : Found opcode in column 1. (MOVLW)Warning C:\FROM_MEMORY.ASM 15 : Found opcode in column 1. (MOVWF)Message C:\FROM_MEMORY.ASM 15 : Register in operand not in bank 0. Ensure that bank bits are correct.Warning C:\FROM_MEMORY.ASM 18 : Found opcode in column 1. (MOVLW)Warning C:\FROM_MEMORY.ASM 19 : Found opcode in column 1. (MOVWF)Message C:\FROM_MEMORY.ASM 19 : Register in operand not in bank 0. Ensure that bank bits are correct.Warning C:\FROM_MEMORY.ASM 22 : Found opcode in column 1. (CLRF)Warning C:\FROM_MEMORY.ASM 25 : Found opcode in column 1. (BCF)Warning C:\FROM_MEMORY.ASM 28 : Found opcode in column 1. (MOVLW)Warning C:\FROM_MEMORY.ASM 29 : Found opcode in column 1. (MOVWF)Warning C:\FROM_MEMORY.ASM 32 : Found directive in column 1. (END)It is the fact that it cannot find the .INC file which alarms me most; any ideas?Thank you

author: EEwannabe
author_rank: Contributor
timestamp: January 18, 2011, 02:24:53 am
content: Add some space so instead of:Code:list p=pic16f627Code:list p=pic16f627and to include the other file:Code:#include <p16f627.inc>and to get rid of the annoying 302 warning:Code:errorlevel -302-Patrick

author: glossywhite
author_rank: Regular Contributor
timestamp: January 18, 2011, 02:42:36 am
content: Quote from: EEwannabe on January 18, 2011, 02:24:53 amThanks. Why does space help? :/

author: EEwannabe
author_rank: Contributor
timestamp: January 18, 2011, 02:48:49 am
content: The compiler only likes the first column to be used for labels. Hence all the warnings it threw at you.-Patrick

author: glossywhite
author_rank: Regular Contributor
timestamp: January 18, 2011, 02:53:30 am
content: Quote from: EEwannabe on January 18, 2011, 02:48:49 amAH. IC, ICAll was well on Win7 tho :S

author: EEwannabe
author_rank: Contributor
timestamp: January 18, 2011, 03:08:51 am
content: The win7 ones should have compiled fine with just the warnings, the include error is what failed you in XP not sure what changed but hope all is well now. : )-Patrick

author: RayJones
author_rank: Frequent Contributor
timestamp: January 18, 2011, 07:15:30 am
content: Most obvious thing that comes to mind is the lack of an environment variable, or similar, being set correctly on the XP machine. eg PATH including the include directories, or possibly an MPASM specific variable.Dunno, haven't used MPASM and don't know what presets you may need in the OS, but if one OS works and the other doesn't, then it smells like that sort of issue...

author: glossywhite
author_rank: Regular Contributor
timestamp: January 18, 2011, 01:54:18 pm
content: Quote from: RayJones on January 18, 2011, 07:15:30 amThanks for your help mate. Yeah, I kinda don't buy the explanation that missing whitespace caused my code not to compile; if that were true, it would have failed on Win 7 also, and it didn't. Okay, maybe it causes *warnings*, but compile errors? surely not.