Re: [cc65] char-copy and interrupts (C64)

Date view Thread view Subject view

From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2003-03-14 12:19:32


On Fri, Mar 14, 2003 at 09:46:00AM +0100, Tim Schürmann wrote:
> My question is: which is the best method to do this interrupt-thing in
> CC65? Should i use inline-assembler or the POKE-sequence above (which
> disables the CIA-timer)?

I would just disable interrupts using SEI/CLI:

        SEI ();
        ((unsigned char*) 0x0001) &= 0xFB;
        memcpy (tobla, fromblubb, ((256*8)*2));
        ((unsigned char*) 0x0001) |= 0x04;
        CLI ();

You will loose some interrupts, but if you don't need the interrupts, that's
not critical (a few timer ticks will get lost).

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz_at_musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-03-14 12:19:48 CET