Re: Detect a C128 from C64 mode

From: Marko Mäkelä (marko.makela_at_hut.fi)
Date: 2003-02-16 17:20:57

On Sun, Feb 16, 2003 at 08:15:39AM -0800, Cameron Kaiser wrote:
> Store 252 in the register and see if it stays there. If it's a real 64, it
> will still read 255; if it's a 128, it will change back.

Good idea, and it's only 3 bytes longer than the original suggestion.  If
you are reluctant to do that, you could also do a 6-byte test:
ldx $d030:inx:beq c64.  Your idea takes 10 bytes:
lda #$fc:sta$d030:eor$d030:beq c128.  Both snippets leave the carry flag
intact.

	Marko

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail 2.1.6.