On Fri, 02 May 2008 19:23:54 +0100, Arnaud Delobelle wrote: > Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> writes: > >> >> There are no modern processors with an opcode for incrementing a memory >> location!? At least my C64 can do that. ;-) > > Indeed! I remember a simple use was to make the border change colour > very fast, a v. cool effect when you're 12! > > CLV > LOOP: INC $D020 > BVC LOOP > > (from memory, untested!)
That works but I think LOOP: INC $D020 JMP LOOP is a bit more straight forward. Shorter in opcodes, equal in bytes, the loop is as fast but you save the two cycles of the CLV. :-) Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list