[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Appl //c Basic
In article <1evxs11.j36rrnj3zic6N%dempson@actrix.gen.nz>,
David Empson <dempson@actrix.gen.nz> wrote:
> Paul Schlyter <pausch@saaf.se> wrote:
>
>> In article <3b3f1f24$1@news.iprimus.com.au>,
>> Mark Cummings <NOTfigjams@primus.com.au> wrote:
>>
>>>> You can't make the reset do nothing - it has to jump somewhere.
>>>
>>> jump - fair enough, do nothing - depends on your definition. a BRA #$FE
>>> would do virtually nothing, at least not as far as the user is concerned.
>>
>> It would hang the computer, and that would, to the user, be a quite
>> noticeable action!
>
> I agree. I was interpreting "do nothing" as meaning "resume as if the
> user didn't press Control-Reset", rather than "freeze".
With an NMI or an IRQ; you can just execute RTI (Return from interrupt)
and have the interrupt appear to "do nothing". However, RESET is
different: since RESET doesn't push the program counter and the flag
register on the stack (like NMI and IRQ do), executing an RTI upon a
RESET is extremely unlikely to bring you back to where you were when
the RESET signal appeared.
>> Also: the BRA opcode was undefined in the early versions of the 6502
>
> It wasn't defined in any version of the 6502. BRA is one of the new
> opcodes defined by the 65C02.
..I consider the 65C02 a "newer version of the 6502". So by "early
versions of 6502" I meant those 6502's which predated the 65C02.
This is of course a matter of semantics though - I merely wanted to
clarify what I meant above.
>> and will this not work on Apple II's earlier than the IIe.
>
> It will not work on an unenhanced IIe either.
>
>> To get it to work on earlier Apple II's as well, do something like:
>>
>> CLC
>> BCC #$FE
>
> And of course, few if any assemblers will accept this as valid source
> code. :-)
True ... but it's easy to replace with e.g.:
CLC
LOOP BCC LOOP
And with the mini-assemlber in the Integer Basic ROM's (or if you
have Integer Basic on a Language Card and have it selected), you'd
have to enter:
CLC
BCC <target_address>
--
----------------------------------------------------------------
Paul Schlyter, Swedish Amateur Astronomer's Society (SAAF)
Grev Turegatan 40, S-114 38 Stockholm, SWEDEN
e-mail: pausch at saaf dot se or paul.schlyter at ausys dot se
WWW: http://hotel04.ausys.se/pausch http://welcome.to/pausch