"Memory location already used!"

Xarren

Member
Heyah,
Im tring to simulate something in ISIS, and when it assembles my code I get an error "Memory location already used!". I ve searched it, and the only results I get are from these forums, only with 18X chips, but no one seemed to give a solution.
Any clues?
I ve tried commenting out complex-ish lines of the code seeing if that would affected it, but with no success.

just in case, this is my problematic code: (It works on a real picaxe):

Code:
initLCD:

	pause 500
	
	serout 1,N2400,(253,3,"Enter Password: ")
	pause 1000
	
	serout 1,N2400,(253,1,"T  C LL         ")
	pause 1000
	
	serout 1,N2400,(253,2,"Timer=   s      ")
	pause 1000
	
	serout 1,N2400,(253,4,"   INCORRECT    ")
	pause 1000
	
	serout 1,N2400,(253,5,"    PASSWORD    ")
	pause 1000
	
	serout 1,N2400,(254,1)
	pause 10

security:								

	b0=0								'Initialize variables
	b1=0
	b2=0
	b3=197
	b4=0
	
	serout 1,N2400,(3)					'Display "Enter Password: " on the LCD
	pause 10
	
	for b2=1 to 4						'Initialize the password entry loop
	
securityunderscore:

	b3=b3+1
	pause 1000
	serout 1,N2400,(254,b3,"_")				'Display an entry prompt "_" accounting for LCD cursor position
	b3=b3-1
	bit5=0							'Reset bit5 (bit 5 adjusts "_" position)
	
securityentry:							'Entry of password

		do
									
			if b1>155 AND b1<172 then				'If backspace pressed delete last character
				gosub securityback
			endif
			
			readadc 2,b1				'Check password input switches
			
		loop while b1<20					'Loop until there is an input

securityselectcase:

	select case b2						'Compares input against the correct input, bit marked if input is correct
	
		case 1
		
			if b1>60 AND b1<80 then 		'Range provided for relability
				bit0=1
			endif
			
		case 2
		
			if b1>80 AND b1<100 then
				bit1=1
			endif
			
		case 3
		
			if b1>100 AND b1<120 then
				bit2=1
			endif
			
		case 4
		
			if b1>120 AND b1<135 then
				bit3=1
			endif
			
	endselect


	b3=b3+1						
	serout 1,N2400,(254,b3,"X")				
	
	next b2							
	
	do								
		readadc 2,b1
		if b1>155 AND b1<172 then				
			bit5=1					
			goto securityentry
		else if b1>135 AND b1<155 then
		exit 			
		endif							
	loop while bit6=0					
	
	if b0=%00001111 then 					
					
		setint %10000000,%10000000
		
		serout 1,N2400,(254,1)			
		pause 10
		
		serout 1,N2400,(1)				
		pause 10
		
		serout 1,N2400,(2)			
		pause 10
		
		goto main
	else								
		high 0						
		serout 1,N2400,(4)				
		pause 10
		serout 1,N2400,(5)				
		wait 5
		serout 1,n2400,(254,1)				
		serout 1,N2400,(1)				
		low 0						
		goto security				
	endif
	
securityback:						

	if b2>=2 then						
		serout 1,N2400,(254,b3,"    ")	
		b3=b3-1					
		b2=b2-1
		pause 1000					
	else
		pause 1000
		return
	endif
	
	if bit5=1 then
		goto securityunderscore
	else
		b3=b3+1
		serout 1,N2400,(254,b3,"_")
		b3=b3-1
		goto securityentry
	endif
	
main:

	if input6=1 then
		w6=0
	endif
	
	serin 1,N2400,(51),b1
	
	if b1<10 then
		serout 1,N2400,(254,131,"00",#b1)
	else if b1<100 then
		serout 1,N2400,(254,131,"0",#b1)
	else
		serout 1,N2400,(254,131,#b1)
	endif
		
	pause 10
	
	readadc 0,b2 
	b2=b2*100/255
	
		if b2<10 then
	serout 1,N2400,(254,137,"00",#b2)
	else if b2<100 then
		serout 1,N2400,(254,137,"0",#b2)
	else
		serout 1,N2400,(254,137,#b2)
	endif
	
	pause 10
	goto main

interrupt:

	inc w6
	
	if w6<10 then
		serout 1,N2400,(254,198,"00",#w6)
	else if w6<100 then
		serout 1,N2400,(254,198,"0",#w6)
	else
		serout 1,N2400,(254,198,#w6)
	endif
	
	pause 10
	setint %00000010,%00000010
	return
 
Top