-
1 Attachment(s)
Error [113]
Hi,
I cannot understand the reason for an Error [113] message.
I am using a PIC18F2685 with PBPL.
DataTP CON EXT ; Tables P
DataTC CON EXT ; Tables C
DataTB CON EXT ; Tables B
DataTS VAR LONG BANK0
...
DataTP ;
#include "KPPV3.ASM"
EndTP
DataTC ;
#include "KPCV3.ASM"
EndTC
DataTB ;
#include "KPBV3.ASM"
EndTB
...
DataTS = DataTC
...
movlw LOW DataTS ; Computing DataTS+AdTS
addwf _AdTS,W ; and storing to Ads(AdsU:AdsH:AdsL)
movwf _ADSL
movlw HIGH DataTS
addwfc _AdTS+1,W
movwf _ADSH
movlw UPPER DataTS
addwfc _ZERO,W
movwf _ADSU
I use three external tables.
I want to select one table and make some operations with it
I think that the declarations are correct but three Error [113] message are generated, one per line of the asm section where DataTS is used. These errors are related to DataTS which is seen as not being declared.
If I replace DataTS by DataTC (for example) in the asm section, no errors occur.
What's wrong ?
Thank you for your help
MikeBZH
-
Re: Error [113]
ASM
...assembler code
ENDASM
Look up proper syntax in manual.
Robert
Edit: EndTP, is that a new command in PBP3?
-
Re: Error [113]
I found the solution.
Writing :
movlw LOW DataTS
is a non-sense since DataTS is a variable, not a constant
and movlw stands for "move litteral to w"
other mov instructions are certainly more appropriate. I need to search.
Demon, all this syntax comes from Darrel examples. It works !
MikeBZH
-
Re: Error [113]
I don't doubt it works, but are you compiling in PVP or ASM?
-
Re: Error [113]
Hi Demon
I assume you mean PBP, not PVP.
The code is written in PBP with some sections in ASM.
You're right. The block :
DataTP ;
#include "KPPV3.ASM"
EndTP
DataTC ;
#include "KPCV3.ASM"
EndTC
DataTB ;
#include "KPBV3.ASM"
EndTB
is inside an ASM / ENDASM section
MikeBZH
-
Re: Error [113]
PBP, Darn small keypad on cell phone.
-
Re: Error [113]
To complete this topic and for anybody interested by the solution :
DataTS is first splitted into three bytes :
DataTSL = DataTS.BYTE0
DataTSH = DataTS.BYTE1
DataTSU = DataTS.BYTE2
then the program is the same as before but movlw are replaced by movf
movf _DataTSL,W
addwf _AdTS,W
movwf _ADSL
movf _DataTSH,W
addwfc _AdTS+1,W
movwf _ADSH
movf _DataTSU,W
addwfc _ZERO,W
movwf _ADSU
No more error. It works.
MikeBZH