CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Understanding .LST file

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

Understanding .LST file
PostPosted: Mon Mar 16, 2020 9:25 pm     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Mar 16, 2020 11:20 pm     Reply with quote

It means RAM address 0x78.
gjs_rsdi



Joined: 06 Feb 2006
Posts: 468
Location: Bali

View user's profile Send private message Send e-mail

PostPosted: Tue Mar 17, 2020 12:00 am     Reply with quote

Thank you very much PCM programmer Smile
Helpful like always

Best wishes
Joe
Ttelmah



Joined: 11 Mar 2010
Posts: 19215

View user's profile Send private message

PostPosted: Wed Mar 18, 2020 4:02 am     Reply with quote

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.
Smile
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Mar 18, 2020 4:32 am     Reply with quote

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: 468
Location: Bali

View user's profile Send private message Send e-mail

PostPosted: Wed Mar 18, 2020 4:18 pm     Reply with quote

Thank you Ttelmah and Temtronic Smile

And this:
Code:
0009:  MOVF   @78,W

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 Smile

Best wishes
Joe
Ttelmah



Joined: 11 Mar 2010
Posts: 19215

View user's profile Send private message

PostPosted: Thu Mar 19, 2020 1:05 am     Reply with quote

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: 468
Location: Bali

View user's profile Send private message Send e-mail

PostPosted: Fri Mar 20, 2020 5:46 am     Reply with quote

After reading again the answers, I am assuming correct that the below code is moving the content of ram location 78 to W?
Code:
MOVF   @78,W


Best wishes
Joe
temtronic



Joined: 01 Jul 2010
Posts: 9097
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Fri Mar 20, 2020 6:32 am     Reply with quote

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: 468
Location: Bali

View user's profile Send private message Send e-mail

PostPosted: Sat Mar 21, 2020 2:02 am     Reply with quote

Thank you Temtronic Smile

Best wishes
Joe
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group