1. nabil muzakkir

    Thread Starter New Member

    Jul 19, 2013
    1
    0
    Code ( (Unknown Language)):
    1.  
    2. #include<p18f458.inc>
    3.  
    4. EOD         set ox00
    5. counterPOSS set ox01
    6. counterNEGG set    ox02        
    7. total_data     equ D'150'
    8.        
    9.             org    Ox00
    10.             goto START
    11.             org    0x08
    12.             retfie
    13.             org    0x18
    14.             retfie
    15.  
    16.             org Ox100
    17.  
    18. START        MOVLW UPPER DATA_ARR
    19.             MOVFF TBLPTRU
    20.             MOVLW HIGH DATA_ARR
    21.             MOVFF TBLPTRH
    22.             MOVLW LOW DATA_ARR
    23.             MOVFF TBLPTRL
    24.             CLRF counterPOSS
    25.             CLRF counterNEGG
    26.             CLRF EOD
    27.             LFSR FSR0,Ox300
    28.             LFSR FSR1,Ox400
    29. LAGI         TBLRD*+
    30.             BTFSS TABLAT,7 ;CHECK BIT7==1
    31.             BRA POSS ;NO
    32.             BRA NEGG ;YES
    33. POSS         INCF counterPOSS,F             ; INCREASE counterNEGG
    34.             MOVFF TABLAT,POSTINC0         ; MOVE FROM TABLAT TO FSR0
    35.             INCF EOD,F
    36. CHECK        MOVLW D'150'
    37.             CPFSEQ EOD,
    38.             BRA HABIS                    ;YES
    39.             BRA LAGI                     ;NO
    40. NEGG         INCF counterNEGG,F            ; INCREASE counterPOSS
    41.             MOVFF TABLAT,POSTINC1         ; MOVE FROM TABLAT FSR1
    42.             BRA CHECK
    43. HABIS        BRA HABIS;
    44.             RADIX DEC
    45.  
    46.             ORG Ox150
    47.  
    48. DATA_ARR    DB 3,97,4,88,120,14,63,0,165,26
    49.             DB 28,118,149,80,0,107,171,8,162,25
    50.             DB 96,110,11,6,77,0,29,196,123,88
    51.             DB 10,57,49,188,20,24,63,0,165,216
    52.             DB 12,170,242,119,0,23,52,50,155,81
    53.  
    54.             DB 16, 74,69,01,13,0,89,198,64,53
    55.             DB 36,0,211,61,177,0,9,196,123,88
    56.             DB 14,70,255,119,0,0,52,150,55,191
    57.             DB 6, 174,0,01,133,0, 9,18,22,188
    58.             DB 60,200,131,22,59,0,66,19,173,0
    59.  
    60.             DB 20, 78,73,05,138,4,94,202,68,57
    61.             DB 42,215,0,0,81,5,14,200,127,98
    62.             DB 18,78,205,19,100,60,02,50,0,0
    63.             DB 65, 74,70,0,33,0, 89,108,220,08
    64.             DB 36,20,0,212,159,0,06,119,173,152
    65.            
    66.             END
    67.  
    ***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: Jul 19, 2013
  2. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    2,677
    2,725
    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.
     
  3. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    This is from the MPLAB MPASM30 help and it is about integer format
    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.
     
  4. WBahn

    Moderator

    Mar 31, 2012
    17,732
    4,789
    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.
     
  5. WBahn

    Moderator

    Mar 31, 2012
    17,732
    4,789
    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.
     
  6. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    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.
     
Loading...