Re: Detect a C128 from C64 mode

From: Segher Boessenkool <segher_at_kernel.crashing.org>
Date: Wed, 22 May 2013 21:41:10 +0200
Message-Id: <FECEAC54-40EB-4717-9FD6-0409AB56CE6A@kernel.crashing.org>
>> Any ideas to shorten it, keeping the same functionality?
>
> You want it; you got it!
>
> _c64_check:
>    asl $d030
>    ror $d030
>    lda #0
>    rol a
>    rts
>
> It can't get shorter than that!

Uh-huh :-)

_c64_check:
    asl $d030
    ror $d030
    adc #0
    rts

or if you return in C instead of in A:

_c64_check:
    asl $d030
    ror $d030
    rts

Unfortunately, I don't think any of these work: they all set
the test mode bit (bit 1) to 1 (on)?


Segher


       Message was sent through the cbm-hackers mailing list
Received on 2013-05-22 20:00:57

Archive generated by hypermail 2.2.0.