Re: Detect a C128 from C64 mode

From: silverdr_at_wfmh.org.pl
Date: Tue, 21 May 2013 17:27:13 +0200
Message-Id: <FB0AA1D6-A9D3-471B-801C-51720539B72F@wfmh.org.pl>
On 2013-05-21, at 13:41, Ted wrote:

> How about this...
>   lda #$01
> c128_check:
>   lda $d030
>   cmp #$ff
>   beq c64
>   jmp done
> c64:
>   lda #$00
> done:
>   rts

This would be non-authoritative as (at least theoretically) c128 can have both of the lower bits set too. That's why I wrote about "the same functionality".

On a 64 writing to the non-existent register won't change value at this address, On a 128 will. Yet, as we talk about a library routine, we don't want to inadvertently change those bits (anything actually) from its encountered state.

-- 
SD!
       Message was sent through the cbm-hackers mailing list
Received on 2013-05-21 16:00:04

Archive generated by hypermail 2.2.0.