error 113

Thread Starter

nabil muzakkir

Joined Jul 19, 2013
1
Rich (BB code):
#include<p18f458.inc>

EOD         set ox00
counterPOSS set ox01
counterNEGG set    ox02        
total_data     equ D'150'
        
            org    Ox00
            goto START
            org    0x08
            retfie
            org    0x18
            retfie

            org Ox100

START        MOVLW UPPER DATA_ARR
            MOVFF TBLPTRU
            MOVLW HIGH DATA_ARR
            MOVFF TBLPTRH
            MOVLW LOW DATA_ARR
            MOVFF TBLPTRL
            CLRF counterPOSS
            CLRF counterNEGG
            CLRF EOD
            LFSR FSR0,Ox300
            LFSR FSR1,Ox400
LAGI         TBLRD*+ 
            BTFSS TABLAT,7 ;CHECK BIT7==1
            BRA POSS ;NO
            BRA NEGG ;YES
POSS         INCF counterPOSS,F             ; INCREASE counterNEGG
            MOVFF TABLAT,POSTINC0         ; MOVE FROM TABLAT TO FSR0
            INCF EOD,F
CHECK        MOVLW D'150'
            CPFSEQ EOD,
            BRA HABIS                    ;YES
            BRA LAGI                     ;NO
NEGG         INCF counterNEGG,F            ; INCREASE counterPOSS
            MOVFF TABLAT,POSTINC1         ; MOVE FROM TABLAT FSR1
            BRA CHECK
HABIS        BRA HABIS; 
            RADIX DEC

            ORG Ox150

DATA_ARR    DB 3,97,4,88,120,14,63,0,165,26
            DB 28,118,149,80,0,107,171,8,162,25
            DB 96,110,11,6,77,0,29,196,123,88
            DB 10,57,49,188,20,24,63,0,165,216
            DB 12,170,242,119,0,23,52,50,155,81

            DB 16, 74,69,01,13,0,89,198,64,53
            DB 36,0,211,61,177,0,9,196,123,88
            DB 14,70,255,119,0,0,52,150,55,191
            DB 6, 174,0,01,133,0, 9,18,22,188
            DB 60,200,131,22,59,0,66,19,173,0

            DB 20, 78,73,05,138,4,94,202,68,57
            DB 42,215,0,0,81,5,14,200,127,98
            DB 18,78,205,19,100,60,02,50,0,0
            DB 65, 74,70,0,33,0, 89,108,220,08
            DB 36,20,0,212,159,0,06,119,173,152
            
            END
***this is my program and the error display error113 as symbol is not previously defined..can somebody help me with this problem??
 
Last edited by a moderator:

joeyd999

Joined Jun 6, 2011
5,234
Error 113 is usually a case mismatch (LABLE vs. Label vs. label), a misspelled label, or a missing label.

Examine the .lst file generated by the assembler. It will indicate the line with the error.

Also notice that you are inconsistently changing case in your code. Choose a style and stick with it. That will help to reduce the frequency of these kinds of errors in the future.

It may be helpful to you to disable case sensitivity.
 

t06afre

Joined May 11, 2009
5,934
***this is my program and the error display error113 as symbol is not previously defined..can somebody help me with this problem??
This is from the MPLAB MPASM30 help and it is about integer format
binary integer is `0b' or `0B' followed by zero or more of the binary digits `01'.
An octal integer is `0' followed by zero or more of the octal digits `01234567'.

A decimal integer starts with a non-zero digit followed by zero or more decimal digits `0123456789'.

A hexadecimal integer is `0x' or `0X' followed by one or more hexadecimal digits `0123456789abcdefABCDEF'.

To denote a negative integer, use the prefix operator `-'.
In your code you have some places written Ox instead of 0x then refering to hex numbers se the example. Use search and replace and replace all oX or Ox with 0x. Then see how it goes.
total_data equ D'150'

org Ox00
goto START
org 0x08
retfie
org 0x18
retfie

org Ox100
 

WBahn

Joined Mar 31, 2012
29,976
You need to be a bit careful with just doing a global search and replace. Consider what would happen if you had an identifier 'boxes'. This would get changed to 'b0xes'. Probably not critical, it just makes the code hard to read. But what if you had a symbol 'oxygen'? Now that becomes '0xygen' and is no longer a legal symbol.
 

WBahn

Joined Mar 31, 2012
29,976
Also, when you post something like this, don't assume that the people responding are mindreaders or that everyone in the world will know which assembler you are using or that all assemblers us the same error codes.
 

Markd77

Joined Sep 7, 2009
2,806
Next time, double click on the error message and it will take you to the line with the error, then it should be easier to work out what the problem is.
That works in MPLab 8, possibly MPLAB X as well, otherwise change the settings to display line numbers next to the code, and the line number should be displayed in the error message.
 
Top