[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Steal RAM -- Question



mmphosis wrote:
excerpt from the bottom of page 20 and the top of page 22 of "The Apple
][ REFERENCE MANUAL"...


A program can "reference" the address of the special location for the speaker by performing a "read" or "write" operation to that address.  The data which are read or written are irrevelant, as it is the _address_ which throws the switch.  Note that a "write" operation on the Apple's 6502 microprocessor actually performs a "read" before the "write", so that if you use a "write" operation to flip any soft switch, you will actually throw that switch _twice_.  For toggle-type soft switches, such as the speaker switch, this means that a "write" operation to the special controlling the switch will leave the switch in the same state it was in before the operation was performed.


Performing a "write" operation on the odd addresses between $C080.$C08F
should have the affect of throwing the switch twice, thus enabling the
soft switch.  But, it sounds like this won't work with the 65C02.  I
think a better way to do this is two "read" operations.

http://www.6502.org/documents/datasheets/

It has nothing to do with whether it is a 6502 or a 65C02--they
both function *identically* for load and store absolute.

Think about it--the 65C02 wouldn't be *compatible* if it didn't
take the same 4 cycles--meaning the same 4 address references.

Ad *do* look at Sather's enumeration of all the bus activity for
each instruction of both the 6502 and the 65C02 (highlighting the
differences for the 65C02).  It makes it *very* clear exactly
what is different--and what is not.

-michael

NadaNet networking for Apple II computers!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it's seriously underused."