Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Error[113] D:\TP2_ASM\TP2.ASM 19 : Symbol not previously defined (*)

Status
Not open for further replies.

aydi

Newbie level 4
Joined
Aug 24, 2010
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
tunisia
Activity points
1,324
good morning,

i have two errors when i try to compile the following program.

please can any one help me to solve this PB.

thanks an advance.

message error:
Make: The target "D:\TP2_asm\TP2.o" is out of date.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPAsmWin.exe" /q /p16F84 "TP2.asm" /l"TP2.lst" /e"TP2.err"
Message[302] D:\TP2_ASM\TP2.ASM 13 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[113] D:\TP2_ASM\TP2.ASM 19 : Symbol not previously defined (*)
Error[112] D:\TP2_ASM\TP2.ASM 19 : Missing operator
Error[113] D:\TP2_ASM\TP2.ASM 22 : Symbol not previously defined (*)
Error[112] D:\TP2_ASM\TP2.ASM 22 : Missing operator

Message[305] D:\TP2_ASM\TP2.ASM 36 : Using default destination of 1 (file).
Message[305] D:\TP2_ASM\TP2.ASM 38 : Using default destination of 1 (file).
Halting build on first failure as requested.
BUILD FAILED: Tue Sep 20 03:30:12 2011

Code:
		list p=16F84                     ; Pic 16F84 est le processeur cible
		#include "p16F84.inc"   ; inclure fichier d’entête
		CBLOCK 0x10                  ; Zone tampon
		l1, l2
		ENDC

		org 0x00                       ; Vecteur de début
   		bcf STATUS,RP0            ; Sélectionner la bank1
   		bcf STATUS,RP1
		clrf PORTA                      ; S’assurer que PORTA vaut zéro avant validation
		clrf PORTB                      ; S’assurer que PORTB vaut zéro avant validation
		bsf STATUS,RP0            ; Sélectionner la bank1
		clrf TRISB                       ; PORTB en sortie
		bcf STATUS,RP0            ; Sélectionner la bank0
loop   
    	movlw 0x41          ; Vert et rouge
		movwf PORTB                ; écrire vers port
		call wait                           ; attendre
		movlw 0x23*               ; orange et rouge
		movwf PORTB               ; écrire vers port
		call wait                          ; attendre
    	movlw 0x14*               ;rouge et vert   
		movwf PORTB             ; écrire vers port
		call wait                        ; attendre
		movlw 0x32                  ; rouge/orange et orange
		movwf PORTB            ; écrire vers port
		call wait                      ; attendre
		goto loop                    ; ET boucler

wait    
    	movlw 5
    	movwf  l1
w1  
    	clrf l2
w2  
    	decfsz l2
    	goto   w2
    	decfsz l1
    	goto w1
    	return 
    	End
 

I assume th problem is the lines

movlw 0x23*
movlw 0x14*

What are the asterisks for? Try removing them.

Keith.
 

yes exactly the pb is there but why?

why if we change them for example with movlw 20 (0x14) it works?
 

What is "pb"?

Why would you expect it to work with random, incorrect characters added to the statements?

Keith.
 

movlw 0x14 (hexa. representation) it should work normaly.

why for example if you write (movlw 0xff) it works.

my question is clear why it does not accept hexadecimal representation.
 

It will work in decimal or hexadecimal, the problem you highlighted in red is caused by the '*' in the asm code. That symbol is not part of the PIC istruction set so it was flagged as an error.
change it to 'movlw 0x23' or 'movlw .35' and it will work.

The other messages are warnings, you missed out the destination in both the 'decfsz' instructions. Warning 302 is just to alert you to check you have used the correct banks, it does not stop the file being assembled. If you are sure the banks are correct, you can stop the warning by adding 'errorlevel -302' at the top of your code.

Make sure you use zero and not the letter 'O' at the start of hexadecimal numbers.

Brian.
 

movlw 0x14 (hexa. representation) it should work normaly.

why for example if you write (movlw 0xff) it works.

my question is clear why it does not accept hexadecimal representation.

Your question is far from clear!

You can use

movlw 20
movlw 0x14

but NOT movlw 0x14*

Why add the asterisk? You can use an asterisk when doing certain TBLRD and TBLWT instructions, that is all.

Keith.
 

the * doesn't appeared when i use mplab.

it apperared when you copy it from mplab to the forum.

thanks.

i solve the pb.
 
Last edited:

the * doesn't appeared when i use mplab.

it apperared when you copy it from mplab to the forum.

thanks.

i solve the pb.

sorry i want to say it's appeared when i copy my program to the forum(typo).
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top