| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		
			gjs_rsdi
 
 
  Joined: 06 Feb 2006 Posts: 476 Location: Bali 
			
			 
			 
			 
			
			
			
			
			
			
  
		  | 
		
			
				| Understanding .LST file | 
			 
			
				 Posted: Mon Mar 16, 2020 9:25 pm     | 
				     | 
			 
			
				
  | 
			 
			
				Hi
 
 
I am trying to understand the .LST file
 
I learn already (on the forum) to make the file with Symbolic format for easy understanding.
 
In the .LST is written for example:
 
 	  | Code: | 	 		  0051:  MOVWF  @78
 
0055:  IORWF  @78,W | 	  
 
 
Can somebody tell me what the @ means?
 
 
Best wishes
 
Joe | 
			 
		  | 
	
	
		  | 
	
	
		
			PCM programmer
 
 
  Joined: 06 Sep 2003 Posts: 21708
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Mon Mar 16, 2020 11:20 pm     | 
				     | 
			 
			
				
  | 
			 
			
				| It means RAM address 0x78. | 
			 
		  | 
	
	
		  | 
	
	
		
			gjs_rsdi
 
 
  Joined: 06 Feb 2006 Posts: 476 Location: Bali 
			
			 
			 
			 
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Tue Mar 17, 2020 12:00 am     | 
				     | 
			 
			
				
  | 
			 
			
				Thank you very much PCM programmer   
 
Helpful like always
 
 
Best wishes
 
Joe | 
			 
		  | 
	
	
		  | 
	
	
		
			Ttelmah
 
 
  Joined: 11 Mar 2010 Posts: 19967
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Wed Mar 18, 2020 4:02 am     | 
				     | 
			 
			
				
  | 
			 
			
				Worth just giving a little extra data here. In punctuation, the '@' symbol is
 
normally referred to as 'at'. So the instructions access the memory 'at' 
 
the specified location. Simple, and once you use this name, quite obvious. 
 
   | 
			 
		  | 
	
	
		  | 
	
	
		
			temtronic
 
 
  Joined: 01 Jul 2010 Posts: 9589 Location: Greensville,Ontario 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Wed Mar 18, 2020 4:32 am     | 
				     | 
			 
			
				
  | 
			 
			
				this....
 
MOVWF  @78 
 
 
..can be read as...
 
 
'MOV'e the contents of the 'W'orking register to the 'F'ile 'AT'  RAM location # 0x'78'.
 
 
PIC ASM is rather easy, only 35+ instructions to know. Unlike say Z80 or 6811, with 100+.
 
 
Motorola had a one bit micro, with only 16 instructions... | 
			 
		  | 
	
	
		  | 
	
	
		
			gjs_rsdi
 
 
  Joined: 06 Feb 2006 Posts: 476 Location: Bali 
			
			 
			 
			 
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Wed Mar 18, 2020 4:18 pm     | 
				     | 
			 
			
				
  | 
			 
			
				Thank you Ttelmah and Temtronic   
 
 
And this:
 
 
Means move the file to ram location 78 and to the working register?
 
 
I worked a little bit with the 68HC811E2 in ASM long long time ago. I don't remember how many instruction it had but a lot.
 
I was happy when I found the PIC16C71   
 
 
Best wishes
 
Joe | 
			 
		  | 
	
	
		  | 
	
	
		
			Ttelmah
 
 
  Joined: 11 Mar 2010 Posts: 19967
  
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Thu Mar 19, 2020 1:05 am     | 
				     | 
			 
			
				
  | 
			 
			
				Exactly understanding that the '@' is being used as shorthand for 'RAM at',
 
makes it much easier to understand. | 
			 
		  | 
	
	
		  | 
	
	
		
			gjs_rsdi
 
 
  Joined: 06 Feb 2006 Posts: 476 Location: Bali 
			
			 
			 
			 
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Fri Mar 20, 2020 5:46 am     | 
				     | 
			 
			
				
  | 
			 
			
				After reading again the answers, I am assuming correct that the below code is moving the content of ram location 78 to W? 
 
 
 
Best wishes
 
Joe | 
			 
		  | 
	
	
		  | 
	
	
		
			temtronic
 
 
  Joined: 01 Jul 2010 Posts: 9589 Location: Greensville,Ontario 
			
			 
			 
			
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Fri Mar 20, 2020 6:32 am     | 
				     | 
			 
			
				
  | 
			 
			
				From the instruction set chapter of the 46k22, but applicable to all PICs...
 
 
The contents of register ‘f’ are moved to
 
a destination dependent upon the
 
status of ‘d’. If ‘d’ is ‘0’, the result is
 
placed in W. If ‘d’ is ‘1’, the result is
 
placed back in register ‘f’ (default).
 
Location ‘f’ can be anywhere in the
 
256-byte bank.
 
 
MOVF   @78,W
 
 
So in this case 'f' is RAM location 0x78
 
'W' is the Working register.... | 
			 
		  | 
	
	
		  | 
	
	
		
			gjs_rsdi
 
 
  Joined: 06 Feb 2006 Posts: 476 Location: Bali 
			
			 
			 
			 
			
			
			
			
			
			
  
		  | 
		
			
				 | 
			 
			
				 Posted: Sat Mar 21, 2020 2:02 am     | 
				     | 
			 
			
				
  | 
			 
			
				Thank you Temtronic   
 
 
Best wishes
 
Joe | 
			 
		  | 
	
	
		  | 
	
	
		 |