[cc65] char-copy and interrupts (C64)

Date view Thread view Subject view

From: Tim Schürmann (tischuer_at_web.de)
Date: 2003-03-14 09:46:00


Hi!

In my program, i'm using the upper-memory on the C64 for the video-stuff
(VIC-II bank at $C000).
Now, i have to copy the charset. In BASIC it looks like this:

POKE(0xdc0e, PEEK(0xdc0e)AND254 ); /* disable interrupts */
POKE(1, PEEK(1)AND251); /* turn chars on */
memcpy(tobla, fromblubb, ((256*8)*2)); /* copy charset */
POKE(1, PEEK(1)OR4); /* turn on I/O */
POKE(0xdc0e, PEEK(0xdc0e)OR1 ); /* enable interrupts */

And in assembler:

asm("
SEI
LDA 1
AND #251
STA 1
");
/* and so on... */

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 noticed, that CC65 uses interrupts internally (as far as i remeber for
the timer-stuff - is this right?), so when it's save to call this
routine? Is there a C-function, that is doing this interrupt-stuff
already (i'm using CC65 2.9.0)?

Thanks.

Bye,

Tim Schürmann

----------------------------------------------------------------------
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 09:44:54 CET