6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Jul 04, 2024 4:36 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Tue Mar 16, 2010 5:19 pm 
Offline

Joined: Wed Jun 24, 2009 12:25 am
Posts: 29
just to be sure: in the instruction ASL A (ASL accumulator) the operation is:

1) A = ASL accumulator

...or just

2) ASL accumulator

...???

the result of the ASL operation is stored into the accumulator? or the ASL instruction is just used to set/reset flags?

_________________
sorry about my english, i'm from Argentina :S

http://felliniycia.comule.com/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 16, 2010 5:26 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10838
Location: England
Result is stored in the Accumulator. Some assemblers allow 'ASL' as a legal opcode, some 'ASL A'

Cheers
Ed


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 16, 2010 5:40 pm 
Offline

Joined: Wed Jun 24, 2009 12:25 am
Posts: 29
BigEd wrote:
Result is stored in the Accumulator. Some assemblers allow 'ASL' as a legal opcode, some 'ASL A'

Cheers
Ed

thanks Ed! i suppose it is also valid for "ASL Zero Page" and all the others ASL's... i mean that the result of any kind of ASL is always stored into the accumulator. is that right?

_________________
sorry about my english, i'm from Argentina :S

http://felliniycia.comule.com/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 16, 2010 5:54 pm 
Offline

Joined: Fri Aug 30, 2002 2:05 pm
Posts: 347
Location: UK
The result of an ASL always overwrites the original data.

Lee.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 16, 2010 6:19 pm 
Offline

Joined: Wed Jun 24, 2009 12:25 am
Posts: 29
leeeeee wrote:
The result of an ASL always overwrites the original data.

Lee.

that means that it may ovewrite memory address... thanks Lee!

_________________
sorry about my english, i'm from Argentina :S

http://felliniycia.comule.com/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 16, 2010 6:41 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8462
Location: Southern California
Only ASL A leaves the result in the accumulator. ASL done to a memory address does not affect the accumulator. If you don't want it to affect the memory address, then first do LDA then ASL A.

There's a ton of great information in the WDC programming manual downloadable at their website at http://www.westerndesigncenter.com/wdc/ ... manual.pdf .


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 16, 2010 7:40 pm 
Offline

Joined: Wed Jun 24, 2009 12:25 am
Posts: 29
GARTHWILSON wrote:
Only ASL A leaves the result in the accumulator. ASL done to a memory address does not affect the accumulator.

but it affects the value in the memory address. isn't it? i.e.:

assume $FE is #AA (170 in decimal)

ASL $FE

...after that $FE is #54 (84 in decimal)

_________________
sorry about my english, i'm from Argentina :S

http://felliniycia.comule.com/


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 16, 2010 7:45 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8462
Location: Southern California
Yes, and also affects the N, Z, and C flags the same as ASL A.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Mar 16, 2010 9:44 pm 
Offline

Joined: Wed Jun 24, 2009 12:25 am
Posts: 29
ok thanks! :D

_________________
sorry about my english, i'm from Argentina :S

http://felliniycia.comule.com/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


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 post attachments in this forum

Search for:
Jump to: