Date : Wed, 17 Mar 2004 16:03:10 +0000
From : James Fidell <james@...>
Subject: Re: Behaviour of 6502 opcode 9C
Quoting Richard_Talbot-Watkins@... (Richard_Talbot-Watkins@...):
> Just wondered if anyone has ever checked the exact behaviour of opcode 9C
> on a real BBC B. It's one of the unspecified 6502 opcodes, but there seems
> to be division on what it actually does.
>
> Some Beeb-related docs describe it as STZ abs, meaning ?abs = 0, just like
> its 65C12 equivalent.
I believe this is incorrect for the standard 6502.
> Most other docs describe it as SAY abs,X, meaning ?(abs+X) = Y AND ((abs
> DIV 256) + 1), which is rather less useful.
This is what my emulator does and I'm as sure as I can be it's what the
standard 6502 does because I wouldn't have coded it that way without good
reason.
That said, I'm not sure my emulator plays Zalaga absolutely perfectly --
in occasional circumstances the diving invaders aren't always displayed
correctly. So it's entirely possible I've implemented one of the
"undocumented" instructions wrongly.
James