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

Re: Steal RAM -- Question



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/