3 ms·
Even faster: use the X register instead of A, because there's an increment instruction for it (INX) that takes only 2 cycles instead of 3 to do LDA with the nex
by vikingerik 4y ago
Even faster: use the X register instead of A, because there's an increment instruction for it (INX) that takes only 2 cycles instead of 3 to do LDA with the next value.
Also FYI, that 6 cycles to load/store each byte is only if you're writing to zero page (an 8-bit address, meaning the first 256 bytes of the address space.) Stores to a 16-bit address take one more cycle, 4 instead of 3, to read the operand when it's a two-byte address instead of one.