a really newbie question...

Topics pertaining to the emulation or simulation of the 65xx microprocessors and their peripheral chips.
Post Reply
ehguacho
Posts: 29
Joined: 24 Jun 2009

a really newbie question...

Post by ehguacho »

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/
User avatar
BigEd
Posts: 11464
Joined: 11 Dec 2008
Location: England
Contact:

Post by BigEd »

Result is stored in the Accumulator. Some assemblers allow 'ASL' as a legal opcode, some 'ASL A'

Cheers
Ed
ehguacho
Posts: 29
Joined: 24 Jun 2009

Post by ehguacho »

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/
leeeeee
In Memoriam
Posts: 347
Joined: 30 Aug 2002
Location: UK
Contact:

Post by leeeeee »

The result of an ASL always overwrites the original data.

Lee.
ehguacho
Posts: 29
Joined: 24 Jun 2009

Post by ehguacho »

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/
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

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 .
ehguacho
Posts: 29
Joined: 24 Jun 2009

Post by ehguacho »

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/
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Post by GARTHWILSON »

Yes, and also affects the N, Z, and C flags the same as ASL A.
ehguacho
Posts: 29
Joined: 24 Jun 2009

Post by ehguacho »

ok thanks! :D
sorry about my english, i'm from Argentina :S

http://felliniycia.comule.com/
Post Reply