I often use the asm code generated by GCBASIC to debug my programs. In that context I am using Microchip MPASM which differs from the default GCASM used by GCBASIC. Most of the time without any problem.
I am running into a problem with the 16F1509 chip (the "15" family) that can be shown with the very simple following program:
#chip 16f1509, 8
dim temp as string*5
temp="ABCDE"
The corresponding asm file contains the following code:
But MPASM does not like the "movlw (high StringTable1) & 127" line of code which generates the following error message
"Operand contains unresolvable labels or is too complex"
I can see where in gcbasic.bas this is done (line 6114)
If ChipFamily = 15 Then
CurrLine = LinkedListInsert(CurrLine, " movlw (high " + SourceTable + ") & 127")
Else
A similar statement is generating the same kind of problem line 6523 of gcbasic.bas:
Hi Evan
I still have this pb running the 3 lines sample program above.
Using MPLAB X IDE V 2.35
Assembly log below
Jacques
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/Jacques/MPLABXProjects/testasm.X'
make -f nbproject/Makefile-default.mk dist/default/production/testasm.X.production.hex
make[2]: Entering directory 'C:/Users/Jacques/MPLABXProjects/testasm.X'
"C:\Program Files (x86)\Microchip\MPLABX\mpasmx\mpasmx.exe" -q -p16f1509 -l"build/default/production/_ext/830771448/testasm.lst" -e"build/default/production/_ext/830771448/testasm.err" -o"build/default/production/_ext/830771448/testasm.o" "../../Documents/testasm.asm"
make[2]: [build/default/production/_ext/830771448/testasm.o] Error 1
Error[151] ....\DOCUMENTS\TESTASM.ASM 52 : Operand contains unresolvable labels or is too complex
Error[113] ....\DOCUMENTS\TESTASM.ASM 54 : Symbol not previously defined (SysReadString)
Message[302] ....\DOCUMENTS\TESTASM.ASM 68 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 70 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 72 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 74 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 76 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 78 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 81 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 83 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 85 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 88 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 90 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[113] ....\DOCUMENTS\TESTASM.ASM 106 : Symbol not previously defined (SYSSTRINGTABLES)
Error[113] ....\DOCUMENTS\TESTASM.ASM 115 : Symbol not previously defined (SYSSTRINGTABLES)
Error[113] ....\DOCUMENTS\TESTASM.ASM 129 : Symbol not previously defined (SYSSTRINGTABLES)
nbproject/Makefile-default.mk:95: recipe for target 'build/default/production/_ext/830771448/testasm.o' failed
make[2]: Leaving directory 'C:/Users/Jacques/MPLABXProjects/testasm.X'
make[1]: [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-default.mk:78: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/Jacques/MPLABXProjects/testasm.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
BUILD FAILED (exit value 2, total time: 1s)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I do not have same environment on this computer. But, when building have you 'disabled case sensitivity' selected on your source ASM? I am using 5.51 MPASM
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I often use the asm code generated by GCBASIC to debug my programs. In that context I am using Microchip MPASM which differs from the default GCASM used by GCBASIC. Most of the time without any problem.
I am running into a problem with the 16F1509 chip (the "15" family) that can be shown with the very simple following program:
The corresponding asm file contains the following code:
But MPASM does not like the "movlw (high StringTable1) & 127" line of code which generates the following error message
"Operand contains unresolvable labels or is too complex"
I can see where in gcbasic.bas this is done (line 6114)
A similar statement is generating the same kind of problem line 6523 of gcbasic.bas:
Could it be possible to fix that in a further release ?
Many thanks
Jacques
Sorry Jacque,
We have test and we cannot reproduced this error. We tested using MPASM X 5.51, MPASM 5.42 and MPASM 5.61 (from MPLAB 3.00.02-beta) .
Evan
Hi Evan
I still have this pb running the 3 lines sample program above.
Using MPLAB X IDE V 2.35
Assembly log below
Jacques
make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/Jacques/MPLABXProjects/testasm.X'
make -f nbproject/Makefile-default.mk dist/default/production/testasm.X.production.hex
make[2]: Entering directory 'C:/Users/Jacques/MPLABXProjects/testasm.X'
"C:\Program Files (x86)\Microchip\MPLABX\mpasmx\mpasmx.exe" -q -p16f1509 -l"build/default/production/_ext/830771448/testasm.lst" -e"build/default/production/_ext/830771448/testasm.err" -o"build/default/production/_ext/830771448/testasm.o" "../../Documents/testasm.asm"
make[2]: [build/default/production/_ext/830771448/testasm.o] Error 1
Error[151] ....\DOCUMENTS\TESTASM.ASM 52 : Operand contains unresolvable labels or is too complex
Error[113] ....\DOCUMENTS\TESTASM.ASM 54 : Symbol not previously defined (SysReadString)
Message[302] ....\DOCUMENTS\TESTASM.ASM 68 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 70 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 72 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 74 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 76 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 78 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 81 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 83 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 85 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 88 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] ....\DOCUMENTS\TESTASM.ASM 90 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[113] ....\DOCUMENTS\TESTASM.ASM 106 : Symbol not previously defined (SYSSTRINGTABLES)
Error[113] ....\DOCUMENTS\TESTASM.ASM 115 : Symbol not previously defined (SYSSTRINGTABLES)
Error[113] ....\DOCUMENTS\TESTASM.ASM 129 : Symbol not previously defined (SYSSTRINGTABLES)
nbproject/Makefile-default.mk:95: recipe for target 'build/default/production/_ext/830771448/testasm.o' failed
make[2]: Leaving directory 'C:/Users/Jacques/MPLABXProjects/testasm.X'
make[1]: [.build-conf] Error 2
make: *** [.build-impl] Error 2
nbproject/Makefile-default.mk:78: recipe for target '.build-conf' failed
make[1]: Leaving directory 'C:/Users/Jacques/MPLABXProjects/testasm.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
BUILD FAILED (exit value 2, total time: 1s)
I do not have same environment on this computer. But, when building have you 'disabled case sensitivity' selected on your source ASM? I am using 5.51 MPASM
OK I found the pb. The disabled case sensitivity was selected. But in MPLAB X you also have to select "Build in absolute mode" in MPASM Global Options
Last edit: Jacques Nilo 2015-08-01
Good info. I will put a note in the release note.