Fixed cycle delay: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(Larger table, and with custom CSS decreased HTML size)
 
(44 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Delay code ==
Shortest possible CPU code that creates N cycles of delay, depending on constraints.
 
== Code ==
 
All code samples are written for CA65.
 
Assumptions:
* No page wrap occurs during any branch instruction. If a page wrap occurs, it adds +1 cycle for each loop, completely thwarting the accurate delay.
* No interrupt / NMI occurs during the delay code.


Shortest possible CPU code that creates N cycles of delay, depending on constraints.
It is permissible for DMA to steal cycles during the loops.
If you are expecting that to happen, you have to manually
adjust the delay cycle count (and it is in fact possible to do so)
in order to get the correct delay.


All branch instructions assume that no page wrap occurs.
=== Explanations on the requirements ===


Explanations on the requirements:
* @zp_temp means you have a zeropage address that you can write random data into.
* @rts12 means you know a memory address that contains byte $60 (<code>RTS</code>).
* @rts12 means you know a memory address that contains byte $60 (<code>RTS</code>).
* @rts14 means you know a memory address that contains a harmless 2-cycle instruction that fits your constraints (such as <code>CLC</code>, <code>LDA #0</code>, or <code>NOP</code>), followed by <code>RTS</code>.
cycle instruction that fits your constraints (such as <code>LDA $00</code>), followed by <code>RTS</code>.
* @rts15 means you know a memory address that contains a <code>JMP</code> that jumps to another location that contains <code>RTS</code>.
 
* Alternatively, @rts15 means you know a memory address that contains a harmless 3-cycle instruction that fits your constraints (such as <code>LDA $00</code>), followed by <code>RTS</code>.
=== Instructions, addressing modes, byte counts, cycle counts and notes ===
* @A, @X, @Y are local labels.
 
{| class="wikitable testtable"
! scope="col"| Addressing mode
! scope="col"| Instruction type
! scope="col"| Bytes
! scope="col"| Cycle count
! scope="col"| Example instruction
! scope="col"| Notes
|-
! scope="row"| Implied
! scope="row"| Inter-register
| 1 || 2 || <code>TAX</code> || <code>NOP</code> has no side effects. Flag-manipulations like <code>CLC</code>, and <code>SEC</code><code>CLV</code> are used when their effects are desired.
|-
! scope="row"| Implied
! scope="row"| Stack push
| 1 || 3 || <code>PHA</code> || <code>PHP</code> is only paired with <code>PLP</code>.
|-
! scope="row"| Implied
! scope="row"| Stack pop
| 1 || 4 || <code>PLA</code> ||
|-
! scope="row"| Implied
! scope="row"| Return
| 1 || 6 || <code>RTS</code> || Used indirectly when paired with <code>JSR</code>. Similarly for <code>RTI</code>.
|-
! scope="row"| Immediate
! scope="row"|
| 2 || 2 || <code>CMP #$C5</code> || Includes instructions like <code>LDA</code>, <code>LDX</code> and <code>LDY</code>. Other ALU instructions are used in more complex situations.
|-
! scope="row"| Relative
! scope="row"| Branch
| 2 || 2—4 || <code>BCC *+2</code> || Branch takes 3 cycles when taken, 2 otherwise. A page crossing adds +1 cycle when branch is taken, but because of difficulties setting that up, we don't use it.
|-
! scope="row"| Zeropage
! scope="row"| Read, write
| 2 || 3 || <code>LDA $A5</code>
|-
! scope="row"| Zeropage
! scope="row"| RMW
| 2 || 5 || <code>INC @zptemp</code> || Writing to zeropage is only permitted when @zptemp is available. Technically we could save @zptemp into register and restore at end, but it is bytewise inferior to other techniques.
|-
! scope="row"| Zeropage indexed
! scope="row"| Read, write
| 2 || 4 || <code>LDA $EA,X</code> || Inferior to 2 × <code>NOP</code>, but useful for hiding additional code to be executed in a loop.
|-
! scope="row"| Zeropage indexed
! scope="row"| RMW
| 2 || 6 || <code>INC @zptemp,X</code> || Only doable when X is known to be 0, or when entire zeropage can be clobbered.
|-
! scope="row"| Indexed indirect
! scope="row"| Read, write
| 2 || 6 || <code>STA (@ptrtemp,X)</code> || Only doable when X is known to be 0.
|-
! scope="row"| Indexed indirect
! scope="row"| RMW
| 2 || 8 || <code>SLO (@ptrtemp,X)</code> || The most cost-effective instruction. Only doable when X is known to be 0, lest we write to a random address. All instructions in this category are unofficial.
|-
! scope="row"| Indirect indexed
! scope="row"| Read
| 2 || 5—6 || <code>LDA (@ptrtemp),Y</code> || Never used by this code.
|-
! scope="row"| Indirect indexed
! scope="row"| Write
| 2 || 6        || <code>STA (@ptrtemp),Y</code> || Only doable when Y is known to be 0.
|-
! scope="row"| Indirect indexed
! scope="row"| RMW
| 2 || 8        || <code>SLO (@ptrtemp),Y</code> || All instructions in this category are unofficial.
|-
! scope="row"| Absolute
! scope="row"| Jump
| 3 || 3 || <code>JMP *+3</code> ||
|-
! scope="row"| Absolute
! scope="row"| Read, write
| 3 || 4 || <code>LDA $2808</code> || Inferior to 2 × <code>NOP</code>, but can be used carefully to hide additional code to be executed in a loop.
|-
! scope="row"| Absolute
! scope="row"| RMW
| 3 || 6 || <code>INC $4018</code> || Inferior to 3 × <code>NOP</code>.
|-
! scope="row"| Absolute indexed
! scope="row"| Read
| 3 || 4—5 || <code>LDA $0200,X</code> || Inferior to shorter alternatives.
|-
! scope="row"| Absolute indexed
! scope="row"| Write
| 3 || 5 || <code>STA $0200,X</code> || Inferior to shorter alternatives.
|-
! scope="row"| Absolute indexed
! scope="row"| RMW
| 3 || 7 || <code>INC $4018,X</code> || Only doable when writing into the given address is harmless considering the possible values of X.
|-
! scope="row"| Absolute indirect
! scope="row"| Jump
| 3 || 5 || <code>JMP (@ptrtemp)</code> || Inferior to shorter alternatives.
|}


{{#css:
{{#css:
Line 22: Line 127:
!colspan="2"|1 bytes
!colspan="2"|1 bytes
|-
|-
|<pre>NOP</pre> || Clobbers nothing, requires nothing
|<pre>EA      NOP</pre>||No requirements
|-
|-
|}
|}
* All instructions cost at least 2 cycles. There is no way to do 1 cycle of delay (though <i>&minus;1 cycles</i> may sometimes appear in branch cost calculations).




=== 3 cycles ===
=== 3 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|1 bytes
!colspan="2"|2 bytes
|-
|<pre>PHA</pre> || Clobbers S
|-
|-
!colspan="2"|2 bytes
|<pre>C5 C5    CMP $C5</pre>||Clobbers Z&N, and C
|-
|-
|<pre>LDA $00</pre> || Clobbers A, and Z&amp;N
|<pre>24 24    BIT $24</pre>||Clobbers Z&N, and V
|-
|-
|<pre>BIT $00</pre> || Clobbers Z&amp;N, and V
|<pre>A5 A5    LDA $A5</pre>||Clobbers A, and Z&N
|-
|-
|<pre>STA @zptemp</pre> || Requires @zptemp
|<pre>A6 A6    LDX $A6</pre>||Clobbers X, and Z&N
|-
|-
|<pre>NOP $00</pre> || Requires support for unofficial opcodes
|<pre>A4 A4    LDY $A4</pre>||Clobbers Y, and Z&N
|-
|-
!colspan="2"|3 bytes
!colspan="2"|3 bytes
|-
|-
|<pre>JMP *+3</pre> || Clobbers nothing, requires nothing
|<pre>4C xx xx JMP *+3</pre>||No requirements
|-
|-
|}
|}
* Not relocatable means that the target address is hardcoded into the code. In ROM hacking, it sometimes makes sense to move code blobs around, and a hardcoded address makes it difficult to relocate the code. This restriction does not apply to branches, which use relative addressing. It is also assumed to not apply to <code>JSR</code> instructions, as chances are the JSR target is outside the code being relocated.




=== 4 cycles ===
=== 4 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|1 bytes
|-
|<pre>PLA</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|2 bytes
!colspan="2"|2 bytes
|-
|-
|<pre>NOP
|<pre>EA  ... NOP     × 2</pre>||No requirements
NOP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}
* zp-indexed modes such as <code>LDA $00,X</code> also do 4 cycles, but having side effects, these two-byte instructions are inferior to a simple 2 × <code>NOP</code>.
* There is also an unofficial opcode <code>NOP $00,X</code> (34 00), but there is no reason to use this instruction when the official equivalent has the same performance.




=== 5 cycles ===
=== 5 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|2 bytes
!colspan="2"|3 bytes
|-
|-
|<pre>NOP
|<pre>18      CLC
PHA</pre> || Clobbers S
90 00    BCC *+2</pre>||Clobbers C
|-
|-
!colspan="2"|3 bytes
|<pre>B8      CLV
50 00    BVC *+2</pre>||Clobbers V
|-
|-
|<pre>NOP
|<pre>EA      NOP
LDA $00</pre> || Clobbers A, and Z&amp;N
A5 A5    LDA $A5</pre>||Clobbers A, and Z&N
|-
|-
|<pre>NOP
|<pre>EA      NOP
BIT $00</pre> || Clobbers Z&amp;N, and V
A6 A6    LDX $A6</pre>||Clobbers X, and Z&N
|-
|-
|<pre>NOP
|<pre>EA      NOP
STA @zptemp</pre> || Requires @zptemp
A4 A4    LDY $A4</pre>||Clobbers Y, and Z&N
|-
|<pre>NOP
NOP $00</pre> || Requires support for unofficial opcodes
|-
|-
!colspan="2"|4 bytes
!colspan="2"|4 bytes
|-
|-
|<pre>NOP
|<pre>EA      NOP
JMP *+3</pre> || Clobbers nothing, requires nothing
4C xx xx JMP *+3</pre>||No requirements
|-
|-
|}
|}
* abs-indexed modes such as <code>LDA $1234,X</code> cause 4 or 5 cycles of delay, depending whether a page wrap occurred. Because you need extra setup code to make sure that a wrap does occur, you do not see this mode in these samples, outside situations where circumstances permit.




=== 6 cycles ===
=== 6 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|2 bytes
!colspan="2"|3 bytes
|-
|<pre>PHA
PHA</pre> || Clobbers S
|-
!colspan="2"|3 bytes
|-
|-
|<pre>NOP
|<pre>EA  ... NOP     × 3</pre>||No requirements
NOP
NOP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}
* zp-indexed RMW instructions such as <code>INC @zptemp,X</code> do 6 cycles. Unless we know the value of X, it might write into any address between $00-$FF. This option is only useful if the entire range of $00-$FF is free for clobbering with random data, or if X has a known value.
* ix instructions like <code>LDA ($00,X)</code> do 6 cycles, but the value of X decides where a pointer is read from, and said pointer can point anywhere. We only do that when the value of X is known.
* iy instructions like <code>LDA ($00),Y</code> also do 5-6 cycles, but in addition to the note above, we cannot predict whether a wrap occurs or not. So we don't use this mode.
* Absolute RMW instructions like <code>INC $4018</code> do 6 cycles, but weighing 3 bytes with side-effects it would be inferior to 3 × <code>NOP</code>.




Line 113: Line 211:
!colspan="2"|2 bytes
!colspan="2"|2 bytes
|-
|-
|<pre>PHP
|<pre>08      PHP
PLP</pre> || Clobbers nothing, requires nothing
28      PLP</pre>||No requirements
|-
|-
|}
|}
* <code>PHP-PLP</code> is very efficient for 7 cycles of delay, but it does modify stack contents. S register remains unchanged though.
* <code>PLA-PHA</code> does not overwrite any bytes in stack. It just writes back the same byte. But it does clobber A and Z+N. It is not interrupt-unsafe either: If an interrupt happens, the stack byte does get temporarily clobbered, but the value is still in A when the interrupt exits, and gets written back in stack.
* abs-indexed RMW instructions such as <code>INC abs,X</code> do 7 cycles. We only do this when either we know the value of X (for instance, <code>INC $4018,X</code> is safe when X is 0&mdash;7</code>, or when the entire 256-byte page can be safely overwritten with random data.




=== 8 cycles ===
=== 8 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|2 bytes
|-
|<pre>PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|3 bytes
|-
|<pre>TSX
PLA
TXS</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>NOP
PHA
PHA</pre> || Clobbers S
|-
!colspan="2"|4 bytes
!colspan="2"|4 bytes
|-
|-
|<pre>NOP
|<pre>EA  ... NOP     × 4</pre>||No requirements
NOP
NOP
NOP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}
* Unofficial ix and iy RMW instructions such as <code>SLO ($00,X)</code> or <code>SLO ($00),Y</code> would do 8 cycles for 2 bytes of code. We only do that if we know X or Y to be zero, and we have a known pointer to safely rewritable data.




Line 150: Line 234:
!colspan="2"|3 bytes
!colspan="2"|3 bytes
|-
|-
|<pre>NOP
|<pre>EA      NOP
PHP
08      PHP
PLP</pre> || Clobbers nothing, requires nothing
28      PLP</pre>||No requirements
|-
|-
|}
|}
* Jumping into the middle of another instruction and thereby reusing code is a very efficient way of reducing code size. Note that all code samples using branches on this page require that no page wrap occurs.




=== 10 cycles ===
=== 10 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|3 bytes
|-
|<pre>PHA
PHP
PLP</pre> || Clobbers S
|-
!colspan="2"|4 bytes
!colspan="2"|4 bytes
|-
|-
|<pre>PHP
|<pre>08      PHP
BIT $00
C5 C5    CMP $C5
PLP</pre> || Clobbers nothing, requires nothing
28      PLP</pre>||No requirements
|-
|-
|}
|}
* The <code>ROL-ROR</code> sequence preserves the original value of the memory address. Carry is also preserved.




=== 11 cycles ===
=== 11 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|3 bytes
|-
|<pre>PHA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|4 bytes
!colspan="2"|4 bytes
|-
|-
|<pre>NOP
|<pre>EA  ... NOP     × 2
NOP
08      PHP
PHP
28      PLP</pre>||No requirements
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}
Line 196: Line 269:
!colspan="2"|3 bytes
!colspan="2"|3 bytes
|-
|-
|<pre>JSR @rts12</pre> || Requires @rts12
|<pre>20 xx xx JSR @rts12</pre>||Requires @rts12
|-
|<pre>PLA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|-
!colspan="2"|4 bytes
!colspan="2"|4 bytes
|-
|-
|<pre>ROL $00,X
|<pre>36 36    ROL $36,X
ROR $00,X</pre> || Clobbers Z&amp;N
76 36    ROR $36,X</pre>||Clobbers Z&N
|-
|<pre>NOP
PHA
PHP
PLP</pre> || Clobbers S
|-
|-
!colspan="2"|5 bytes
!colspan="2"|5 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP
PHP
18      CLC
BIT $00
90 00   BCC *+2
PLP</pre> || Clobbers nothing, requires nothing
28      PLP</pre>||No requirements
|-
|-
|}
|}
* <code>JSR-RTS</code> causes 12 cycles of delay. But it does write a function return address in the stack, which may be unwanted in some applications. S is not modified.
* Again, <code>ROL-ROR</code> does not have side effects (as long as an interrupt does not happen in the middle), except for Z+N.




=== 13 cycles ===
=== 13 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|4 bytes
|-
|<pre>PHA
PHA
PHP
PLP</pre> || Clobbers S
|-
!colspan="2"|5 bytes
!colspan="2"|5 bytes
|-
|-
|<pre>NOP
|<pre>EA  ... NOP     × 3
NOP
08      PHP
NOP
28      PLP</pre>||No requirements
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}
Line 244: Line 301:
=== 14 cycles ===
=== 14 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|3 bytes
|-
|<pre>JSR @rts14</pre> || Requires @rts14
|-
!colspan="2"|4 bytes
!colspan="2"|4 bytes
|-
|-
|<pre>PHP
|<pre>08      PHP       \ × 2
PLP
28      PLP       /</pre>||No requirements
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}
Line 260: Line 311:
=== 15 cycles ===
=== 15 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|3 bytes
|-
|<pre>JSR @rts15</pre> || Requires @rts15
|-
!colspan="2"|4 bytes
|-
|<pre>PHA
JSR @rts12</pre> || Clobbers S; and requires @rts12
|-
|<pre>PHA
PLA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|5 bytes
!colspan="2"|5 bytes
|-
|-
|<pre>LDA $00
|<pre>08      PHP
JSR @rts12</pre> || Clobbers A, and Z&amp;N; and requires @rts12
BA      TSX
28      PLP
9A      TXS
28      PLP</pre>||Clobbers X
|-
|-
|<pre>PHA
|<pre>C5 C5    CMP $C5
TSX
20 xx xx JSR @rts12</pre>||Clobbers Z&N, and C; and requires @rts12
PLA
TXS
PLA</pre> || Clobbers X, and Z&amp;N
|-
|-
|<pre>PHP
|<pre>24 24    BIT $24
TSX
20 xx xx JSR @rts12</pre>||Clobbers Z&N, and V; and requires @rts12
PLA
TXS
PLP</pre> || Clobbers A, and X
|-
|-
|<pre>BIT $00
|<pre>A5 A5    LDA $A5
JSR @rts12</pre> || Clobbers Z&amp;N, and V; and requires @rts12
20 xx xx JSR @rts12</pre>||Clobbers A, and Z&N; and requires @rts12
|-
|-
|<pre>STA @zptemp
|<pre>A4 A4    LDY $A4
JSR @rts12</pre> || Requires @zptemp, and @rts12
20 xx xx JSR @rts12</pre>||Clobbers Y, and Z&N; and requires @rts12
|-
|<pre>NOP
PHA
PHA
PHP
PLP</pre> || Clobbers S
|-
|<pre>NOP $00
JSR @rts12</pre> || Requires @rts12, and support for unofficial opcodes
|-
|-
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP
NOP
28      PLP
NOP
EA  ... NOP     × 4</pre>||No requirements
NOP
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}
Line 320: Line 342:
=== 16 cycles ===
=== 16 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|4 bytes
|-
|<pre>NOP
JSR @rts14</pre> || Requires @rts14
|-
|<pre>PLA
PLA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|5 bytes
!colspan="2"|5 bytes
|-
|-
|<pre>NOP
|<pre>EA      NOP
PHP
08      PHP       \ × 2
PLP
28      PLP       /</pre>||No requirements
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}
Line 343: Line 353:
=== 17 cycles ===
=== 17 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|4 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP
JSR @rts15</pre> || Requires @rts15
48      PHA
A5 A5    LDA $A5
68      PLA
28      PLP</pre>||No requirements
|-
|-
|<pre>PHA
|}
JSR @rts14</pre> || Clobbers S; and requires @rts14
 
 
=== 18 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|-
|<pre>EA  ... NOP      × 2
08      PHP      \ × 2
28      PLP      /</pre>||No requirements
|-
|}
=== 19 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
!colspan="2"|5 bytes
|-
|-
|<pre>LDA $00
|<pre>08      PHP
JSR @rts14</pre> || Clobbers A, and Z&amp;N; and requires @rts14
28      PLP
|-
20 xx xx JSR @rts12</pre>||Requires @rts12
|<pre>BIT $00
JSR @rts14</pre> || Clobbers Z&amp;N, and V; and requires @rts14
|-
|<pre>STA @zptemp
JSR @rts14</pre> || Requires @zptemp, and @rts14
|-
|<pre>PHA
PHP
PLP
PHP
PLP</pre> || Clobbers S
|-
|<pre>NOP $00
JSR @rts14</pre> || Requires @rts14, and support for unofficial opcodes
|-
|-
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>PHP
|<pre>08      PHP
PLP
36 36    ROL $36,X
PHP
76 36    ROR $36,X
BIT $00
28      PLP</pre>||No requirements
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 18 cycles ===
=== 20 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|4 bytes
|-
|<pre>PHA
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
|<pre>PLA
JSR @rts14</pre> || Clobbers A, S, and Z&amp;N; and requires @rts14
|-
!colspan="2"|5 bytes
!colspan="2"|5 bytes
|-
|-
|<pre>LDA $00
|<pre>A9 2A    LDA #$2A ;hides 'ROL A'
JSR @rts15</pre> || Clobbers A, and Z&amp;N; and requires @rts15
38      SEC
10 FC    BPL *-2</pre>||Clobbers A, Z&N, and C
|-
|-
|<pre>BIT $00
!colspan="2"|7 bytes
JSR @rts15</pre> || Clobbers Z&amp;N, and V; and requires @rts15
|-
|-
|<pre>NOP
|<pre>EA  ... NOP     × 3
NOP
08      PHP      \ × 2
JSR @rts14</pre> || Requires @rts14
28      PLP      /</pre>||No requirements
|-
|-
|<pre>STA @zptemp
|}
JSR @rts15</pre> || Requires @zptemp, and @rts15
 
 
=== 21 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|-
|<pre>PHA
|<pre>18      CLC
PHA
A9 2A    LDA #$2A ;hides 'ROL A'
JSR @rts12</pre> || Clobbers S; and requires @rts12
90 FD    BCC *-1</pre>||Clobbers A, Z&N, and C
|-
|-
|<pre>NOP
|<pre>A2 04    LDX #4
PLA
CA      DEX
PLA
D0 FD    BNE *-1</pre>||Clobbers X, and Z&N
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|-
|<pre>NOP $00
|<pre>A0 04    LDY #4
JSR @rts15</pre> || Requires @rts15, and support for unofficial opcodes
88      DEY
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
|-
|-
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP       \ × 3
NOP
28      PLP       /</pre>||No requirements
PHP
PLP
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 19 cycles ===
=== 22 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|4 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>PLA
|<pre>18      CLC
JSR @rts15</pre> || Clobbers A, S, and Z&amp;N; and requires @rts15
A9 2A    LDA #$2A ;hides 'ROL A'
38      SEC
10 FC    BPL *-2</pre>||Clobbers A, Z&N, and C
|-
|-
!colspan="2"|5 bytes
|<pre>A2 02    LDX #2
EA      NOP
CA      DEX
10 FC    BPL *-2</pre>||Clobbers X, and Z&N
|-
|-
|<pre>PHP
|<pre>A0 03    LDY #3
PLP
EA      NOP
JSR @rts12</pre> || Requires @rts12
88      DEY
D0 FC    BNE *-2</pre>||Clobbers Y, and Z&N
|-
|-
|<pre>NOP
!colspan="2"|7 bytes
NOP
JSR @rts15</pre> || Requires @rts15
|-
|-
|<pre>PHA
|<pre>08      PHP
PLA
BA      TSX
PLA
08      PHP
PLA
28  ... PLP      × 2
PLA</pre> || Clobbers A, S, and Z&amp;N
9A      TXS
28      PLP</pre>||Clobbers X
|-
|-
|<pre>NOP
|<pre>08      PHP
PHA
C5 C5    CMP $C5
JSR @rts14</pre> || Clobbers S; and requires @rts14
28      PLP
20 xx xx JSR @rts12</pre>||Requires @rts12
|-
|-
!colspan="2"|6 bytes
!colspan="2"|8 bytes
|-
|-
|<pre>PHP
|<pre>08      PHP       \ × 2
ROL $00,X
28      PLP      /
ROR $00,X
EA  ... NOP      × 4</pre>||No requirements
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 20 cycles ===
=== 23 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|5 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>NOP
|<pre>18  ... CLC      × 2
PHA
A9 2A    LDA #$2A ;hides 'ROL A'
JSR @rts15</pre> || Clobbers S; and requires @rts15
90 FD    BCC *-1</pre>||Clobbers A, Z&N, and C
|-
|-
|<pre>PLA
|<pre>EA      NOP
PLA
A2 04    LDX #4
PLA
CA      DEX
PLA
D0 FD    BNE *-1</pre>||Clobbers X, and Z&N
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|-
|<pre>PHA
|<pre>EA      NOP
PHA
A0 04    LDY #4
JSR @rts14</pre> || Clobbers S; and requires @rts14
88      DEY
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
|-
|-
!colspan="2"|6 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>NOP
|<pre>EA      NOP
LDA $00
08      PHP      \ × 3
JSR @rts15</pre> || Clobbers A, and Z&amp;N; and requires @rts15
28      PLP      /</pre>||No requirements
|-
|-
|<pre>TSX
|}
PLA
 
PLA
 
PLA
=== 24 cycles ===
PLA
{| class="wikitable testtable"
TXS</pre> || Clobbers A, X, and Z&amp;N
!colspan="2"|4 bytes
|-
|-
|<pre>NOP
|<pre>A9 0A    LDA #$0A ;hides 'ASL A'
BIT $00
10 FD    BPL *-1</pre>||Clobbers A, Z&N, and C
JSR @rts15</pre> || Clobbers Z&amp;N, and V; and requires @rts15
|-
|-
|<pre>NOP
!colspan="2"|6 bytes
NOP
NOP
JSR @rts14</pre> || Requires @rts14
|-
|-
|<pre>NOP
|<pre>20 xx xx JSR @rts12× 2</pre>||Requires @rts12
STA @zptemp
JSR @rts15</pre> || Requires @zptemp, and @rts15
|-
|-
|<pre>PHA
!colspan="2"|7 bytes
PHA
PHP
PLP
PHP
PLP</pre> || Clobbers S
|-
|-
|<pre>NOP
|<pre>A6 A6    LDX $A6
NOP $00
A2 04    LDX #4
JSR @rts15</pre> || Requires @rts15, and support for unofficial opcodes
CA      DEX
D0 FD    BNE *-1</pre>||Clobbers X, and Z&N
|-
|-
!colspan="2"|7 bytes
|<pre>A4 A4    LDY $A4
A0 04    LDY #4
88      DEY
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
|-
!colspan="2"|8 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP
NOP
C5 C5    CMP $C5
NOP
28      PLP       \ × 2
PHP
08      PHP       /
PLP
28      PLP</pre>||No requirements
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 21 cycles ===
=== 25 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|5 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>LDY #4
|<pre>98      TYA
@Y:
A0 04    LDY #4
DEY
88      DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
D0 FD    BNE *-1
A8      TAY</pre>||Clobbers A, and Z&N
|-
|-
|<pre>LDX #4
|<pre>EA  ... NOP      × 2
@X:
A2 04    LDX #4
DEX
CA      DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
D0 FD    BNE *-1</pre>||Clobbers X, and Z&N
|-
|-
|<pre>PHP
|<pre>EA  ... NOP      × 2
PLP
A0 04    LDY #4
JSR @rts14</pre> || Requires @rts14
88      DEY
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
|-
|-
|<pre>PHA
!colspan="2"|8 bytes
PHA
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
|-
!colspan="2"|6 bytes
|<pre>EA  ... NOP      × 2
|-
08      PHP       \ × 3
|<pre>PHP
28      PLP       /</pre>||No requirements
PLP
PHP
PLP
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 22 cycles ===
=== 26 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|5 bytes
!colspan="2"|5 bytes
|-
|-
|<pre>PHP
|<pre>18      CLC
PLP
A9 0A    LDA #$0A ;hides 'ASL A'
JSR @rts15</pre> || Requires @rts15
10 FD    BPL *-1</pre>||Clobbers A, Z&N, and C
|-
|-
|<pre>PLA
|<pre>A2 04    LDX #4
PLA
CA      DEX
JSR @rts14</pre> || Clobbers A, S, and Z&amp;N; and requires @rts14
10 FD    BPL *-1</pre>||Clobbers X, and Z&N
|-
|-
!colspan="2"|6 bytes
|<pre>A0 05    LDY #5
|-
88      DEY
|<pre>LDY #3
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #3
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>PHA
PHP
PLP
JSR @rts12</pre> || Clobbers S; and requires @rts12
|-
|<pre>NOP
PLA
PLA
PLA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|<pre>NOP
PHA
PHA
JSR @rts14</pre> || Clobbers S; and requires @rts14
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>PHP
|<pre>EA      NOP
BIT $00
20 xx xx JSR @rts12× 2</pre>||Requires @rts12
PLP
JSR @rts12</pre> || Requires @rts12
|-
|<pre>PHP
PHA
TSX
PLA
TXS
PLA
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
NOP
NOP
JSR @rts14</pre> || Requires @rts14
|-
|<pre>NOP
PHA
PHA
PHP
PLP
PHP
PLP</pre> || Clobbers S
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP
NOP
48      PHA
NOP
36 36    ROL $36,X
NOP
76 36    ROR $36,X
PHP
68      PLA
PLP
28      PLP</pre>||No requirements
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 23 cycles ===
=== 27 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|5 bytes
!colspan="2"|6 bytes
|-
|<pre>A5 A5    LDA $A5
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1</pre>||Clobbers A, Z&N, and C
|-
!colspan="2"|7 bytes
|-
|-
|<pre>PLA
|<pre>48      PHA
PLA
A9 2A    LDA #$2A ;hides 'ROL A'
JSR @rts15</pre> || Clobbers A, S, and Z&amp;N; and requires @rts15
38      SEC
10 FC    BPL *-2
68      PLA</pre>||Clobbers Z&N, and C
|-
|-
!colspan="2"|6 bytes
|<pre>08      PHP
A9 2A    LDA #$2A ;hides 'ROL A'
38      SEC
10 FC    BPL *-2
28      PLP</pre>||Clobbers A
|-
|-
|<pre>NOP
|<pre>24 2C    BIT <$2C ;hides 'BIT $FDA2'
LDX #4
A2 FD    LDX #253
@X:
E8      INX
DEX
D0 FA    BNE *-4</pre>||Clobbers X, Z&N, and V
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>24 2C    BIT <$2C ;hides 'BIT $FDA0'
LDY #4
A0 FD    LDY #253
@Y:
C8      INY
DEY
D0 FA    BNE *-4</pre>||Clobbers Y, Z&N, and V
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>A4 AC    LDY <$AC ;hides 'LDY $82A2'
PHP
A2 82    LDX #130
PLP
CA      DEX
JSR @rts14</pre> || Requires @rts14
30 FA    BMI *-4</pre>||Clobbers X, Y, and Z&N
|-
|-
|<pre>NOP
!colspan="2"|8 bytes
PHA
PHA
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
|-
|<pre>PHA
|<pre>EA  ... NOP      × 3
PLA
A2 04    LDX #4
PLA
CA      DEX
PLA
D0 FD    BNE *-1</pre>||Clobbers X, and Z&N
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
|<pre>EA  ... NOP      × 3
A0 04    LDY #4
88      DEY
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
|-
|-
|<pre>NOP
|<pre>24 24    BIT $24
PHP
20 xx xx JSR @rts12× 2</pre>||Clobbers Z&N, and V; and requires @rts12
PLP
PHP
PLP
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|<pre>20 xx xx JSR @rts12
08      PHP
BA      TSX
28      PLP
9A      TXS
28      PLP</pre>||Clobbers X; and requires @rts12
|-
!colspan="2"|9 bytes
|-
|<pre>EA  ... NOP      × 3
08      PHP      \ × 3
28      PLP      /</pre>||No requirements
|-
|}




=== 24 cycles ===
=== 28 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>JSR @rts12
|<pre>38  ... SEC      × 2
JSR @rts12</pre> || Requires @rts12
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1</pre>||Clobbers A, Z&N, and C
|-
|-
|<pre>NOP
|<pre>EA      NOP
PHP
A2 04    LDX #4
PLP
CA      DEX
JSR @rts15</pre> || Requires @rts15
10 FD    BPL *-1</pre>||Clobbers X, and Z&N
|-
|-
|<pre>PLA
|<pre>EA      NOP
PLA
A0 05    LDY #5
PLA
88      DEY
PLA
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|<pre>PHA
LDX #4
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #4
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
PHP
PLP
JSR @rts14</pre> || Clobbers S; and requires @rts14
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>NOP
|<pre>48      PHA
LDX #3
18      CLC
@X:
A9 2A    LDA #$2A ;hides 'ROL A'
NOP
90 FD    BCC *-1
DEX
68      PLA</pre>||Clobbers Z&N, and C
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>08      PHP
LDY #3
18      CLC
@Y:
A9 2A    LDA #$2A ;hides 'ROL A'
NOP
90 FD    BCC *-1
DEY
28      PLP</pre>||Clobbers A
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|-
|<pre>PHP
|<pre>08      PHP
BIT $00
A2 04    LDX #4
PLP
CA      DEX
JSR @rts14</pre> || Requires @rts14
D0 FD    BNE *-1
28      PLP</pre>||Clobbers X
|-
|-
|<pre>PHA
|<pre>08      PHP
PHP
A0 04    LDY #4
PLP
88      DEY
PHP
D0 FD    BNE *-1
PLP
28      PLP</pre>||Clobbers Y
PHP
PLP</pre> || Clobbers S
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
|-
|<pre>PHP
|<pre>08      PHP       \ × 4
PLP
28      PLP       /</pre>||No requirements
PHP
PLP
PHP
BIT $00
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 25 cycles ===
=== 29 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>PHA
|<pre>18      CLC
PHP
A9 2A    LDA #$2A ;hides 'ROL A'
PLP
EA      NOP
JSR @rts15</pre> || Clobbers S; and requires @rts15
90 FC    BCC *-2</pre>||Clobbers A, Z&N, and C
|-
|-
|<pre>LDY #3
|<pre>A2 04    LDX #4
@Y:
EA      NOP
PHA
CA      DEX
DEY
D0 FC    BNE *-2</pre>||Clobbers X, and Z&N
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|-
|<pre>LDX #3
|<pre>A0 04    LDY #4
@X:
EA      NOP
PHA
88      DEY
DEX
D0 FC    BNE *-2</pre>||Clobbers Y, and Z&N
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|-
|<pre>PHA
!colspan="2"|8 bytes
PLA
PLA
JSR @rts14</pre> || Clobbers A, S, and Z&amp;N; and requires @rts14
|-
|-
!colspan="2"|7 bytes
|<pre>48      PHA
18      CLC
A9 2A    LDA #$2A ;hides 'ROL A'
38      SEC
10 FC    BPL *-2
68      PLA</pre>||Clobbers Z&N, and C
|-
|-
|<pre>PHP
|<pre>08      PHP
BIT $00
18      CLC
PLP
A9 2A    LDA #$2A ;hides 'ROL A'
JSR @rts15</pre> || Requires @rts15
38      SEC
10 FC    BPL *-2
28      PLP</pre>||Clobbers A
|-
|-
|<pre>LDY #2
|<pre>08      PHP
@Y:
A2 02    LDX #2
PHP
EA      NOP
PLP
CA      DEX
DEY
10 FC    BPL *-2
BNE @Y</pre> || Clobbers Y, and Z&amp;N
28      PLP</pre>||Clobbers X
|-
|-
|<pre>LDX #2
|<pre>08      PHP
@X:
A0 03    LDY #3
PHP
EA      NOP
PLP
88      DEY
DEX
D0 FC    BNE *-2
BNE @X</pre> || Clobbers X, and Z&amp;N
28      PLP</pre>||Clobbers Y
|-
|-
|<pre>NOP
!colspan="2"|9 bytes
NOP
PHP
PLP
JSR @rts14</pre> || Requires @rts14
|-
|-
|<pre>PHA
|<pre>08      PHP
PHA
28      PLP
PHP
08      PHP
PLP
C5 C5    CMP $C5
JSR @rts12</pre> || Clobbers S; and requires @rts12
28      PLP
20 xx xx JSR @rts12</pre>||Requires @rts12
|-
|-
|<pre>NOP
!colspan="2"|10 bytes
PHA
PLA
PLA
PLA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP
NOP
C5 C5    CMP $C5
PHP
28      PLP
PLP
08      PHP
PHP
36 36    ROL $36,X
PLP
76 36    ROR $36,X
PHP
28      PLP</pre>||No requirements
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 26 cycles ===
=== 30 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|5 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>LDY #5
|<pre>98      TYA
@Y:
A0 05    LDY #5
DEY
88      DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
D0 FD    BNE *-1
A8      TAY</pre>||Clobbers A, and Z&N
|-
|-
|<pre>LDX #5
|<pre>EA  ... NOP      × 2
@X:
A2 04    LDX #4
DEX
CA      DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
10 FD    BPL *-1</pre>||Clobbers X, and Z&N
|-
|-
!colspan="2"|6 bytes
|<pre>EA  ... NOP      × 2
A0 05    LDY #5
88      DEY
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
|-
|-
|<pre>JSR @rts12
!colspan="2"|8 bytes
JSR @rts14</pre> || Requires @rts12, and @rts14
|-
|-
|<pre>PHA
|<pre>48      PHA
PLA
18  ... CLC      × 2
PLA
A9 2A    LDA #$2A ;hides 'ROL A'
JSR @rts15</pre> || Clobbers A, S, and Z&amp;N; and requires @rts15
90 FD    BCC *-1
68      PLA</pre>||Clobbers Z&N, and C
|-
|-
|<pre>PLA
|<pre>08      PHP
PLA
18  ... CLC      × 2
PLA
A9 2A    LDA #$2A ;hides 'ROL A'
JSR @rts14</pre> || Clobbers A, S, and Z&amp;N; and requires @rts14
90 FD    BCC *-1
28      PLP</pre>||Clobbers A
|-
|-
!colspan="2"|7 bytes
|<pre>EA      NOP
08      PHP
A2 04    LDX #4
CA      DEX
D0 FD    BNE *-1
28      PLP</pre>||Clobbers X
|-
|-
|<pre>NOP
|<pre>EA      NOP
JSR @rts12
08      PHP
JSR @rts12</pre> || Requires @rts12
A0 04    LDY #4
88      DEY
D0 FD    BNE *-1
28      PLP</pre>||Clobbers Y
|-
|-
|<pre>NOP
!colspan="2"|9 bytes
NOP
PHP
PLP
JSR @rts15</pre> || Requires @rts15
|-
|<pre>ROL $00,X
ROR $00,X
JSR @rts14</pre> || Clobbers Z&amp;N; and requires @rts14
|-
|<pre>NOP
PLA
PLA
PLA
PLA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|<pre>NOP
PHA
PHP
PLP
JSR @rts14</pre> || Clobbers S; and requires @rts14
|-
!colspan="2"|8 bytes
|-
|-
|<pre>PHP
|<pre>08      PHP
PLP
48      PHA
PHP
18      CLC
ROL $00,X
A9 6A    LDA #$6A ;hides 'ROR A'
ROR $00,X
90 FD    BCC *-1
PLP</pre> || Clobbers nothing, requires nothing
68      PLA
28      PLP</pre>||No requirements
|-
|-
|}
|}




=== 27 cycles ===
=== 31 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|6 bytes
!colspan="2"|5 bytes
|-
|-
|<pre>JSR @rts12
|<pre>18      CLC
JSR @rts15</pre> || Requires @rts12, and @rts15
A9 0A    LDA #$0A ;hides 'ASL A'
90 FD    BCC *-1</pre>||Clobbers A, Z&N, and C
|-
|-
|<pre>PLA
|<pre>A2 05    LDX #5
PLA
CA      DEX
PLA
10 FD    BPL *-1</pre>||Clobbers X, and Z&N
JSR @rts15</pre> || Clobbers A, S, and Z&amp;N; and requires @rts15
|-
|-
!colspan="2"|7 bytes
|<pre>A0 06    LDY #6
88      DEY
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
|-
|-
|<pre>ROL $00,X
!colspan="2"|6 bytes
ROR $00,X
JSR @rts15</pre> || Clobbers Z&amp;N; and requires @rts15
|-
|-
|<pre>PHA
|<pre>48      PHA
JSR @rts12
A9 0A    LDA #$0A ;hides 'ASL A'
JSR @rts12</pre> || Clobbers S; and requires @rts12
10 FD    BPL *-1
68      PLA</pre>||Clobbers Z&N, and C
|-
|-
|<pre>NOP
|<pre>08      PHP
PHA
A9 0A    LDA #$0A ;hides 'ASL A'
PHP
10 FD    BPL *-1
PLP
28      PLP</pre>||Clobbers A
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
|-
|<pre>PHA
!colspan="2"|8 bytes
PLA
PLA
PLA
PLA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>08      PHP
LDX #3
28      PLP
@X:
20 xx xx JSR @rts12× 2</pre>||Requires @rts12
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|-
|<pre>NOP
!colspan="2"|9 bytes
LDY #3
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|-
|<pre>PHA
|<pre>08      PHP
PHA
A6 A6    LDX $A6
PHP
A2 04    LDX #4
PLP
CA      DEX
JSR @rts14</pre> || Clobbers S; and requires @rts14
D0 FD    BNE *-1
28      PLP</pre>||Clobbers X
|-
|-
|<pre>LDY #130
|<pre>08      PHP
@Y = * - 1
A4 A4    LDY $A4
; ^ Hides !NOP #imm
A0 04    LDY #4
NOP $EA ;hides 'NOP'
88      DEY
DEY
D0 FD    BNE *-1
BMI @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
28      PLP</pre>||Clobbers Y
|-
|-
|<pre>LDX #130
!colspan="2"|10 bytes
@X = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
DEX
BMI @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
|<pre>08      PHP
36 36    ROL $36,X \ × 2
76 36    ROR $36,X /
28      PLP</pre>||No requirements
|-
|-
|<pre>NOP
|}
PHP
 
BIT $00
 
PLP
=== 32 cycles ===
JSR @rts15</pre> || Requires @rts15
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|-
|<pre>LDA $00
|<pre>A2 05    LDX #5 ;hides 'ORA zp'
JSR @rts12
CA      DEX ;first loop only
JSR @rts12</pre> || Clobbers A, and Z&amp;N; and requires @rts12
CA      DEX
D0 FB    BNE *-3</pre>||Clobbers A, X, and Z&N
|-
|-
|<pre>NOP
|<pre>A0 05    LDY #5 ;hides 'ORA zp'
LDY #2
88      DEY ;first loop only
@Y:
88      DEY
PHP
D0 FB    BNE *-3</pre>||Clobbers A, Y, and Z&N
PLP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|-
|<pre>PHA
!colspan="2"|7 bytes
TSX
PLA
PLA
PLA
PLA
TXS
PLA</pre> || Clobbers X, and Z&amp;N
|-
|-
|<pre>PHP
|<pre>A9 2A    LDA #$2A ;hides 'ROL A'
TSX
EA  ... NOP      × 3
PLA
10 FA    BPL *-4</pre>||Clobbers A, Z&N, and C
PLA
PLA
PLA
TXS
PLP</pre> || Clobbers A, and X
|-
|-
|<pre>BIT $00
!colspan="2"|8 bytes
JSR @rts12
JSR @rts12</pre> || Clobbers Z&amp;N, and V; and requires @rts12
|-
|-
|<pre>NOP
|<pre>EA      NOP
NOP
98      TYA
NOP
A0 05    LDY #5
PHP
88      DEY
PLP
D0 FD    BNE *-1
JSR @rts14</pre> || Requires @rts14
A8      TAY</pre>||Clobbers A, and Z&N
|-
|-
|<pre>STA @zptemp
|<pre>A6 A6    LDX $A6
JSR @rts12
A2 04    LDX #4
JSR @rts12</pre> || Requires @zptemp, and @rts12
EA      NOP
CA      DEX
D0 FC    BNE *-2</pre>||Clobbers X, and Z&N
|-
|-
|<pre>PHA
|<pre>A4 A4    LDY $A4
PHA
A0 04    LDY #4
PHP
EA      NOP
PLP
88      DEY
PHP
D0 FC    BNE *-2</pre>||Clobbers Y, and Z&N
PLP
PHP
PLP</pre> || Clobbers S
|-
|-
|<pre>NOP $00
!colspan="2"|9 bytes
JSR @rts12
JSR @rts12</pre> || Requires @rts12, and support for unofficial opcodes
|-
|-
!colspan="2"|9 bytes
|<pre>48      PHA
98      TYA
A0 04    LDY #4
88      DEY
D0 FD    BNE *-1
A8      TAY
68      PLA</pre>||Clobbers Z&N
|-
|<pre>08      PHP
98      TYA
A0 04    LDY #4
88      DEY
D0 FD    BNE *-1
A8      TAY
28      PLP</pre>||Clobbers A
|-
|<pre>EA  ... NOP      × 2
08      PHP
A2 04    LDX #4
CA      DEX
D0 FD    BNE *-1
28      PLP</pre>||Clobbers X
|-
|<pre>EA  ... NOP      × 2
08      PHP
A0 04    LDY #4
88      DEY
D0 FD    BNE *-1
28      PLP</pre>||Clobbers Y
|-
!colspan="2"|10 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP
NOP
48      PHA
NOP
18  ... CLC      × 2
PHP
A9 6A    LDA #$6A ;hides 'ROR A'
PLP
90 FD    BCC *-1
PHP
68      PLA
PLP
28      PLP</pre>||No requirements
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 28 cycles ===
=== 33 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>NOP
|<pre>18  ... CLC      × 2
LDX #5
A9 0A    LDA #$0A ;hides 'ASL A'
@X:
90 FD    BCC *-1</pre>||Clobbers A, Z&N, and C
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>EA      NOP
LDY #5
A2 05    LDX #5
@Y:
CA      DEX
DEY
10 FD    BPL *-1</pre>||Clobbers X, and Z&N
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|-
|<pre>JSR @rts14
|<pre>EA      NOP
JSR @rts14</pre> || Requires @rts14
A0 06    LDY #6
88      DEY
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>PHP
|<pre>48      PHA
LDX #4
18      CLC
@X:
A9 0A    LDA #$0A ;hides 'ASL A'
DEX
10 FD    BPL *-1
BNE @X
68      PLA</pre>||Clobbers Z&N, and C
PLP</pre> || Clobbers X
|-
|-
|<pre>PHP
|<pre>08      PHP
LDY #4
18      CLC
@Y:
A9 0A    LDA #$0A ;hides 'ASL A'
DEY
10 FD    BPL *-1
BNE @Y
28      PLP</pre>||Clobbers A
PLP</pre> || Clobbers Y
|-
|-
|<pre>SEC
|<pre>08      PHP
LDA #5
A2 04    LDX #4
@A:
CA      DEX
SBC #1
10 FD    BPL *-1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
28      PLP</pre>||Clobbers X
|-
|-
|<pre>PHA
|<pre>08      PHP
PHA
A0 05    LDY #5
PHP
88      DEY
PLP
D0 FD    BNE *-1
JSR @rts15</pre> || Clobbers S; and requires @rts15
28      PLP</pre>||Clobbers Y
|-
|-
|<pre>PLA
!colspan="2"|9 bytes
PLA
PLA
PLA
PLA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|-
!colspan="2"|8 bytes
|<pre>EA      NOP
08      PHP
28      PLP
20 xx xx JSR @rts12× 2</pre>||Requires @rts12
|-
!colspan="2"|10 bytes
|-
|-
|<pre>PHP
|<pre>08      PHP       \ × 2
PLP
28      PLP       /
PHP
08      PHP
PLP
36 36    ROL $36,X
PHP
76 36    ROR $36,X
PLP
28      PLP</pre>||No requirements
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 29 cycles ===
=== 34 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|6 bytes
!colspan="2"|5 bytes
|-
|-
|<pre>LDX #4
|<pre>A9 0A    LDA #$0A ;hides 'ASL A'
@X:
18      CLC
NOP
10 FC    BPL *-2</pre>||Clobbers A, Z&N, and C
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|-
|<pre>LDY #4
|<pre>A0 88    LDY #136 ;hides 'DEY'
@Y:
88      DEY
NOP
30 FC    BMI *-2</pre>||Clobbers Y, and Z&N
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|-
|<pre>JSR @rts14
!colspan="2"|7 bytes
JSR @rts15</pre> || Requires @rts14, and @rts15
|-
|-
!colspan="2"|7 bytes
|<pre>A6 A6    LDX $A6
A2 05    LDX #5
CA      DEX
10 FD    BPL *-1</pre>||Clobbers X, and Z&N
|-
|-
|<pre>PHP
!colspan="2"|8 bytes
PLP
PHP
PLP
JSR @rts15</pre> || Requires @rts15
|-
|-
|<pre>PHA
|<pre>C5 C5    CMP $C5
JSR @rts12
48      PHA
JSR @rts14</pre> || Clobbers S; and requires @rts12, and @rts14
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
68      PLA</pre>||Clobbers Z&N, and C
|-
|-
|<pre>PHA
|<pre>08      PHP
PLA
A5 A5    LDA $A5
PLA
A9 0A    LDA #$0A ;hides 'ASL A'
PLA
10 FD    BPL *-1
JSR @rts14</pre> || Clobbers A, S, and Z&amp;N; and requires @rts14
28      PLP</pre>||Clobbers A
|-
|-
!colspan="2"|8 bytes
!colspan="2"|9 bytes
|-
|-
|<pre>PHP
|<pre>08      PHP
LDY #3
48      PHA
@Y:
A9 2A    LDA #$2A ;hides 'ROL A'
NOP
38      SEC
DEY
10 FC    BPL *-2
BNE @Y
68      PLA
PLP</pre> || Clobbers Y
28      PLP</pre>||No requirements
|-
|-
|<pre>PHP
|}
LDX #3
 
@X:
 
NOP
=== 35 cycles ===
DEX
{| class="wikitable testtable"
BNE @X
!colspan="2"|6 bytes
PLP</pre> || Clobbers X
|-
|-
|<pre>LDA $00
|<pre>A9 2A    LDA #$2A ;hides 'ROL A'
JSR @rts12
08      PHP
JSR @rts14</pre> || Clobbers A, and Z&amp;N; and requires @rts12, and @rts14
28      PLP
10 FB    BPL *-3</pre>||Clobbers A, Z&N, and C
|-
|-
|<pre>BIT $00
|<pre>A2 F8    LDX #248 ;hides 'SED'
JSR @rts12
E8  ... INX      × 2
JSR @rts14</pre> || Clobbers Z&amp;N, and V; and requires @rts12, and @rts14
D0 FB    BNE *-3</pre>||Clobbers X, Z&N, and D
|-
|-
|<pre>STA @zptemp
|<pre>A0 88    LDY #136 ;hides 'DEY'
JSR @rts12
88  ... DEY      × 2
JSR @rts14</pre> || Requires @zptemp, @rts12, and @rts14
30 FB    BMI *-3</pre>||Clobbers Y, and Z&N
|-
|-
|<pre>NOP
!colspan="2"|7 bytes
PHA
JSR @rts12
JSR @rts12</pre> || Clobbers S; and requires @rts12
|-
|-
|<pre>NOP
|<pre>98      TYA
PHA
A0 06    LDY #6
PLA
88      DEY
PLA
D0 FD    BNE *-1
PLA
A8      TAY</pre>||Clobbers A, and Z&N
PLA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>EA  ... NOP     × 2
PHA
A2 05    LDX #5
PHA
CA      DEX
PHP
10 FD    BPL *-1</pre>||Clobbers X, and Z&N
PLP
JSR @rts14</pre> || Clobbers S; and requires @rts14
|-
|-
|<pre>NOP $00
!colspan="2"|8 bytes
JSR @rts12
JSR @rts14</pre> || Requires @rts12, @rts14, and support for unofficial opcodes
|-
|-
!colspan="2"|9 bytes
|<pre>48      PHA
38  ... SEC      × 2
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
68      PLA</pre>||Clobbers Z&N, and C
|-
|-
|<pre>PHP
|<pre>08      PHP
PLP
38  ... SEC      × 2
PHP
A9 0A    LDA #$0A ;hides 'ASL A'
BIT $00
10 FD    BPL *-1
PLP
28      PLP</pre>||Clobbers A
JSR @rts12</pre> || Requires @rts12
|-
|-
|<pre>NOP
|<pre>EA      NOP
NOP
08      PHP
NOP
A2 04    LDX #4
NOP
CA      DEX
PHP
10 FD    BPL *-1
PLP
28      PLP</pre>||Clobbers X
JSR @rts14</pre> || Requires @rts14
|-
|-
|<pre>NOP
|<pre>EA      NOP
PHA
08      PHP
PHA
A0 05    LDY #5
PHP
88      DEY
PLP
D0 FD    BNE *-1
PHP
28      PLP</pre>||Clobbers Y
PLP
PHP
PLP</pre> || Clobbers S
|-
|-
!colspan="2"|10 bytes
!colspan="2"|9 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP
NOP
48      PHA
NOP
18      CLC
NOP
A9 2A    LDA #$2A ;hides 'ROL A'
PHP
90 FD    BCC *-1
PLP
68      PLA
PHP
28      PLP</pre>||No requirements
PLP
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 30 cycles ===
=== 36 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|6 bytes
!colspan="2"|5 bytes
|-
|-
|<pre>JSR @rts15
|<pre>A9 E9    LDA #$E9 ;hides 'SBC #$2A'
JSR @rts15</pre> || Requires @rts15
2A      ROL A ;first loop only
B0 FC    BCS *-2</pre>||Clobbers A, Z&N, C, and V
|-
|-
|<pre>PLA
|<pre>A2 07    LDX #7
LDX #5
CA      DEX
@X:
D0 FD    BNE *-1</pre>||Clobbers X, and Z&N
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|-
|<pre>PLA
|<pre>A0 06    LDY #6
LDY #5
88      DEY
@Y:
10 FD    BPL *-1</pre>||Clobbers Y, and Z&N
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>NOP
|<pre>38      SEC
NOP
A9 0A    LDA #$0A ;hides 'ASL A'
LDY #5
38      SEC
@Y:
10 FC    BPL *-2</pre>||Clobbers A, Z&N, and C
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|-
|<pre>NOP
!colspan="2"|8 bytes
NOP
LDX #5
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>48      PHA
JSR @rts14
18      CLC
JSR @rts14</pre> || Requires @rts14
A9 2A    LDA #$2A ;hides 'ROL A'
EA      NOP
90 FC    BCC *-2
68      PLA</pre>||Clobbers Z&N, and C
|-
|-
!colspan="2"|8 bytes
|<pre>08      PHP
18      CLC
A9 2A    LDA #$2A ;hides 'ROL A'
EA      NOP
90 FC    BCC *-2
28      PLP</pre>||Clobbers A
|-
|-
|<pre>NOP
|<pre>08      PHP
PHP
A2 04    LDX #4
LDY #4
EA      NOP
@Y:
CA      DEX
DEY
D0 FC    BNE *-2
BNE @Y
28      PLP</pre>||Clobbers X
PLP</pre> || Clobbers Y
|-
|-
|<pre>NOP
|<pre>08      PHP
PHP
A0 04    LDY #4
LDX #4
EA      NOP
@X:
88      DEY
DEX
D0 FC    BNE *-2
BNE @X
28      PLP</pre>||Clobbers Y
PLP</pre> || Clobbers X
|-
|-
|<pre>NOP
!colspan="2"|9 bytes
SEC
LDA #5
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|-
|<pre>PHA
|<pre>20 xx xx JSR @rts12× 3</pre>||Requires @rts12
PHA
JSR @rts12
JSR @rts12</pre> || Clobbers S; and requires @rts12
|-
|-
|<pre>NOP
!colspan="2"|10 bytes
PLA
PLA
PLA
PLA
PLA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|-
!colspan="2"|9 bytes
|<pre>08      PHP
|-
48      PHA
|<pre>NOP
18      CLC
PHP
A9 2A    LDA #$2A ;hides 'ROL A'
PLP
38      SEC
PHP
10 FC    BPL *-2
PLP
68      PLA
PHP
28      PLP</pre>||No requirements
PLP
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 31 cycles ===
=== 37 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|5 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>LDY #6
|<pre>A5 A5    LDA $A5
@Y:
A9 0A    LDA #$0A ;hides 'ASL A'
DEY
18      CLC
BNE @Y</pre> || Clobbers Y, and Z&amp;N
10 FC    BPL *-2</pre>||Clobbers A, Z&N, and C
|-
|-
|<pre>LDX #6
|<pre>A2 04    LDX #4
@X:
EA  ... NOP      × 2
DEX
CA      DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
D0 FB    BNE *-3</pre>||Clobbers X, and Z&N
|-
|-
!colspan="2"|7 bytes
|<pre>A0 04    LDY #4
EA  ... NOP      × 2
88      DEY
D0 FB    BNE *-3</pre>||Clobbers Y, and Z&N
|-
|-
|<pre>NOP
!colspan="2"|8 bytes
JSR @rts14
JSR @rts15</pre> || Requires @rts14, and @rts15
|-
|-
|<pre>PLA
|<pre>EA      NOP
PLA
98      TYA
PLA
A0 06    LDY #6
PLA
88      DEY
JSR @rts15</pre> || Clobbers A, S, and Z&amp;N; and requires @rts15
D0 FD    BNE *-1
A8      TAY</pre>||Clobbers A, and Z&N
|-
|-
|<pre>PHA
!colspan="2"|9 bytes
JSR @rts14
JSR @rts14</pre> || Clobbers S; and requires @rts14
|-
|-
!colspan="2"|8 bytes
|<pre>48      PHA
98      TYA
A0 05    LDY #5
88      DEY
D0 FD    BNE *-1
A8      TAY
68      PLA</pre>||Clobbers Z&N
|-
|-
|<pre>PHP
|<pre>08      PHP
PLP
98      TYA
JSR @rts12
A0 05    LDY #5
JSR @rts12</pre> || Requires @rts12
88      DEY
D0 FD    BNE *-1
A8      TAY
28      PLP</pre>||Clobbers A
|-
|-
|<pre>NOP
|<pre>EA  ... NOP     × 2
PHP
08      PHP
PLP
A2 04    LDX #4
PHP
CA      DEX
PLP
10 FD    BPL *-1
JSR @rts15</pre> || Requires @rts15
28      PLP</pre>||Clobbers X
|-
|-
|<pre>SEC
|<pre>EA  ... NOP      × 2
LDA #4
08      PHP
@A:
A0 05    LDY #5
NOP
88      DEY
SBC #1
D0 FD    BNE *-1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
28      PLP</pre>||Clobbers Y
|-
|-
|<pre>LDA $00
!colspan="2"|10 bytes
JSR @rts14
JSR @rts14</pre> || Clobbers A, and Z&amp;N; and requires @rts14
|-
|-
|<pre>BIT $00
|<pre>08      PHP
JSR @rts14
48      PHA
JSR @rts14</pre> || Clobbers Z&amp;N, and V; and requires @rts14
18  ... CLC      × 2
A9 2A    LDA #$2A ;hides 'ROL A'
90 FD    BCC *-1
68      PLA
28      PLP</pre>||No requirements
|-
|-
|<pre>STA @zptemp
|}
JSR @rts14
 
JSR @rts14</pre> || Requires @zptemp, and @rts14
 
=== 38 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|-
|<pre>PHA
|<pre>38      SEC
PLA
A9 69    LDA #$69 ;hides 'ADC #$EA'
PLA
EA      NOP ;first loop only
PLA
B0 FC    BCS *-2</pre>||Clobbers A, Z&N, C, and V
PLA
PLA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|-
|<pre>PHA
|<pre>EA      NOP
PHP
A2 07    LDX #7
LDX #4
CA      DEX
@X:
D0 FD    BNE *-1</pre>||Clobbers X, and Z&N
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|-
|<pre>PHA
|<pre>EA      NOP
PHP
A0 06    LDY #6
LDY #4
88      DEY
@Y:
10 FD    BPL *-1</pre>||Clobbers Y, and Z&N
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|-
|<pre>NOP $00
!colspan="2"|7 bytes
JSR @rts14
JSR @rts14</pre> || Requires @rts14, and support for unofficial opcodes
|-
|-
!colspan="2"|9 bytes
|<pre>48      PHA
18      CLC
A9 0A    LDA #$0A ;hides 'ASL A'
90 FD    BCC *-1
68      PLA</pre>||Clobbers Z&N, and C
|-
|-
|<pre>NOP
|<pre>08      PHP
PHP
18      CLC
LDY #3
A9 0A    LDA #$0A ;hides 'ASL A'
@Y:
90 FD    BCC *-1
NOP
28      PLP</pre>||Clobbers A
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|-
|<pre>NOP
|<pre>08      PHP
PHP
A2 05    LDX #5
LDX #3
CA      DEX
@X:
10 FD    BPL *-1
NOP
28      PLP</pre>||Clobbers X
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|-
|<pre>JMP *+3
|<pre>08      PHP
JSR @rts14
A0 06    LDY #6
JSR @rts14</pre> || Requires @rts14
88      DEY
D0 FD    BNE *-1
28      PLP</pre>||Clobbers Y
|-
|-
|<pre>PHA
!colspan="2"|8 bytes
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP</pre> || Clobbers S
|-
!colspan="2"|10 bytes
|-
|-
|<pre>PHP
|<pre>08      PHP
PLP
48      PHA
PHP
A9 0A    LDA #$0A ;hides 'ASL A'
PLP
10 FD    BPL *-1
PHP
68      PLA
PLP
28      PLP</pre>||No requirements
PHP
BIT $00
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 32 cycles ===
=== 39 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|6 bytes
!colspan="2"|4 bytes
|-
|<pre>LDY #5
@Y = * - 1
; ^ Hides ORA zp
DEY ;first round only
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|-
|<pre>LDX #5
|<pre>A9 4A    LDA #$4A ;hides 'LSR A'
@X = * - 1
D0 FD    BNE *-1</pre>||Clobbers A, Z&N, and C
; ^ Hides ORA zp
DEX ;first round only
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>NOP
|<pre>A6 A6    LDX $A6
JSR @rts15
A2 07    LDX #7
JSR @rts15</pre> || Requires @rts15
CA      DEX
D0 FD    BNE *-1</pre>||Clobbers X, and Z&N
|-
|-
|<pre>PHA
|<pre>A4 A4    LDY $A4
LDX #4
A0 06    LDY #6
@X:
88      DEY
NOP
10 FD    BPL *-1</pre>||Clobbers Y, and Z&N
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|-
|<pre>PHA
!colspan="2"|8 bytes
LDY #4
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|-
|<pre>PLA
|<pre>98      TYA
JSR @rts14
A0 88    LDY #136 ;hides 'DEY'
JSR @rts14</pre> || Clobbers A, S, and Z&amp;N; and requires @rts14
88  ... DEY      × 2
30 FB    BMI *-3
A8      TAY</pre>||Clobbers A, and Z&N
|-
|-
|<pre>LDY #250
|<pre>08      PHP
@Y = * - 1
A2 05    LDX #5 ;hides 'ORA zp'
; ^ Hides !NOP
CA      DEX ;first loop only
NOP
CA      DEX
INY
D0 FB    BNE *-3
INY
28      PLP</pre>||Clobbers A, and X
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
|<pre>LDX #250
|<pre>08      PHP
@X = * - 1
A0 05    LDY #5 ;hides 'ORA zp'
; ^ Hides !NOP
88      DEY ;first loop only
NOP
88      DEY
INX
D0 FB    BNE *-3
INX
28      PLP</pre>||Clobbers A, and Y
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
!colspan="2"|9 bytes
|-
|-
|<pre>NOP
|<pre>48      PHA
NOP
A9 2A    LDA #$2A ;hides 'ROL A'
NOP
EA  ... NOP     × 3
LDX #5
10 FA    BPL *-4
@X:
68      PLA</pre>||Clobbers Z&N, and C
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>08      PHP
NOP
A9 2A    LDA #$2A ;hides 'ROL A'
NOP
EA  ... NOP     × 3
LDY #5
10 FA    BPL *-4
@Y:
28      PLP</pre>||Clobbers A
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|-
|<pre>NOP
!colspan="2"|10 bytes
NOP
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
|-
|<pre>PLA
|<pre>EA      NOP
PLA
48      PHA
PLA
98      TYA
PLA
A0 05    LDY #5
PLA
88      DEY
PLA
D0 FD    BNE *-1
PLA
A8      TAY
PLA</pre> || Clobbers A, S, and Z&amp;N
68      PLA</pre>||Clobbers Z&N
|-
|-
!colspan="2"|9 bytes
|<pre>08      PHP
A6 A6    LDX $A6
A2 04    LDX #4
EA      NOP
CA      DEX
D0 FC    BNE *-2
28      PLP</pre>||Clobbers X
|-
|-
|<pre>TYA
|<pre>08      PHP
PHA
A4 A4    LDY $A4
LDY #4
A0 04    LDY #4
@Y:
EA      NOP
DEY
88      DEY
BNE @Y
D0 FC    BNE *-2
PLA
28      PLP</pre>||Clobbers Y
TAY</pre> || Clobbers A, and Z&amp;N
|-
|-
|<pre>PHP
!colspan="2"|11 bytes
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #2
@X:
PHP
PLP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHA
PHA
JSR @rts12
JSR @rts12</pre> || Clobbers S; and requires @rts12
|-
|-
!colspan="2"|10 bytes
|<pre>08      PHP
|-
48      PHA
|<pre>NOP
98      TYA
NOP
A0 04    LDY #4
PHP
88      DEY
PLP
D0 FD    BNE *-1
PHP
A8      TAY
PLP
68      PLA
PHP
28      PLP</pre>||No requirements
PLP
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 33 cycles ===
=== 40 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>NOP
|<pre>A2 05    LDX #5 ;hides 'ORA zp'
LDY #6
EA      NOP
@Y:
CA      DEX
DEY
D0 FB    BNE *-3</pre>||Clobbers A, X, and Z&N
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>A0 05    LDY #5 ;hides 'ORA zp'
LDX #6
EA      NOP
@X:
88      DEY
DEX
D0 FB    BNE *-3</pre>||Clobbers A, Y, and Z&N
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>PHP
|<pre>98      TYA
LDY #5
A0 06    LDY #6
@Y:
88      DEY
DEY
10 FD    BPL *-1
BNE @Y
A8      TAY</pre>||Clobbers A, and Z&N
PLP</pre> || Clobbers Y
|-
|-
|<pre>PHP
|<pre>EA  ... NOP      × 2
LDX #5
A2 07    LDX #7
@X:
CA      DEX
DEX
D0 FD    BNE *-1</pre>||Clobbers X, and Z&N
BNE @X
PLP</pre> || Clobbers X
|-
|-
|<pre>SEC
|<pre>EA  ... NOP      × 2
LDA #6
A0 06    LDY #6
@A:
88      DEY
SBC #1
10 FD    BPL *-1</pre>||Clobbers Y, and Z&N
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|-
|<pre>PHA
!colspan="2"|8 bytes
JSR @rts15
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
|-
!colspan="2"|8 bytes
|<pre>48      PHA
18  ... CLC      × 2
A9 0A    LDA #$0A ;hides 'ASL A'
90 FD    BCC *-1
68      PLA</pre>||Clobbers Z&N, and C
|-
|<pre>08      PHP
18  ... CLC      × 2
A9 0A    LDA #$0A ;hides 'ASL A'
90 FD    BCC *-1
28      PLP</pre>||Clobbers A
|-
|<pre>EA      NOP
08      PHP
A2 05    LDX #5
CA      DEX
10 FD    BPL *-1
28      PLP</pre>||Clobbers X
|-
|-
|<pre>LDA $00
|<pre>EA      NOP
JSR @rts15
08      PHP
JSR @rts15</pre> || Clobbers A, and Z&amp;N; and requires @rts15
A0 06    LDY #6
88      DEY
D0 FD    BNE *-1
28      PLP</pre>||Clobbers Y
|-
|-
|<pre>BIT $00
!colspan="2"|9 bytes
JSR @rts15
JSR @rts15</pre> || Clobbers Z&amp;N, and V; and requires @rts15
|-
|-
|<pre>PHP
|<pre>08      PHP
PLP
48      PHA
JSR @rts12
18      CLC
JSR @rts14</pre> || Requires @rts12, and @rts14
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
68      PLA
28      PLP</pre>||No requirements
|-
|}
 
 
=== 41 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|-
|<pre>NOP
|<pre>38      SEC
NOP
A9 4A    LDA #$4A ;hides 'LSR A'
JSR @rts14
D0 FD    BNE *-1</pre>||Clobbers A, Z&N, and C
JSR @rts15</pre> || Requires @rts14, and @rts15
|-
|-
|<pre>STA @zptemp
|<pre>A2 08    LDX #8
JSR @rts15
CA      DEX
JSR @rts15</pre> || Requires @zptemp, and @rts15
D0 FD    BNE *-1</pre>||Clobbers X, and Z&N
|-
|-
|<pre>NOP
|<pre>A0 08    LDY #8
PHA
88      DEY
JSR @rts14
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
JSR @rts14</pre> || Clobbers S; and requires @rts14
|-
|-
|<pre>NOP $00
!colspan="2"|7 bytes
JSR @rts15
JSR @rts15</pre> || Requires @rts15, and support for unofficial opcodes
|-
|-
!colspan="2"|9 bytes
|<pre>48      PHA
A9 0A    LDA #$0A ;hides 'ASL A'
18      CLC
10 FC    BPL *-2
68      PLA</pre>||Clobbers Z&N, and C
|-
|-
|<pre>NOP
|<pre>08      PHP
PHP
A9 0A    LDA #$0A ;hides 'ASL A'
PLP
18      CLC
JSR @rts12
10 FC    BPL *-2
JSR @rts12</pre> || Requires @rts12
28      PLP</pre>||Clobbers A
|-
|-
|<pre>JMP *+3
|<pre>08      PHP
JSR @rts15
A0 88    LDY #136 ;hides 'DEY'
JSR @rts15</pre> || Requires @rts15
88      DEY
30 FC    BMI *-2
28      PLP</pre>||Clobbers Y
|-
|-
|<pre>JSR @rts14
!colspan="2"|9 bytes
PHP
ROL $00,X
ROR $00,X
PLP</pre> || Requires @rts14
|-
|-
|<pre>NOP
|<pre>08      PHP
PHA
A6 A6    LDX $A6
PLA
A2 05    LDX #5
PLA
CA      DEX
PLA
10 FD    BPL *-1
PLA
28      PLP</pre>||Clobbers X
PLA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
|-
|-
|<pre>PHP
|<pre>08      PHP
PLP
48      PHA
PHP
A5 A5    LDA $A5
PLP
A9 0A    LDA #$0A ;hides 'ASL A'
PHP
10 FD    BPL *-1
ROL $00,X
68      PLA
ROR $00,X
28      PLP</pre>||No requirements
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 34 cycles ===
=== 42 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
BMI @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>PHA
|<pre>A5 A5    LDA $A5
LDX #6
A9 4A    LDA #$4A ;hides 'LSR A'
@X:
D0 FD    BNE *-1</pre>||Clobbers A, Z&N, and C
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>LDA $00
|<pre>EA      NOP
LDX #6
A2 05    LDX #5 ;hides 'ORA zp'
@X:
EA      NOP
DEX
CA      DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
D0 FB    BNE *-3</pre>||Clobbers A, X, and Z&N
|-
|-
|<pre>BIT $00
|<pre>EA      NOP
LDX #6
A0 05    LDY #5 ;hides 'ORA zp'
@X:
EA      NOP
DEX
88      DEY
BNE @X</pre> || Clobbers X, Z&amp;N, and V
D0 FB    BNE *-3</pre>||Clobbers A, Y, and Z&N
|-
|-
|<pre>STA @zptemp
!colspan="2"|8 bytes
LDX #6
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>PLA
JSR @rts15
JSR @rts15</pre> || Clobbers A, S, and Z&amp;N; and requires @rts15
|-
|<pre>NOP $00
LDX #6
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
|<pre>48      PHA
A9 2A    LDA #$2A ;hides 'ROL A'
08      PHP
28      PLP
10 FB    BPL *-3
68      PLA</pre>||Clobbers Z&N, and C
|-
|-
|<pre>NOP
|<pre>08      PHP
NOP
A9 2A    LDA #$2A ;hides 'ROL A'
JSR @rts15
08      PHP
JSR @rts15</pre> || Requires @rts15
28      PLP
10 FB    BPL *-3
28      PLP</pre>||Clobbers A
|-
|-
|<pre>JMP *+3
|<pre>08      PHP
LDX #6
A2 F8    LDX #248 ;hides 'SED'
@X:
E8  ... INX      × 2
DEX
D0 FB    BNE *-3
BNE @X</pre> || Clobbers X, and Z&amp;N
28      PLP</pre>||Clobbers X
|-
|-
|<pre>PHA
|<pre>08      PHP
PHA
A0 88    LDY #136 ;hides 'DEY'
JSR @rts14
88  ... DEY      × 2
JSR @rts14</pre> || Clobbers S; and requires @rts14
30 FB    BMI *-3
28      PLP</pre>||Clobbers Y
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
|-
|<pre>NOP
|<pre>48      PHA
NOP
98      TYA
NOP
A0 06    LDY #6
JSR @rts14
88      DEY
JSR @rts14</pre> || Requires @rts14
D0 FD    BNE *-1
A8      TAY
68      PLA</pre>||Clobbers Z&N
|-
|-
|<pre>PHA
!colspan="2"|10 bytes
PHP
PLP
JSR @rts12
JSR @rts12</pre> || Clobbers S; and requires @rts12
|-
|-
|<pre>NOP
|<pre>08      PHP
PLA
48      PHA
PLA
38  ... SEC      × 2
PLA
A9 0A    LDA #$0A ;hides 'ASL A'
PLA
10 FD    BPL *-1
PLA
68      PLA
PLA
28      PLP</pre>||No requirements
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|-
|<pre>PHA
|}
PHA
 
PHP
 
LDY #4
=== 43 cycles ===
@Y:
{| class="wikitable testtable"
DEY
!colspan="2"|6 bytes
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|-
|<pre>PHA
|<pre>38  ... SEC      × 2
PHA
A9 4A    LDA #$4A ;hides 'LSR A'
PHP
D0 FD    BNE *-1</pre>||Clobbers A, Z&N, and C
LDX #4
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|-
|<pre>PHP
|<pre>A2 05    LDX #5
LDY #130
EA       NOP
@Y = * - 1
CA      DEX
; ^ Hides !NOP #imm
10 FC    BPL *-2</pre>||Clobbers X, and Z&N
NOP $EA ;hides 'NOP'
DEY
BMI @Y
PLP</pre> || Clobbers Y; and requires support for unofficial opcodes
|-
|-
|<pre>PHP
|<pre>A0 06    LDY #6
LDX #130
EA       NOP
@X = * - 1
88      DEY
; ^ Hides !NOP #imm
D0 FC    BNE *-2</pre>||Clobbers Y, and Z&N
NOP $EA ;hides 'NOP'
DEX
BMI @X
PLP</pre> || Clobbers X; and requires support for unofficial opcodes
|-
|-
!colspan="2"|10 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>PHP
|<pre>48      PHA
BIT $00
A9 E9    LDA #$E9 ;hides 'SBC #$2A'
PLP
2A      ROL A ;first loop only
JSR @rts12
B0 FC    BCS *-2
JSR @rts12</pre> || Requires @rts12
68      PLA</pre>||Clobbers Z&N, C, and V
|-
|-
|<pre>NOP
|<pre>08      PHP
TYA
A9 E9    LDA #$E9 ;hides 'SBC #$2A'
PHA
2A      ROL A ;first loop only
LDY #4
B0 FC    BCS *-2
@Y:
28      PLP</pre>||Clobbers A
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>08      PHP
PHP
A2 07    LDX #7
LDY #2
CA      DEX
@Y:
D0 FD    BNE *-1
PHP
28      PLP</pre>||Clobbers X
PLP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|-
|<pre>PHP
|<pre>08      PHP
PHA
A0 06    LDY #6
TSX
88      DEY
PLA
10 FD    BPL *-1
PLA
28      PLP</pre>||Clobbers Y
PLA
PLA
TXS
PLA
PLP</pre> || Clobbers X
|-
|-
|<pre>PHA
!colspan="2"|8 bytes
PHA
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP</pre> || Clobbers S
|-
|-
!colspan="2"|11 bytes
|<pre>48      PHA
38      SEC
A9 0A    LDA #$0A ;hides 'ASL A'
38      SEC
10 FC    BPL *-2
68      PLA</pre>||Clobbers Z&N, and C
|-
!colspan="2"|10 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP
NOP
48      PHA
NOP
18      CLC
PHP
A9 2A    LDA #$2A ;hides 'ROL A'
PLP
EA      NOP
PHP
90 FC    BCC *-2
PLP
68      PLA
PHP
28      PLP</pre>||No requirements
PLP
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 35 cycles ===
=== 44 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>LDY #136
|<pre>A9 0A    LDA #$0A ;hides 'ASL A'
@Y = * - 1
EA  ... NOP      × 2
; ^ Hides DEY
10 FB    BPL *-3</pre>||Clobbers A, Z&N, and C
DEY
DEY
BMI @Y</pre> || Clobbers Y, and Z&amp;N
|-
|-
|<pre>LDX #248
|<pre>A0 88    LDY #136 ;hides 'DEY'
@X = * - 1
EA      NOP
; ^ Hides SED
88      DEY
INX
30 FB    BMI *-3</pre>||Clobbers Y, and Z&N
INX
BNE @X</pre> || Clobbers X, Z&amp;N, and D
|-
|<pre>PLA
LDX #6
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>NOP
|<pre>A6 A6    LDX $A6
NOP
A2 08    LDX #8
LDX #6
CA      DEX
@X:
D0 FD    BNE *-1</pre>||Clobbers X, and Z&N
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|-
!colspan="2"|8 bytes
!colspan="2"|9 bytes
|-
|-
|<pre>NOP
|<pre>C5 C5    CMP $C5
PHP
48      PHA
LDY #5
A9 0A    LDA #$0A ;hides 'ASL A'
@Y:
18      CLC
DEY
10 FC    BPL *-2
BNE @Y
68      PLA</pre>||Clobbers Z&N, and C
PLP</pre> || Clobbers Y
|-
|-
|<pre>NOP
|<pre>08      PHP
PHP
A5 A5    LDA $A5
LDX #5
A9 0A    LDA #$0A ;hides 'ASL A'
@X:
18      CLC
DEX
10 FC    BPL *-2
BNE @X
28      PLP</pre>||Clobbers A
PLP</pre> || Clobbers X
|-
|-
|<pre>NOP
|<pre>08      PHP
SEC
A2 04    LDX #4
LDA #6
EA  ... NOP      × 2
@A:
CA      DEX
SBC #1
D0 FB    BNE *-3
BNE @A</pre> || Clobbers A, Z&amp;N, and C
28      PLP</pre>||Clobbers X
|-
|-
|<pre>PHP
|<pre>08      PHP
PLP
A0 04    LDY #4
JSR @rts14
EA  ... NOP      × 2
JSR @rts14</pre> || Requires @rts14
88      DEY
D0 FB    BNE *-3
28      PLP</pre>||Clobbers Y
|-
|-
|<pre>NOP
!colspan="2"|10 bytes
PHA
JSR @rts15
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
|-
!colspan="2"|9 bytes
|<pre>EA      NOP
48      PHA
98      TYA
A0 06    LDY #6
88      DEY
D0 FD    BNE *-1
A8      TAY
68      PLA</pre>||Clobbers Z&N
|-
|-
|<pre>PHP
!colspan="2"|11 bytes
SEC
LDA #5
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #5
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
|<pre>NOP
BIT $00
JSR @rts15
JSR @rts15</pre> || Clobbers Z&amp;N, and V; and requires @rts15
|-
|<pre>NOP
STA @zptemp
JSR @rts15
JSR @rts15</pre> || Requires @zptemp, and @rts15
|-
|<pre>NOP
NOP $00
JSR @rts15
JSR @rts15</pre> || Requires @rts15, and support for unofficial opcodes
|-
!colspan="2"|10 bytes
|-
|-
|<pre>PHP
|<pre>08      PHP
PLP
48      PHA
PHP
98      TYA
PLP
A0 05    LDY #5
PHP
88      DEY
PLP
D0 FD    BNE *-1
PHP
A8      TAY
PLP
68      PLA
PHP
28      PLP</pre>||No requirements
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 36 cycles ===
=== 45 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|5 bytes
!colspan="2"|7 bytes
|-
|<pre>98      TYA
A0 08    LDY #8
88      DEY
D0 FD    BNE *-1
A8      TAY</pre>||Clobbers A, and Z&N
|-
|-
|<pre>LDY #7
|<pre>EA  ... NOP      × 2
@Y:
A2 08    LDX #8
DEY
CA      DEX
BNE @Y</pre> || Clobbers Y, and Z&amp;N
D0 FD    BNE *-1</pre>||Clobbers X, and Z&N
|-
|-
|<pre>LDX #7
|<pre>EA  ... NOP      × 2
@X:
A0 08    LDY #8
DEX
88      DEY
BNE @X</pre> || Clobbers X, and Z&amp;N
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
|-
|<pre>PHP
|<pre>48      PHA
LDX #4
38      SEC
@X:
A9 69    LDA #$69 ;hides 'ADC #$EA'
NOP
EA      NOP ;first loop only
DEX
B0 FC    BCS *-2
BNE @X
68      PLA</pre>||Clobbers Z&N, C, and V
PLP</pre> || Clobbers X
|-
|-
|<pre>PHP
|<pre>08      PHP
LDY #4
38      SEC
@Y:
A9 69    LDA #$69 ;hides 'ADC #$EA'
NOP
EA      NOP ;first loop only
DEY
B0 FC    BCS *-2
BNE @Y
28      PLP</pre>||Clobbers A
PLP</pre> || Clobbers Y
|-
|-
|<pre>PHP
|<pre>EA      NOP
PLP
08      PHP
JSR @rts14
A2 07    LDX #7
JSR @rts15</pre> || Requires @rts14, and @rts15
CA      DEX
D0 FD    BNE *-1
28      PLP</pre>||Clobbers X
|-
|-
|<pre>PHA
|<pre>EA      NOP
PHA
08      PHP
JSR @rts15
A0 06    LDY #6
JSR @rts15</pre> || Clobbers S; and requires @rts15
88      DEY
10 FD    BPL *-1
28      PLP</pre>||Clobbers Y
|-
|-
|<pre>PHA
!colspan="2"|9 bytes
SEC
LDA #6
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
|-
|<pre>PLA
|<pre>08      PHP
PLA
48      PHA
JSR @rts14
18      CLC
JSR @rts14</pre> || Clobbers A, S, and Z&amp;N; and requires @rts14
A9 0A    LDA #$0A ;hides 'ASL A'
90 FD    BCC *-1
68      PLA
28      PLP</pre>||No requirements
|-
|-
!colspan="2"|9 bytes
|}
 
 
=== 46 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|-
|<pre>JSR @rts12
|<pre>A2 08    LDX #8
JSR @rts12
CA      DEX
JSR @rts12</pre> || Requires @rts12
10 FD    BPL *-1</pre>||Clobbers X, and Z&N
|-
|-
|<pre>NOP
|<pre>A0 09    LDY #9
NOP
88      DEY
NOP
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
JSR @rts15
JSR @rts15</pre> || Requires @rts15
|-
|-
|<pre>LDA $00
!colspan="2"|6 bytes
SEC
LDA #6
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|-
|<pre>PLA
|<pre>48      PHA
PLA
A9 4A    LDA #$4A ;hides 'LSR A'
PLA
D0 FD    BNE *-1
PLA
68      PLA</pre>||Clobbers Z&N, and C
PLA
PLA
PLA
PLA
PLA</pre> || Clobbers A, S, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>08      PHP
PHA
A9 4A    LDA #$4A ;hides 'LSR A'
PHA
D0 FD    BNE *-1
JSR @rts14
28      PLP</pre>||Clobbers A
JSR @rts14</pre> || Clobbers S; and requires @rts14
|-
|-
!colspan="2"|10 bytes
!colspan="2"|9 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP
NOP
A6 A6    LDX $A6
NOP
A2 07    LDX #7
NOP
CA      DEX
JSR @rts14
D0 FD    BNE *-1
JSR @rts14</pre> || Requires @rts14
28      PLP</pre>||Clobbers X
|-
|-
!colspan="2"|11 bytes
|<pre>08      PHP
A4 A4    LDY $A4
A0 06    LDY #6
88      DEY
10 FD    BPL *-1
28      PLP</pre>||Clobbers Y
|-
|-
|<pre>TYA
!colspan="2"|10 bytes
PHA
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>48      PHA
PHA
98      TYA
PHA
A0 88    LDY #136 ;hides 'DEY'
PHP
88  ... DEY      × 2
PLP
30 FB    BMI *-3
PHP
A8      TAY
PLP
68      PLA</pre>||Clobbers Z&N
PHP
PLP
PHP
PLP</pre> || Clobbers S
|-
|-
!colspan="2"|12 bytes
!colspan="2"|11 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP
NOP
48      PHA
NOP
A9 2A    LDA #$2A ;hides 'ROL A'
NOP
EA  ... NOP     × 3
PHP
10 FA    BPL *-4
PLP
68      PLA
PHP
28      PLP</pre>||No requirements
PLP
PHP
PLP
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 37 cycles ===
=== 47 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|6 bytes
!colspan="2"|8 bytes
|-
|-
|<pre>PHA
|<pre>98      TYA
LDY #136
A0 06    LDY #6
@Y = * - 1
EA      NOP
; ^ Hides DEY
88      DEY
DEY
D0 FC    BNE *-2
BMI @Y</pre> || Clobbers Y, S, and Z&amp;N
A8      TAY</pre>||Clobbers A, and Z&N
|-
|-
|<pre>LDX #4
|<pre>EA  ... NOP      × 3
@X:
A2 08    LDX #8
PLA
CA      DEX
DEX
D0 FD    BNE *-1</pre>||Clobbers X, and Z&N
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
|<pre>08      PHP
|-
A2 05    LDX #5 ;hides 'ORA zp'
|<pre>LDX #3
EA      NOP
@X:
CA      DEX
PHP
D0 FB    BNE *-3
PLP
28      PLP</pre>||Clobbers A, and X
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #3
@Y:
PHP
PLP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|-
|<pre>PHP
|<pre>EA  ... NOP      × 3
PLP
A0 08    LDY #8
JSR @rts15
88      DEY
JSR @rts15</pre> || Requires @rts15
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
|-
|-
|<pre>PLA
|<pre>08      PHP
SEC
A0 05    LDY #5 ;hides 'ORA zp'
LDA #6
EA      NOP
@A:
88      DEY
SBC #1
D0 FB    BNE *-3
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
28      PLP</pre>||Clobbers A, and Y
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
|-
|<pre>TYA
|<pre>48      PHA
PHA
98      TYA
LDY #5
A0 06    LDY #6
@Y:
88      DEY
DEY
10 FD    BPL *-1
BNE @Y
A8      TAY
PLA
68      PLA</pre>||Clobbers Z&N
TAY</pre> || Clobbers A, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>08      PHP
NOP
98      TYA
PHP
A0 06    LDY #6
LDX #5
88      DEY
@X:
10 FD    BPL *-1
DEX
A8      TAY
BNE @X
28      PLP</pre>||Clobbers A
PLP</pre> || Clobbers X
|-
|-
|<pre>NOP
|<pre>EA  ... NOP     × 2
NOP
08      PHP
PHP
A2 07    LDX #7
LDY #5
CA      DEX
@Y:
D0 FD    BNE *-1
DEY
28      PLP</pre>||Clobbers X
BNE @Y
PLP</pre> || Clobbers Y
|-
|-
|<pre>NOP
|<pre>EA  ... NOP     × 2
PHP
08      PHP
PLP
A0 06    LDY #6
JSR @rts14
88      DEY
JSR @rts14</pre> || Requires @rts14
10 FD    BPL *-1
28      PLP</pre>||Clobbers Y
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP
PHP
48      PHA
SEC
18  ... CLC      × 2
LDA #5
A9 0A    LDA #$0A ;hides 'ASL A'
@A:
90 FD    BCC *-1
SBC #1
68      PLA
BNE @A
28      PLP</pre>||No requirements
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #5
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
|<pre>PHA
PHA
PHP
PLP
JSR @rts12
JSR @rts12</pre> || Clobbers S; and requires @rts12
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 38 cycles ===
=== 48 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>NOP
|<pre>EA      NOP
LDY #7
A2 08    LDX #8
@Y:
CA      DEX
DEY
10 FD    BPL *-1</pre>||Clobbers X, and Z&N
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|-
|<pre>NOP
|<pre>EA      NOP
LDX #7
A0 09    LDY #9
@X:
88      DEY
DEX
D0 FD    BNE *-1</pre>||Clobbers Y, and Z&N
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>PHP
|<pre>48      PHA
LDY #6
38      SEC
@Y:
A9 4A    LDA #$4A ;hides 'LSR A'
DEY
D0 FD    BNE *-1
BNE @Y
68      PLA</pre>||Clobbers Z&N, and C
PLP</pre> || Clobbers Y
|-
|-
|<pre>PHP
|<pre>08      PHP
LDX #6
38      SEC
@X:
A9 4A    LDA #$4A ;hides 'LSR A'
DEX
D0 FD    BNE *-1
BNE @X
28      PLP</pre>||Clobbers A
PLP</pre> || Clobbers X
|-
|-
|<pre>SEC
|<pre>08      PHP
LDA #7
A2 08    LDX #8
@A:
CA      DEX
SBC #1
D0 FD    BNE *-1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
28      PLP</pre>||Clobbers X
|-
|-
!colspan="2"|8 bytes
|<pre>08      PHP
|-
A0 08    LDY #8
|<pre>PLA
88      DEY
PLA
D0 FD    BNE *-1
JSR @rts15
28      PLP</pre>||Clobbers Y
JSR @rts15</pre> || Clobbers A, S, and Z&amp;N; and requires @rts15
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
|-
|<pre>JSR @rts12
|<pre>08      PHP
JSR @rts12
48      PHA
JSR @rts14</pre> || Requires @rts12, and @rts14
A9 0A    LDA #$0A ;hides 'ASL A'
18      CLC
10 FC    BPL *-2
68      PLA
28      PLP</pre>||No requirements
|-
|-
|<pre>NOP
|}
PHP
 
PLP
 
JSR @rts14
=== 49 cycles ===
JSR @rts15</pre> || Requires @rts14, and @rts15
{| class="wikitable testtable"
!colspan="2"|4 bytes
|-
|-
|<pre>NOP
|<pre>A0 88    LDY #136 ;hides 'DEY'
PHA
30 FD    BMI *-1</pre>||Clobbers Y, and Z&N
PHA
JSR @rts15
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
|-
|<pre>PHA
!colspan="2"|7 bytes
PHP
PLP
JSR @rts14
JSR @rts14</pre> || Clobbers S; and requires @rts14
|-
|-
!colspan="2"|10 bytes
|<pre>18      CLC
A9 2A    LDA #$2A ;hides 'ROL A'
08      PHP
28      PLP
90 FB    BCC *-3</pre>||Clobbers A, Z&N, and C
|-
|-
|<pre>NOP
|<pre>A6 A6    LDX $A6
JSR @rts12
A2 08    LDX #8
JSR @rts12
CA      DEX
JSR @rts12</pre> || Requires @rts12
10 FD    BPL *-1</pre>||Clobbers X, and Z&N
|-
|-
|<pre>NOP
!colspan="2"|8 bytes
NOP
NOP
NOP
JSR @rts15
JSR @rts15</pre> || Requires @rts15
|-
|-
|<pre>PHP
|<pre>C5 C5    CMP $C5
SEC
48      PHA
LDA #4
A9 4A    LDA #$4A ;hides 'LSR A'
@A:
D0 FD    BNE *-1
NOP
68      PLA</pre>||Clobbers Z&N, and C
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|-
|<pre>PHA
|<pre>08      PHP
SEC
A5 A5    LDA $A5
LDA #4
A9 4A    LDA #$4A ;hides 'LSR A'
@A:
D0 FD    BNE *-1
NOP
28      PLP</pre>||Clobbers A
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
|-
|<pre>PHP
!colspan="2"|10 bytes
BIT $00
PLP
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP</pre> || Clobbers S
|-
|-
!colspan="2"|12 bytes
|<pre>08      PHP
|-
48      PHA
|<pre>PHP
A9 2A    LDA #$2A ;hides 'ROL A'
PLP
08      PHP
PHP
28      PLP
PLP
10 FB    BPL *-3
PHP
68      PLA
PLP
28      PLP</pre>||No requirements
PHP
PLP
PHP
BIT $00
PLP</pre> || Clobbers nothing, requires nothing
|-
|-
|}
|}




=== 39 cycles ===
=== 50 cycles ===
{| class="wikitable testtable"
{| class="wikitable testtable"
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
|<pre>PHA
|<pre>A9 E9    LDA #$E9 ;hides 'SBC #$2A'
LDX #7
2A      ROL A ;first loop only
@X:
EA      NOP
DEX
B0 FB    BCS *-3</pre>||Clobbers A, Z&N, C, and V
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>A2 07    LDX #7
EA      NOP
CA      DEX
D0 FC    BNE *-2</pre>||Clobbers X, and Z&N
|-
|-
|<pre>PHA
|<pre>A0 06    LDY #6
LDY #7
EA      NOP
@Y:
88      DEY
DEY
10 FC    BPL *-2</pre>||Clobbers Y, and Z&N
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
|<pre>LDA $00
|<pre>98      TYA
LDY #7
A0 09    LDY #9
@Y:
88      DEY
DEY
D0 FD    BNE *-1
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
A8      TAY</pre>||Clobbers A, and Z&N
|-
|<pre>LDA $00
LDX #7
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDX #7
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>BIT $00
LDY #7
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDY #7
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDX #7
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDX #7
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDY #7
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
|-
|<pre>JMP *+3
|<pre>48      PHA
LDY #7
38  ... SEC      × 2
@Y:
A9 4A    LDA #$4A ;hides 'LSR A'
DEY
D0 FD    BNE *-1
BNE @Y</pre> || Clobbers Y, and Z&amp;N
68      PLA</pre>||Clobbers Z&N, and C
|-
|-
|<pre>JMP *+3
|<pre>08      PHP
LDX #7
38  ... SEC      × 2
@X:
A9 4A    LDA #$4A ;hides 'LSR A'
DEX
D0 FD    BNE *-1
BNE @X</pre> || Clobbers X, and Z&amp;N
28      PLP</pre>||Clobbers A
|-
|-
|<pre>PHP
|<pre>08      PHP
LDY #5
A2 05    LDX #5
@Y = * - 1
EA      NOP
; ^ Hides ORA zp
CA      DEX
DEY ;first round only
10 FC    BPL *-2
DEY
28      PLP</pre>||Clobbers X
BNE @Y
PLP</pre> || Clobbers A, and Y
|-
|-
|<pre>PHP
|<pre>08      PHP
LDX #5
A0 06    LDY #6
@X = * - 1
EA      NOP
; ^ Hides ORA zp
88      DEY
DEX ;first round only
D0 FC    BNE *-2
DEX
28      PLP</pre>||Clobbers Y
BNE @X
PLP</pre> || Clobbers A, and X
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
|-
|<pre>NOP
|<pre>08      PHP
PHP
48      PHA
PLP
A9 E9    LDA #$E9 ;hides 'SBC #$2A'
JSR @rts15
2A      ROL A ;first loop only
JSR @rts15</pre> || Requires @rts15
B0 FC    BCS *-2
68      PLA
28      PLP</pre>||No requirements
|-
|-
|<pre>SEC
|}
LDA #3
 
@A:
 
PHP
== Sanity checks ==
PLP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHP
LDY #4
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #4
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PLA
PLA
JSR @rts14
JSR @rts14</pre> || Clobbers A, S, and Z&amp;N; and requires @rts14
|-
|<pre>PHP
LDY #250
@Y = * - 1
; ^ Hides !NOP
NOP
INY
INY
BNE @Y
PLP</pre> || Clobbers Y; and requires support for unofficial opcodes
|-
|<pre>PHP
LDX #250
@X = * - 1
; ^ Hides !NOP
NOP
INX
INX
BNE @X
PLP</pre> || Clobbers X; and requires support for unofficial opcodes
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
LDY #5
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
NOP
NOP
PHP
LDX #5
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
PLP
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
|<pre>PHA
JSR @rts12
JSR @rts12
JSR @rts12</pre> || Clobbers S; and requires @rts12
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #4
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #5
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>STA @zptemp
JSR @rts12
JSR @rts12
JSR @rts12</pre> || Requires @zptemp, and @rts12
|-
|<pre>NOP $00
JSR @rts12
JSR @rts12
JSR @rts12</pre> || Requires @rts12, and support for unofficial opcodes
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|}


It is possible to verify on compile time that no page wrap occurs,
by replacing all branches with these macros:
<pre>.macro branch_check opc, dest
    opc dest
    .assert >* = >(dest), warning, "branch_check: failed, crosses page"
.endmacro
.macro bccnw dest
        branch_check bcc, dest
.endmacro
.macro bcsnw dest
        branch_check bcs, dest
.endmacro
.macro beqnw dest
        branch_check beq, dest
.endmacro
.macro bnenw dest
        branch_check bne, dest
.endmacro
.macro bminw dest
        branch_check bmi, dest
.endmacro
.macro bplnw dest
        branch_check bpl, dest
.endmacro
.macro bvcnw dest
        branch_check bvc, dest
.endmacro
.macro bvsnw dest
        branch_check bvs, dest
.endmacro</pre>


=== 40 cycles ===
== See also ==
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #5
@Y = * - 1
; ^ Hides ORA zp
NOP
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #7
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #7
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDX #6
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHP
LDY #6
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
SEC
LDA #7
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #6
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
|<pre>JSR @rts12
JSR @rts14
JSR @rts14</pre> || Requires @rts12, and @rts14
|-
|<pre>PHA
PHP
PLP
JSR @rts15
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
BIT $00
PLP
JSR @rts15
JSR @rts15</pre> || Requires @rts15
|-
|<pre>ROL $00,X
ROR $00,X
JSR @rts14
JSR @rts14</pre> || Clobbers Z&amp;N; and requires @rts14
|-
|<pre>NOP
PHA
PHP
PLP
JSR @rts14
JSR @rts14</pre> || Clobbers S; and requires @rts14
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
NOP
JSR @rts12
JSR @rts12
JSR @rts12</pre> || Requires @rts12
|-
|<pre>NOP
PHP
BIT $00
PLP
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PLP
PHP
PLP
PHP
PLP
PHP
ROL $00,X
ROR $00,X
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 41 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #8
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #8
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
BMI @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDX #6
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #7
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDX #6
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>LDA $00
SEC
LDA #7
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>JSR @rts12
JSR @rts14
JSR @rts15</pre> || Requires @rts12, @rts14, and @rts15
|-
|<pre>PHA
PLA
PLA
JSR @rts15
JSR @rts15</pre> || Clobbers A, S, and Z&amp;N; and requires @rts15
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
NOP
PHP
PLP
JSR @rts15
JSR @rts15</pre> || Requires @rts15
|-
|<pre>PLA
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
PLP
JSR @rts14
JSR @rts14</pre> || Clobbers S; and requires @rts14
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
NOP
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
PLP
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
|<pre>NOP
PHA
JSR @rts12
JSR @rts12
JSR @rts12</pre> || Clobbers S; and requires @rts12
|-
|<pre>PHA
PHP
SEC
LDA #4
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #4
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PLP
PHP
BIT $00
PLP
JSR @rts12
JSR @rts12</pre> || Requires @rts12
|-
|<pre>NOP
PHA
TYA
PHA
LDY #4
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #5
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
PHA
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 42 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>NOP
LDY #5
@Y = * - 1
; ^ Hides ORA zp
NOP
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>NOP
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>PHA
PHA
LDX #7
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
PHA
LDY #7
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
DEY
BMI @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #248
@X = * - 1
; ^ Hides SED
INX
INX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PLA
SEC
LDA #7
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>JSR @rts12
JSR @rts15
JSR @rts15</pre> || Requires @rts12, and @rts15
|-
|<pre>TYA
PHA
LDY #6
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>JSR @rts14
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
!colspan="2"|10 bytes
|-
|<pre>ROL $00,X
ROR $00,X
JSR @rts15
JSR @rts15</pre> || Clobbers Z&amp;N; and requires @rts15
|-
|<pre>NOP
PHP
SEC
LDA #6
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
|<pre>NOP
PHA
PHP
PLP
JSR @rts15
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #5
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 43 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #6
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #6
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #7
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #7
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #8
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>JSR @rts14
JSR @rts14
JSR @rts15</pre> || Requires @rts14, and @rts15
|-
!colspan="2"|10 bytes
|-
|<pre>TXA
PHA
LDX #5
@X = * - 1
; ^ Hides ORA zp
DEX ;first round only
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
PLP
JSR @rts15
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
|<pre>PHA
PHP
SEC
LDA #6
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
|<pre>PHA
JSR @rts12
JSR @rts14
JSR @rts14</pre> || Clobbers S; and requires @rts12, and @rts14
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PLP
JSR @rts12
JSR @rts12
JSR @rts12</pre> || Requires @rts12
|-
|<pre>NOP
NOP
NOP
PHP
PLP
JSR @rts15
JSR @rts15</pre> || Requires @rts15
|-
|<pre>PHP
LDA $00
SEC
LDA #6
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
|<pre>NOP
PHA
PHA
PHP
PLP
JSR @rts14
JSR @rts14</pre> || Clobbers S; and requires @rts14
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
NOP
NOP
NOP
PHP
PLP
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
!colspan="2"|13 bytes
|-
|<pre>PHA
TYA
PHA
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
PHA
PHA
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 44 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
DEY
BMI @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
DEX
BNE @X</pre> || Clobbers A, X, Z&amp;N, and C
|-
|<pre>PHA
LDX #8
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDX #8
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDX #8
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDX #8
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDX #8
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #8
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>PHA
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
BMI @Y
PLP</pre> || Clobbers Y, and S
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDY #3
@Y:
PHP
PLP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #3
@X:
PHP
PLP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>JSR @rts14
JSR @rts15
JSR @rts15</pre> || Requires @rts14, and @rts15
|-
|<pre>NOP
PLA
SEC
LDA #7
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
PLP
PHP
PLP
JSR @rts15
JSR @rts15</pre> || Requires @rts15
|-
|<pre>NOP
TYA
PHA
LDY #6
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
JSR @rts14
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #6
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #5
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 45 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDY #8
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
|<pre>PLA
LDX #8
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDY #6
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #6
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #7
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #6
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>JSR @rts15
JSR @rts15
JSR @rts15</pre> || Requires @rts15
|-
|<pre>PHP
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
JSR @rts14
JSR @rts14
JSR @rts14</pre> || Clobbers S; and requires @rts14
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PLP
JSR @rts12
JSR @rts12
JSR @rts14</pre> || Requires @rts12, and @rts14
|-
|<pre>BIT $00
JSR @rts14
JSR @rts14
JSR @rts14</pre> || Clobbers Z&amp;N, and V; and requires @rts14
|-
|<pre>STA @zptemp
JSR @rts14
JSR @rts14
JSR @rts14</pre> || Requires @zptemp, and @rts14
|-
|<pre>NOP $00
JSR @rts14
JSR @rts14
JSR @rts14</pre> || Requires @rts14, and support for unofficial opcodes
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #4
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 46 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #9
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #9
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #7
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #8
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDX #7
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
BIT $00
LDY #7
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>LDA $00
SEC
LDA #8
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
DEY
BMI @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
JSR @rts14
JSR @rts15
JSR @rts15</pre> || Requires @rts14, and @rts15
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
PHP
PLP
PHP
PLP
JSR @rts15
JSR @rts15</pre> || Requires @rts15
|-
|<pre>PHP
SEC
LDA #3
@A:
PHP
PLP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #3
@A:
PHP
PLP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
|<pre>NOP
NOP
JSR @rts14
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHP
PLP
JSR @rts12
JSR @rts12
JSR @rts12</pre> || Clobbers S; and requires @rts12
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #5
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 47 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>PHA
PHA
LDY #8
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
PHA
LDX #8
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
LDX #6
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
LDY #6
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PHP
LDY #5
@Y = * - 1
; ^ Hides ORA zp
NOP
DEY
BNE @Y
PLP</pre> || Clobbers A, and Y
|-
|<pre>PHP
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X
PLP</pre> || Clobbers A, and X
|-
|<pre>PLA
SEC
LDA #8
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #7
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #7
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Requires @rts15
|-
|<pre>NOP
PHP
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 48 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #9
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #9
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #8
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #8
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #9
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
|<pre>PHA
PHP
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
|<pre>BIT $00
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Clobbers Z&amp;N, and V; and requires @rts15
|-
|<pre>NOP
NOP
JSR @rts14
JSR @rts15
JSR @rts15</pre> || Requires @rts14, and @rts15
|-
|<pre>STA @zptemp
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Requires @zptemp, and @rts15
|-
|<pre>PHA
PHA
JSR @rts14
JSR @rts14
JSR @rts14</pre> || Clobbers S; and requires @rts14
|-
|<pre>NOP $00
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Requires @rts15, and support for unofficial opcodes
|-
!colspan="2"|12 bytes
|-
|<pre>JSR @rts12
JSR @rts12
JSR @rts12
JSR @rts12</pre> || Requires @rts12
|-
|<pre>JMP *+3
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Requires @rts15
|-
|<pre>NOP
NOP
NOP
JSR @rts14
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHA
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHP
PHA
SEC
LDA #4
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #5
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 49 cycles ===
{| class="wikitable testtable"
!colspan="2"|4 bytes
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
|<pre>LDX #6
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDX #4
@X:
PHP
PLP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PHP
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X
PLP</pre> || Clobbers A, and X
|-
|<pre>NOP
PHP
LDY #5
@Y = * - 1
; ^ Hides ORA zp
NOP
DEY
BNE @Y
PLP</pre> || Clobbers A, and Y
|-
|<pre>PHA
PHA
PHP
LDX #7
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PHA
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>NOP
PLA
SEC
LDA #8
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #7
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
NOP
NOP
PHP
LDX #7
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
NOP
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Requires @rts15
|-
|<pre>PHA
TYA
PHA
LDY #6
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHP
PLP
JSR @rts14
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 50 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #7
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #7
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #6
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #6
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #9
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #8
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PLP
JSR @rts14
JSR @rts14
JSR @rts15</pre> || Requires @rts14, and @rts15
|-
|<pre>NOP
PHA
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TXA
PHA
LDX #5
@X = * - 1
; ^ Hides ORA zp
DEX ;first round only
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>JSR @rts12
JSR @rts12
JSR @rts12
JSR @rts14</pre> || Requires @rts12, and @rts14
|-
|<pre>NOP
STA @zptemp
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Requires @zptemp, and @rts15
|-
|<pre>PHA
PHP
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
|<pre>NOP
NOP $00
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Requires @rts15, and support for unofficial opcodes
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 51 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #10
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #10
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
DEY
BMI @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
DEX
BNE @X
PLP</pre> || Clobbers A, and X
|-
|<pre>PHA
PHP
LDX #8
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>SEC
LDA #6
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDX #8
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #4
@A:
PHP
PLP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TXA
PHA
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PLP
JSR @rts14
JSR @rts15
JSR @rts15</pre> || Requires @rts14, and @rts15
|-
|<pre>PHA
PHA
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
|<pre>PHA
PHA
PHP
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
NOP
NOP
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Requires @rts15
|-
|<pre>NOP
PHA
TYA
PHA
LDY #6
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHP
PLP
JSR @rts14
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 52 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
|<pre>LDA $00
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>BIT $00
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDX #7
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #7
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #7
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #8
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
PHP
LDY #6
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #6
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 53 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>PLA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #10
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #10
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #9
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #9
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #10
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #8
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #8
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
DEY
BMI @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
PHP
PLP
JSR @rts14
JSR @rts15
JSR @rts15</pre> || Requires @rts14, and @rts15
|-
|<pre>NOP
PHA
PHA
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Clobbers S; and requires @rts15
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #3
@A:
PHP
PLP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 54 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #10
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #10
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
NOP
DEY
BMI @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDA $00
LDX #10
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDX #10
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDX #10
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDX #10
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #10
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHA
PHP
LDX #8
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PHA
PHP
LDY #8
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #6
@Y:
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #6
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #6
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #7
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
PHP
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 55 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #248
@Y = * - 1
; ^ Hides SED
INY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and D
|-
|<pre>LDX #248
@X = * - 1
; ^ Hides SED
INX
BNE @X</pre> || Clobbers X, Z&amp;N, and D
|-
!colspan="2"|6 bytes
|-
|<pre>PHA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>LDX #6
@X:
PLA
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #6
@Y:
NOP
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #6
@X:
NOP
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #9
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #9
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #10
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #9
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #9
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>JSR @rts12
JSR @rts14
JSR @rts14
JSR @rts15</pre> || Requires @rts12, @rts14, and @rts15
|-
|<pre>PHA
PHP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 56 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #11
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #11
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
|<pre>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDX #9
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #10
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #4
@X:
PHP
PLP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>LDA $00
SEC
LDA #10
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #8
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
TYA
PHA
LDY #6
@Y:
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #8
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #7
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>JSR @rts14
JSR @rts14
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 57 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #8
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #8
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>CLC
LDA #248
@A = * - 1
; ^ Hides SED
ADC #1
BNE @A</pre> || Clobbers A, Z&amp;N, C, and D
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #7
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #7
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PLA
SEC
LDA #10
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #9
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #9
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #9
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 58 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #11
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #11
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #10
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #10
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #11
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #9
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #9
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #4
@A:
PHP
PLP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #4
@A:
PHP
PLP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TXA
PHA
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>JSR @rts14
JSR @rts14
JSR @rts15
JSR @rts15</pre> || Requires @rts14, and @rts15
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
JSR @rts14
JSR @rts14
JSR @rts14
JSR @rts14</pre> || Requires @rts14
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 59 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #11
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #11
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDY #8
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #8
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>PHA
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLP</pre> || Clobbers Y, and S
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
BIT $00
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #8
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PHP
LDX #7
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #8
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 60 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #11
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #11
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #11
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #11
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
PHP
LDY #10
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #10
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #10
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>JSR @rts15
JSR @rts15
JSR @rts15
JSR @rts15</pre> || Requires @rts15
|-
|<pre>PHA
PHP
PHA
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 61 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #12
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #12
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #10
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #10
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #11
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDX #10
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
NOP
DEY
BMI @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #7
@Y:
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
PHP
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #6
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 62 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #136
@X = * - 1
; ^ Hides DEY
DEX
BMI @X</pre> || Clobbers X, Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #248
@X = * - 1
; ^ Hides SED
INX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #248
@Y = * - 1
; ^ Hides SED
INY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|8 bytes
|-
|<pre>PLA
SEC
LDA #11
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #10
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #10
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #9
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 63 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #12
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #12
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #11
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #11
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #12
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHA
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|10 bytes
|-
|<pre>LDA $00
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHP
SEC
LDA #10
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #10
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #6
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 64 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #9
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #9
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #8
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #8
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
CLC
LDA #248
@A = * - 1
; ^ Hides SED
ADC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
CLC
LDA #248
@A = * - 1
; ^ Hides SED
ADC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, C, and D
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #9
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #9
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 65 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #8
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>LDX #8
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #12
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #12
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #11
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #11
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #12
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #11
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #9
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #4
@A:
PHP
PLP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 66 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #13
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #13
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #9
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHP
LDY #11
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #11
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PHP
LDY #8
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #8
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>TYA
PHA
LDY #248
@Y = * - 1
; ^ Hides SED
INY
BNE @Y
PLA
TAY</pre> || Clobbers A, Z&amp;N, and D
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 67 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>LDY #6
@Y:
PHA
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>LDX #6
@X:
PHA
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>LDY #6
@Y:
NOP
NOP
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #6
@X:
NOP
NOP
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>SEC
LDA #8
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #11
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #11
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #11
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
PHP
SEC
LDA #11
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 68 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #13
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #13
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #12
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #12
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #13
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TXA
PHA
LDX #8
@X:
NOP
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHP
SEC
LDA #11
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
PHP
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #7
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 69 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X</pre> || Clobbers A, X, Z&amp;N, and C
|-
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #13
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDX #13
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>PHP
LDX #136
@X = * - 1
; ^ Hides DEY
DEX
BMI @X
PLP</pre> || Clobbers X, and Y
|-
|<pre>BIT $00
LDX #13
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDX #13
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDX #13
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #13
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
PLP
PHP
LDX #248
@X = * - 1
; ^ Hides SED
INX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
PLP
PHP
LDY #248
@Y = * - 1
; ^ Hides SED
INY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #6
@A:
PHA
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #11
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #10
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #11
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 70 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #13
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #13
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #13
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #13
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDX #12
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHP
LDY #12
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
SEC
LDA #13
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #12
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #12
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
PHA
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY
PLA</pre> || Clobbers S, and Z&amp;N
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
LDA $00
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHP
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 71 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #14
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #14
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #9
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #9
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHA
SEC
LDA #13
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>LDA $00
SEC
LDA #13
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #11
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
CLC
LDA #248
@A = * - 1
; ^ Hides SED
ADC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 72 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X</pre> || Clobbers A, X, S, Z&amp;N, and C
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDA $00
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X</pre> || Clobbers A, X, Z&amp;N, and C
|-
|<pre>BIT $00
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>PHA
PHA
LDX #13
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>NOP $00
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
NOP
LDX #13
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
LDY #13
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PHA
PHP
LDX #136
@X = * - 1
; ^ Hides DEY
DEX
BMI @X
PLP</pre> || Clobbers X, Y, and S
|-
|<pre>PLA
SEC
LDA #13
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #12
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHP
LDX #8
@X:
BIT $00
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #8
@Y:
BIT $00
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #12
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #12
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 73 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #14
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #14
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #13
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #13
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #14
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #248
@Y = * - 1
; ^ Hides SED
INY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N, and D
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 74 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #14
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #14
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDY #14
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDA $00
LDX #14
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDY #14
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>BIT $00
LDX #14
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDY #14
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDX #14
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDY #14
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDX #14
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #14
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>JMP *+3
LDY #14
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHA
PHP
LDY #9
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #9
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>NOP
PLA
SEC
LDA #13
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #12
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHP
LDY #6
@Y:
NOP
NOP
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #6
@X:
NOP
NOP
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #11
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #12
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 75 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #14
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #14
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #14
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #14
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDX #13
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHP
LDY #13
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
SEC
LDA #14
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TXA
PHA
LDX #8
@X:
NOP
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHP
PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 76 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #15
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #15
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X
PLP</pre> || Clobbers A, and X
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDX #13
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #14
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDX #13
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>LDA $00
SEC
LDA #14
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #12
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>TXA
PHA
LDX #8
@X:
LDA $00
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHP
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #11
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHP
SEC
LDA #6
@A:
NOP
NOP
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 77 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>PHA
PHA
LDY #14
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
PHA
LDX #14
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
NOP
LDX #14
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
LDY #14
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #14
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDY #13
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
NOP
PHP
LDX #13
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #12
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 78 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #11
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #11
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #14
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #14
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #15
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PLP
PHP
PHA
CLC
LDA #248
@A = * - 1
; ^ Hides SED
ADC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 79 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
PHA
BMI @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
LDA $00
BMI @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
BIT $00
BMI @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
STA @zptemp
BMI @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>PHA
LDX #15
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
NOP $00
BMI @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
JMP *+3
BMI @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDA $00
LDX #15
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDX #15
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDX #15
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDX #15
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #15
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>PHA
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X
PLP</pre> || Clobbers A, X, and S
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDA $00
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X
PLP</pre> || Clobbers A, and X
|-
|<pre>PHA
PHA
PHP
LDX #13
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>NOP
PLA
SEC
LDA #14
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
LDX #13
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #12
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #12
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 80 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #136
@X = * - 1
; ^ Hides DEY
NOP
DEX
BMI @X</pre> || Clobbers X, Y, and Z&amp;N
|-
|<pre>PLA
LDX #15
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #15
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDY #11
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #11
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #14
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #14
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #11
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 81 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #16
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #16
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #14
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #14
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #15
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDY #14
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
BIT $00
LDX #14
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>LDA $00
SEC
LDA #15
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
NOP
TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #12
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #12
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 82 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
PHA
BMI @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>LDX #9
@X:
PLA
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDX #9
@X:
NOP
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #9
@Y:
NOP
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PLA
SEC
LDA #15
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #14
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #14
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 83 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #16
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #16
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #15
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #15
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #16
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>PHA
TXA
PHA
LDX #8
@X:
LDA $00
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHP
PHA
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>PHP
PHA
SEC
LDA #6
@A:
NOP
NOP
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 84 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #16
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #16
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDX #16
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>LDA $00
LDY #16
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>BIT $00
LDY #16
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>BIT $00
LDX #16
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDX #16
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDY #16
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDX #16
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDY #16
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDY #16
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>JMP *+3
LDX #16
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>SEC
LDA #9
@A:
NOP
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHA
PHP
LDX #14
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PHA
PHP
LDY #14
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
LDY #14
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
NOP
NOP
PHP
LDX #14
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 85 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #12
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #12
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #11
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #11
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #16
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #15
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #15
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 86 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #17
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #17
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
BIT $00
BMI @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHA
PHP
LDX #15
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #16
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDX #15
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>LDA $00
SEC
LDA #16
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
NOP
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 87 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #248
@Y = * - 1
; ^ Hides SED
PLA
INY
BNE @Y</pre> || Clobbers A, Y, S, Z&amp;N, and D
|-
|<pre>LDX #248
@X = * - 1
; ^ Hides SED
PLA
INX
BNE @X</pre> || Clobbers A, X, S, Z&amp;N, and D
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDY #12
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #12
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #136
@X = * - 1
; ^ Hides DEY
NOP
DEX
BMI @X
PLP</pre> || Clobbers X, and Y
|-
|<pre>SEC
LDA #12
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #15
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
PHP
LDX #11
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHP
LDY #11
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #11
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #11
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 88 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #17
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #17
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #16
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #16
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #17
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #15
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #15
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #15
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #15
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHA
TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 89 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
PLA
BMI @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
NOP
BMI @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #10
@X = * - 1
; ^ Hides ASL A
NOP
DEX
BNE @X</pre> || Clobbers A, X, Z&amp;N, and C
|-
|<pre>LDX #11
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDX #11
@X:
LDA $00
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>LDX #11
@X:
BIT $00
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>LDX #11
@X:
STA @zptemp
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>LDX #11
@X:
NOP $00
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>LDX #11
@X:
JMP *+3
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #9
@X:
NOP
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #9
@Y:
NOP
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TXA
PHA
LDX #11
@X:
NOP
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
PHP
SEC
LDA #11
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 90 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #17
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #17
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #17
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #17
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #16
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #16
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #17
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #16
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 91 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #18
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #18
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDX #16
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PHP
LDY #16
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>SEC
LDA #11
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDY #16
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
BIT $00
LDX #16
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>LDA $00
SEC
LDA #17
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #15
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #9
@A:
NOP
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #9
@A:
NOP
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 92 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #13
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #13
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #12
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #12
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PLA
SEC
LDA #17
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #16
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #16
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #15
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 93 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #18
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #18
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #17
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #17
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #18
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #16
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #16
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHA
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 94 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #18
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #18
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDY #13
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #13
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #13
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PHP
LDY #12
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #12
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #15
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #11
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 95 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #18
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #18
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #18
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #18
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #17
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #17
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #18
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #17
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #17
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #15
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #15
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 96 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #19
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #19
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
NOP
BMI @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #10
@X = * - 1
; ^ Hides ASL A
NOP
DEX
BNE @X
PLP</pre> || Clobbers A, and X
|-
|<pre>PHA
PHP
LDX #17
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #18
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #11
@X:
BIT $00
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #13
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TXA
PHA
LDX #12
@X:
NOP
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
PHP
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TXA
PHA
LDX #11
@X:
NOP
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #11
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 97 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #12
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>LDX #12
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #8
@Y:
PHP
PLP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #8
@X:
PHP
PLP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PLA
SEC
LDA #18
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #17
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #17
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #17
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #17
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #17
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 98 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #19
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #19
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #18
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #18
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #19
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #17
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #17
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #11
@A:
BIT $00
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #17
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #9
@A:
NOP
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 99 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #14
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #14
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #13
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #13
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #12
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>SEC
LDA #8
@A:
PHP
PLP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #17
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #16
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #17
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 100 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #11
@Y:
PLA
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
|<pre>LDX #11
@X:
PLA
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #11
@Y:
NOP
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #11
@X:
NOP
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #18
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #18
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #19
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #18
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #18
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 101 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #20
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #20
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #14
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHP
LDY #18
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #18
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PHP
LDY #13
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #13
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #13
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #13
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 102 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>PHA
LDY #14
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #14
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
LDX #11
@X:
NOP
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #11
@Y:
NOP
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #19
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #18
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #18
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #18
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #18
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #18
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #17
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 103 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #20
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #20
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #19
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #19
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #20
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TXA
PHA
LDX #13
@X:
NOP
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHP
SEC
LDA #18
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #18
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
PHP
SEC
LDA #13
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #13
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TXA
PHA
LDX #12
@X:
NOP
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 104 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #20
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #20
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDY #20
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDA $00
LDX #20
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDY #20
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>BIT $00
LDX #20
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDY #20
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDX #20
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDY #20
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDX #20
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #20
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>JMP *+3
LDY #20
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #8
@X:
PHP
PLP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #8
@Y:
PHP
PLP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PLA
SEC
LDA #19
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #18
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #17
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #18
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #17
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 105 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #13
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>LDY #13
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #20
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #20
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #19
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #19
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #20
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #19
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #19
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #17
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #11
@A:
BIT $00
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 106 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #21
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #21
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #14
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #14
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHA
SEC
LDA #20
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>LDA $00
SEC
LDA #20
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #18
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #8
@A:
PHP
PLP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #8
@A:
PHP
PLP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #17
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #17
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 107 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #24
@Y = * - 1
; ^ Hides CLC
DEY
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #24
@X = * - 1
; ^ Hides CLC
DEX
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #13
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #19
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHP
LDX #11
@X:
NOP
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #11
@Y:
NOP
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #19
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #19
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #18
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 108 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDY #21
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #21
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #20
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #20
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #21
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #14
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #14
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #13
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 109 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #21
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #21
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDX #9
@X:
PHP
PLP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #9
@Y:
PHP
PLP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>CLC
LDA #244
@A = * - 1
; ^ Hides !NOP zp,X
NOP
ADC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
!colspan="2"|9 bytes
|-
|<pre>PHA
PHP
LDY #14
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #14
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>NOP
SEC
LDA #13
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #19
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
PHP
LDY #11
@Y:
NOP
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #11
@X:
NOP
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #18
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #19
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #18
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 110 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDY #21
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
|<pre>PLA
LDX #21
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDX #21
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
LDY #21
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDX #20
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHP
LDY #20
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
SEC
LDA #21
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #20
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #20
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TXA
PHA
LDX #13
@X:
NOP
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHP
PHA
SEC
LDA #18
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #13
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 111 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #22
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #22
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDX #20
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PHP
LDY #20
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
SEC
LDA #21
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDY #20
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
BIT $00
LDX #20
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #9
@A:
PHP
PLP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #19
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>TYA
PHA
LDY #11
@Y:
NOP
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHP
SEC
LDA #14
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #14
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #18
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #19
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #18
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 112 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>PHA
PHA
LDX #21
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
PHA
LDY #21
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
NOP
LDY #21
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
LDX #21
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #21
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #20
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHP
LDX #13
@X:
BIT $00
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #13
@Y:
BIT $00
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #20
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #20
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #19
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 113 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #16
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #16
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #21
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #21
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #22
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #20
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #20
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #20
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #20
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #8
@A:
PHP
PLP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 114 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #22
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #22
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDX #22
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>LDA $00
LDY #22
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>BIT $00
LDY #22
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>BIT $00
LDX #22
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDX #22
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDY #22
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDX #22
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDY #22
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #24
@X = * - 1
; ^ Hides CLC
DEX
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #24
@Y = * - 1
; ^ Hides CLC
DEY
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PLA
SEC
LDA #21
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #20
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #19
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #20
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #19
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 115 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #22
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #22
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDY #16
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #16
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #21
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #21
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #16
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #21
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #21
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #14
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 116 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #23
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #23
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #21
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #21
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #22
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #9
@X:
PHP
PLP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #9
@Y:
PHP
PLP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>LDA $00
SEC
LDA #22
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #20
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
|<pre>PHP
CLC
LDA #244
@A = * - 1
; ^ Hides !NOP zp,X
NOP
ADC #1
BNE @A
PLP</pre> || Clobbers A; and requires support for unofficial opcodes
|-
|<pre>PHA
CLC
LDA #244
@A = * - 1
; ^ Hides !NOP zp,X
NOP
ADC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
!colspan="2"|11 bytes
|-
|<pre>TXA
PHA
LDX #13
@X:
LDA $00
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #20
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #20
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #19
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #20
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #19
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 117 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>LDX #13
@X = * - 1
; ^ Hides ORA abs
LDA $0
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>LDY #13
@Y = * - 1
; ^ Hides ORA abs
LDA $0
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>PHA
PHA
LDY #22
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
PHA
LDX #22
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
LDX #16
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
LDY #16
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #22
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TXA
PHA
LDX #21
@X:
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #21
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #21
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #21
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #21
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #20
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 118 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #23
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #23
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #22
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #22
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #23
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #24
@Y = * - 1
; ^ Hides CLC
DEY
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHP
SEC
LDA #21
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #21
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #9
@A:
PHP
PLP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #9
@A:
PHP
PLP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>PHA
TYA
PHA
LDY #11
@Y:
NOP
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHP
PHA
SEC
LDA #14
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #19
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 119 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
PHP
PLP
BMI @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PHA
LDX #23
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDX #23
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDX #23
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDX #23
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDX #23
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #23
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHA
PHA
PHP
LDY #21
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHA
PHP
LDX #21
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>NOP
PLA
SEC
LDA #22
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TXA
PHA
LDX #21
@X:
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
LDX #21
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
NOP
PHP
LDY #21
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #20
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #21
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #20
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 120 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #17
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #17
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #16
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #16
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #23
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #22
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #22
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #20
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #20
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 121 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #24
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #24
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #22
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #22
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #23
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDX #22
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
BIT $00
LDY #22
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>LDA $00
SEC
LDA #23
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TXA
PHA
LDX #21
@X:
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
NOP
TXA
PHA
LDX #21
@X:
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #21
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #21
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #20
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #21
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #20
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 122 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>NOP
LDX #17
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #17
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #17
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #22
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
PHP
LDY #16
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #16
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #16
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #16
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #21
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 123 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #24
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #24
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #23
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #23
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #24
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #22
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #22
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #22
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #22
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
CLC
LDA #244
@A = * - 1
; ^ Hides !NOP zp,X
NOP
ADC #1
BNE @A
PLA
PLP</pre> || Requires support for unofficial opcodes
|-
!colspan="2"|13 bytes
|-
|<pre>PHA
TXA
PHA
LDX #13
@X:
LDA $00
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #20
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #20
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 124 cycles ===
{| class="wikitable testtable"
!colspan="2"|4 bytes
|-
|<pre>LDX #232
@X = * - 1
; ^ Hides INX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #24
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDY #24
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>BIT $00
LDY #24
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDY #24
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDY #24
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDY #24
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #13
@X = * - 1
; ^ Hides ORA abs
LDA $0
DEX
BNE @X
PLP</pre> || Clobbers A, and X
|-
|<pre>PHP
LDY #13
@Y = * - 1
; ^ Hides ORA abs
LDA $0
DEY
BNE @Y
PLP</pre> || Clobbers A, and Y
|-
|<pre>NOP
SEC
LDA #17
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHA
PHP
LDY #22
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHA
PHP
LDX #22
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
!colspan="2"|10 bytes
|-
|<pre>TXA
PHA
LDX #16
@X:
NOP
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #16
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #16
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TXA
PHA
LDX #21
@X:
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
PHP
SEC
LDA #16
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #21
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 125 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #24
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #24
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #24
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #24
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #23
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #23
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #24
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #23
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #23
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #24
@Y = * - 1
; ^ Hides CLC
DEY
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHP
PHA
SEC
LDA #21
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #9
@A:
PHP
PLP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 126 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #25
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #25
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
PHP
PLP
BMI @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHA
PHP
LDX #23
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #24
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDX #23
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>LDA $00
SEC
LDA #24
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #22
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
TXA
PHA
LDX #16
@X:
NOP
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #22
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #22
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TXA
PHA
LDX #21
@X:
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #16
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #21
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 127 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>PHA
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
|<pre>LDY #18
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #18
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #17
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #17
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PLA
SEC
LDA #24
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #23
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #23
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #23
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #22
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 128 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>PLA
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #25
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #25
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #24
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #24
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #25
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #23
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #23
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #23
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #23
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHA
TXA
PHA
LDX #21
@X:
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #21
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #21
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 129 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #16
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>LDX #16
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDX #18
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #18
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #18
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PHP
LDY #17
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #17
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #17
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #17
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #22
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #16
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 130 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
PHA
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PLA
LDY #25
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #25
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #25
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDX #24
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHP
LDY #24
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
SEC
LDA #25
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #24
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #24
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #22
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #22
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 131 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #26
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #26
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
|<pre>PHP
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #24
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>SEC
LDA #16
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDY #24
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
SEC
LDA #18
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #17
@Y:
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
PHP
SEC
LDA #17
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #17
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TXA
PHA
LDX #16
@X:
NOP
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #16
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 132 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
PLA
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>TSX
PLA
TXS
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>PHA
LDX #16
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #16
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
NOP
LDX #25
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
LDY #25
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #25
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #24
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDY #24
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
NOP
PHP
LDX #24
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #24
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #24
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #23
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 133 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #26
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #26
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #25
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #25
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #26
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #24
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #24
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #24
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #24
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHA
TXA
PHA
LDX #16
@X:
NOP
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #22
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #16
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 134 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #19
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #19
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHA
PHP
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X
PLP</pre> || Clobbers X, and S
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #18
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #18
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PLA
SEC
LDA #25
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #24
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #23
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #24
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #23
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 135 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #26
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #26
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #26
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #26
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>TXA
PHA
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
PHP
LDY #25
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #25
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #25
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #25
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #23
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #23
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 136 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #27
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #27
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #19
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHP
LDY #25
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #25
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDY #16
@Y:
BIT $00
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #16
@X:
BIT $00
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #18
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #18
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #17
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 137 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #17
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>LDY #17
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDX #17
@X:
LDA $00
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>LDY #17
@Y:
LDA $00
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDX #17
@X:
BIT $00
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>LDY #17
@Y:
BIT $00
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>LDY #17
@Y:
STA @zptemp
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>LDX #17
@X:
STA @zptemp
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>LDY #17
@Y:
NOP $00
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>LDX #17
@X:
NOP $00
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>LDX #17
@X:
JMP *+3
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #17
@Y:
JMP *+3
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PLA
SEC
LDA #26
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #25
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDY #25
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
NOP
PHP
LDX #25
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #25
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #25
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #24
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 138 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #27
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #27
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #26
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #26
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #27
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHA
TXA
PHA
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X
PLA
TAX</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #18
@Y:
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHP
SEC
LDA #25
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #25
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #16
@A:
BIT $00
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #18
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #17
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #17
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 139 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #27
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #27
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
PHP
PLP
BMI @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>JSR @rts15
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @rts15
|-
|<pre>LDA $00
LDX #27
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDX #27
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDX #27
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDX #27
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #27
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>SEC
LDA #17
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
TSX
PLA
TXS
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X
PLP</pre> || Clobbers A, and X
|-
|<pre>SEC
LDA #17
@A:
BIT $00
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, C, and V
|-
|<pre>SEC
LDA #17
@A:
STA @zptemp
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C; and requires @zptemp
|-
|<pre>PLA
TXA
PHA
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X
PLA
TAX</pre> || Clobbers A, S, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
LDY #25
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHA
PHP
LDX #25
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>SEC
LDA #17
@A:
NOP $00
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #25
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
LDY #25
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
NOP
NOP
PHP
LDX #25
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #24
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #25
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #24
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 140 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #27
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #27
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #27
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #27
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDX #26
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHP
LDY #26
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
SEC
LDA #27
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #26
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #26
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #24
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #24
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 141 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #28
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #28
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #19
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #19
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHA
SEC
LDA #27
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>LDA $00
SEC
LDA #27
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #25
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
NOP
TYA
PHA
LDY #25
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #25
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #25
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #24
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #25
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #24
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 142 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>LDY #152
@Y = * - 1
; ^ Hides TYA
NOP
DEY
DEY
BMI @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDX #152
@X = * - 1
; ^ Hides TYA
NOP
DEX
DEX
BMI @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>PHA
PHA
LDY #27
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
PHA
LDX #27
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>LDY #26
@Y = * - 1
; ^ Hides !NOP
NOP
DEY
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>LDX #26
@X = * - 1
; ^ Hides !NOP
NOP
DEX
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
NOP
LDX #27
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
LDY #27
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #27
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #26
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDY #26
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
NOP
PHP
LDX #26
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
TXA
PHA
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
PHP
SEC
LDA #26
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #25
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 143 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDY #28
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #28
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #27
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #27
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #28
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #19
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #19
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #18
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 144 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #28
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #28
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDY #28
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDA $00
LDX #28
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDY #28
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>BIT $00
LDX #28
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDY #28
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDX #28
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDY #28
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDX #28
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDY #28
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>JMP *+3
LDX #28
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #17
@X:
BIT $00
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #17
@Y:
BIT $00
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PLA
SEC
LDA #27
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #26
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #25
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #26
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #25
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 145 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #18
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>LDX #18
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #12
@Y:
PHP
PLP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #12
@X:
PHP
PLP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDX #27
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHP
LDY #27
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
SEC
LDA #28
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #27
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #27
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
PHA
TXA
PHA
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X
PLA
TAX
PLA</pre> || Clobbers S, and Z&amp;N
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #18
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHP
PHA
SEC
LDA #25
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #16
@A:
BIT $00
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 146 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #29
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #29
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDX #27
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PHP
LDY #27
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
SEC
LDA #28
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDX #27
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
PHP
PLP
BMI @Y
PLP</pre> || Clobbers Y
|-
|<pre>LDA $00
SEC
LDA #28
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #26
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #17
@A:
BIT $00
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #17
@A:
BIT $00
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, C, and V
|-
|<pre>PHA
SEC
LDA #17
@A:
STA @zptemp
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C; and requires @zptemp
|-
|<pre>PHA
PHA
SEC
LDA #19
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
|<pre>PHA
SEC
LDA #17
@A:
NOP $00
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #25
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #25
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 147 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>NOP
LDX #18
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>NOP
LDY #18
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
LDX #12
@X:
PHP
PLP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #12
@Y:
PHP
PLP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>SEC
LDA #18
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #27
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDY #27
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
NOP
PHP
LDX #27
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #27
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #27
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #26
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 148 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #21
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #21
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #28
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #28
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #29
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #27
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #27
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #27
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #27
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHA
PHA
TXA
PHA
LDX #232
@X = * - 1
; ^ Hides INX
BNE @X
PLA
TAX
PLA</pre> || Clobbers S, and Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHA
TYA
PHA
LDY #25
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #25
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #25
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 149 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #29
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #29
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDX #29
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>LDA $00
LDY #29
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>BIT $00
LDY #29
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>BIT $00
LDX #29
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDX #29
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDY #29
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDX #29
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDY #29
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDY #29
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>JMP *+3
LDX #29
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #152
@X = * - 1
; ^ Hides TYA
NOP
DEX
DEX
BMI @X
PLP</pre> || Clobbers A, and X
|-
|<pre>PHP
LDY #152
@Y = * - 1
; ^ Hides TYA
NOP
DEY
DEY
BMI @Y
PLP</pre> || Clobbers A, and Y
|-
|<pre>PHA
PHA
PHP
LDY #27
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHA
PHP
LDX #27
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>NOP
SEC
LDA #18
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
|<pre>PHP
LDX #26
@X = * - 1
; ^ Hides !NOP
NOP
DEX
DEX
BNE @X
PLP</pre> || Clobbers X; and requires support for unofficial opcodes
|-
|<pre>PHP
LDY #26
@Y = * - 1
; ^ Hides !NOP
NOP
DEY
DEY
BNE @Y
PLP</pre> || Clobbers Y; and requires support for unofficial opcodes
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #27
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
LDX #27
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
NOP
PHP
LDY #27
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #26
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #27
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #26
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 150 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #29
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #29
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDY #21
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #21
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #28
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #28
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #21
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #28
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #28
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #19
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 151 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #30
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #30
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #28
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #28
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #29
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDX #28
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
BIT $00
LDY #28
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>LDA $00
SEC
LDA #29
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #27
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
NOP
TYA
PHA
LDY #27
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #27
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #27
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #26
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #27
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #26
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 152 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>PHA
PHA
LDY #29
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
PHA
LDX #29
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
LDX #21
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
LDY #21
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #29
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TXA
PHA
LDX #28
@X:
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHP
LDX #12
@X:
PHP
PLP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #12
@Y:
PHP
PLP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #28
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #28
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #27
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 153 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #234
@Y = * - 1
; ^ Hides NOP
INY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #234
@X = * - 1
; ^ Hides NOP
INX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #29
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #29
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #30
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #28
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #28
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #28
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #28
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #17
@A:
BIT $00
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 154 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #30
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #30
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #17
@Y:
NOP
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #17
@X:
NOP
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHA
PHA
PHP
LDY #28
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHA
PHP
LDX #28
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>NOP
PLA
SEC
LDA #29
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TXA
PHA
LDX #28
@X:
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
PHP
LDY #12
@Y:
PHP
PLP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #12
@X:
PHP
PLP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #27
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #28
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #27
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 155 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #22
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #22
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>CLC
LDA #234
@A = * - 1
; ^ Hides NOP
ADC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #21
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #21
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #29
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #29
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #27
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #27
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 156 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #31
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #31
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #29
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #29
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #30
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDY #29
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
BIT $00
LDX #29
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #17
@A:
NOP
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TXA
PHA
LDX #28
@X:
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>TYA
PHA
LDY #12
@Y:
PHP
PLP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #28
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #28
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #27
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #28
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #27
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 157 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #234
@X = * - 1
; ^ Hides NOP
INX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #234
@Y = * - 1
; ^ Hides NOP
INY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #13
@Y:
PHP
PLP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #13
@X:
PHP
PLP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #22
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #29
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
PHP
LDY #21
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #21
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #21
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #21
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #28
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 158 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #31
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #31
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #30
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #30
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #31
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #29
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #29
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #29
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #29
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHA
TYA
PHA
LDY #27
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #27
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #27
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 159 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #31
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #31
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDY #31
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDA $00
LDX #31
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDY #31
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>BIT $00
LDX #31
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDX #31
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDY #31
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDY #31
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDX #31
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #31
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>JMP *+3
LDY #31
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PLA
CLC
LDA #234
@A = * - 1
; ^ Hides NOP
ADC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>SEC
LDA #13
@A:
PHP
PLP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHA
PHP
LDY #29
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHA
PHP
LDX #29
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #21
@Y:
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDY #21
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
NOP
PHP
LDX #21
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TXA
PHA
LDX #28
@X:
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
PHP
SEC
LDA #21
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #28
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 160 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #31
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #31
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #234
@X = * - 1
; ^ Hides NOP
INX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #234
@Y = * - 1
; ^ Hides NOP
INY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
SEC
LDA #31
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #30
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #30
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #28
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #28
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 161 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #32
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #32
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #30
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #30
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #31
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #17
@X:
NOP
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #17
@Y:
NOP
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>LDA $00
SEC
LDA #31
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #29
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
TYA
PHA
LDY #21
@Y:
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #29
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #29
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TXA
PHA
LDX #28
@X:
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #21
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #28
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 162 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #23
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #23
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #22
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #22
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PLA
SEC
LDA #31
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
CLC
LDA #234
@A = * - 1
; ^ Hides NOP
ADC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
CLC
LDA #234
@A = * - 1
; ^ Hides NOP
ADC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #29
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 163 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #32
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #32
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #31
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #31
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #32
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #30
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #30
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #17
@A:
NOP
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #17
@A:
NOP
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>PHA
TYA
PHA
LDY #12
@Y:
PHP
PLP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #28
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #28
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 164 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #32
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #32
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDY #23
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #23
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #23
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #234
@Y = * - 1
; ^ Hides NOP
INY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHP
LDY #13
@Y:
PHP
PLP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #13
@X:
PHP
PLP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #22
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #22
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #29
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #21
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 165 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #32
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #32
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #32
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #32
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDX #31
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHP
LDY #31
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
SEC
LDA #32
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #31
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #31
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #29
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #29
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 166 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #33
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #33
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDX #31
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PHP
LDY #31
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
SEC
LDA #32
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDY #31
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
BIT $00
LDX #31
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #23
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TXA
PHA
LDX #22
@X:
NOP
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #13
@A:
PHP
PLP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #13
@A:
PHP
PLP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #21
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #21
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 167 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #24
@Y = * - 1
; ^ Hides CLC
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #24
@X = * - 1
; ^ Hides CLC
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PLA
SEC
LDA #32
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #31
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDY #31
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
NOP
PHP
LDX #31
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #31
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #31
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #30
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 168 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDY #33
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #33
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #32
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #32
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #33
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #31
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #31
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #31
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #31
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #21
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #29
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #21
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 169 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #24
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #24
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #23
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #23
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PLA
SEC
LDA #32
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #31
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
CLC
LDA #234
@A = * - 1
; ^ Hides NOP
ADC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 170 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #200
@Y = * - 1
; ^ Hides INY
INY
INY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PHA
LDX #24
@X = * - 1
; ^ Hides CLC
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>LDX #90
@X = * - 1
; ^ Hides !NOP
INX
INX
BPL @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDX #33
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #32
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #32
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #33
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #32
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #32
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #30
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #17
@A:
NOP
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 171 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #34
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #34
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #24
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHP
LDX #32
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PHP
LDY #32
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PHP
LDY #23
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #23
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #23
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #23
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #234
@Y = * - 1
; ^ Hides NOP
INY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #22
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 172 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #19
@Y:
PLA
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
|<pre>LDX #19
@X:
PLA
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #19
@Y:
NOP
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #19
@X:
NOP
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PLA
SEC
LDA #33
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #32
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDY #32
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
NOP
PHP
LDX #32
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #32
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #32
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #31
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 173 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #34
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #34
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #33
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #33
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #34
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TXA
PHA
LDX #23
@X:
NOP
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHP
SEC
LDA #32
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #32
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
PHP
SEC
LDA #23
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #23
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TXA
PHA
LDX #22
@X:
NOP
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #13
@A:
PHP
PLP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 174 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #232
@X = * - 1
; ^ Hides INX
NOP
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #152
@Y = * - 1
; ^ Hides TYA
DEY
BMI @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #34
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #24
@X = * - 1
; ^ Hides CLC
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #24
@Y = * - 1
; ^ Hides CLC
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|9 bytes
|-
|<pre>SEC
LDA #19
@A:
NOP
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #32
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #31
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #32
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #31
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 175 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #34
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #34
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #34
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #34
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #33
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #33
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #34
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #33
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #33
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #31
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #31
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 176 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #35
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #35
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #24
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #24
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHA
SEC
LDA #34
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>LDA $00
SEC
LDA #34
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #32
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
NOP
TYA
PHA
LDY #32
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #32
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #32
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #31
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #32
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #31
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 177 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #22
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>LDY #22
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #22
@Y:
LDA $00
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDX #22
@X:
LDA $00
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>LDX #22
@X:
BIT $00
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>LDY #22
@Y:
BIT $00
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>LDX #22
@X:
STA @zptemp
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>LDY #22
@Y:
STA @zptemp
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>LDY #22
@Y:
NOP $00
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>LDX #22
@X:
NOP $00
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #200
@Y = * - 1
; ^ Hides INY
INY
INY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>LDX #22
@X:
JMP *+3
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>PHA
PHP
LDX #24
@X = * - 1
; ^ Hides CLC
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PLA
SEC
LDA #34
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
|<pre>PHP
LDX #90
@X = * - 1
; ^ Hides !NOP
INX
INX
BPL @X
PLP</pre> || Clobbers X; and requires support for unofficial opcodes
|-
!colspan="2"|9 bytes
|-
|<pre>TXA
PHA
LDX #33
@X:
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #33
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #33
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #33
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #32
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 178 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #35
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #35
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #34
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #34
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #35
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #24
@Y = * - 1
; ^ Hides CLC
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #24
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #24
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #23
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 179 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #21
@X = * - 1
; ^ Hides ORA zp,X
DEX ;first round only
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>LDY #21
@Y = * - 1
; ^ Hides ORA zp,X
DEY ;first round only
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDX #216
@X = * - 1
; ^ Hides CLD
INX
INX
BNE @X</pre> || Clobbers X, Z&amp;N, and D
|-
|<pre>LDY #216
@Y = * - 1
; ^ Hides CLD
INY
INY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and D
|-
|<pre>PHA
LDX #35
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #35
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>LDX #20
@X = * - 1
; ^ Hides !NOP zp,X
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>LDY #20
@Y = * - 1
; ^ Hides !NOP zp,X
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|7 bytes
|-
|<pre>LDX #236
@X = * - 1
; ^ Hides CPX abs
CMP #0
INX
BNE @X</pre> || Clobbers X, Z&amp;N, and C
|-
|<pre>LDY #236
@Y = * - 1
; ^ Hides CPX abs
CMP #0
INY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and C
|-
|<pre>BIT $00
LDY #35
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>BIT $00
LDX #35
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDY #35
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDX #35
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #35
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>JMP *+3
LDY #35
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>SEC
LDA #22
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #19
@X:
NOP
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #19
@Y:
NOP
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #22
@A:
BIT $00
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, C, and V
|-
|<pre>SEC
LDA #22
@A:
STA @zptemp
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C; and requires @zptemp
|-
|<pre>SEC
LDA #22
@A:
NOP $00
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TXA
PHA
LDX #33
@X:
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #32
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #33
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #32
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 180 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #35
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #35
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #35
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #35
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #34
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #34
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #35
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #34
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #34
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TXA
PHA
LDX #23
@X:
NOP
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHP
PHA
SEC
LDA #32
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #23
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 181 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #36
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #36
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #232
@X = * - 1
; ^ Hides INX
NOP
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #152
@Y = * - 1
; ^ Hides TYA
DEY
BMI @Y
PLP</pre> || Clobbers A, and Y
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #34
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
SEC
LDA #35
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
|<pre>SEC
LDA #20
@A = * - 1
; ^ Hides !NOP zp,X
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
PLP
PHP
LDY #24
@Y = * - 1
; ^ Hides CLC
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>LDA $00
SEC
LDA #35
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #200
@Y = * - 1
; ^ Hides INY
INY
INY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #19
@A:
NOP
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #19
@A:
NOP
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #32
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #32
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 182 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>LDY #236
@Y = * - 1
; ^ Hides CPX abs
INC @zptemp
INY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and C; and requires @zptemp
|-
|<pre>LDX #236
@X = * - 1
; ^ Hides CPX abs
INC @zptemp
INX
BNE @X</pre> || Clobbers X, Z&amp;N, and C; and requires @zptemp
|-
|<pre>PHA
PHA
LDY #35
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
PHA
LDX #35
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
NOP
LDX #35
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
LDY #35
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #35
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #34
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #34
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #34
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #34
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #34
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #33
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 183 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #26
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #26
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #35
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #35
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #36
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #34
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #34
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #34
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #34
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHA
TYA
PHA
LDY #32
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #32
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #32
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 184 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #36
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #36
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDY #36
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDA $00
LDX #36
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDY #36
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>BIT $00
LDX #36
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDY #36
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDX #36
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDY #36
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDX #36
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #36
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>JMP *+3
LDY #36
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PHA
PHP
LDX #232
@X = * - 1
; ^ Hides INX
NOP
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PHP
LDY #152
@Y = * - 1
; ^ Hides TYA
DEY
BMI @Y
PLP</pre> || Clobbers A, Y, and S
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #22
@X:
BIT $00
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #22
@Y:
BIT $00
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PLA
SEC
LDA #35
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #34
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TXA
PHA
LDX #33
@X:
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #34
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #33
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 185 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #23
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>LDY #23
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDY #26
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #26
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #35
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #35
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #26
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #35
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #35
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #24
@Y = * - 1
; ^ Hides CLC
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #24
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 186 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #37
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #37
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #216
@Y = * - 1
; ^ Hides CLD
INY
INY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #216
@X = * - 1
; ^ Hides CLD
INX
INX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHA
SEC
LDA #36
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>LDA $00
SEC
LDA #36
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #34
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #22
@A:
BIT $00
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #22
@A:
BIT $00
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, C, and V
|-
|<pre>PHA
SEC
LDA #22
@A:
STA @zptemp
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C; and requires @zptemp
|-
|<pre>PHA
PHA
PHA
SEC
LDA #34
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
|<pre>PHA
SEC
LDA #22
@A:
NOP $00
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TXA
PHA
LDX #33
@X:
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #33
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 187 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>NOP
LDY #23
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>NOP
LDX #23
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
LDX #26
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
LDY #26
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>SEC
LDA #23
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #35
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #35
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #35
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #35
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #35
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #34
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 188 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDY #37
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #37
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #36
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #36
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #37
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #35
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #35
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
|<pre>PHP
SEC
LDA #20
@A = * - 1
; ^ Hides !NOP zp,X
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A; and requires support for unofficial opcodes
|-
|<pre>PHA
SEC
LDA #20
@A = * - 1
; ^ Hides !NOP zp,X
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #35
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #35
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #200
@Y = * - 1
; ^ Hides INY
INY
INY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #19
@A:
NOP
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 189 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #37
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #37
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDY #37
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDA $00
LDX #37
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDY #37
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>BIT $00
LDX #37
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>LDY #136
@Y = * - 1
; ^ Hides DEY
JSR @rts14
BMI @Y</pre> || Clobbers Y, and Z&amp;N; and requires @rts14
|-
|<pre>STA @zptemp
LDY #37
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDX #37
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDY #37
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDX #37
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #37
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>JMP *+3
LDY #37
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #236
@X = * - 1
; ^ Hides CPX abs
INC @zptemp
INX
BNE @X
PLP</pre> || Clobbers X; and requires @zptemp
|-
|<pre>PHP
LDY #236
@Y = * - 1
; ^ Hides CPX abs
INC @zptemp
INY
BNE @Y
PLP</pre> || Clobbers Y; and requires @zptemp
|-
|<pre>PHA
PHA
PHP
LDY #35
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHA
PHP
LDX #35
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>NOP
SEC
LDA #23
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #35
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
LDX #35
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
NOP
PHP
LDY #35
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #34
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #35
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #34
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 190 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #27
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #27
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #26
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #26
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #37
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #36
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #36
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #34
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #34
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 191 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #38
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #38
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #36
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #36
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #37
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDY #36
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
BIT $00
LDX #36
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>LDA $00
SEC
LDA #37
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #35
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
NOP
TYA
PHA
LDY #35
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #35
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #35
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #34
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #35
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #34
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 192 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>NOP
LDX #27
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #27
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #27
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #36
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHP
LDY #23
@Y:
BIT $00
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #23
@X:
BIT $00
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #26
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #26
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #35
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 193 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #38
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #38
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #37
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #37
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #38
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #36
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #36
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #36
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #36
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #22
@A:
BIT $00
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 194 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #38
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #38
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDY #38
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDA $00
LDX #38
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDY #38
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>BIT $00
LDX #38
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDY #38
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDX #38
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDY #38
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDX #38
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #38
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>JMP *+3
LDY #38
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
SEC
LDA #27
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHA
PHP
LDX #36
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PHA
PHP
LDY #36
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
!colspan="2"|10 bytes
|-
|<pre>TXA
PHA
LDX #26
@X:
NOP
DEX
BNE @X
PLA
TAX</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
PHP
LDX #23
@X:
BIT $00
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHP
LDY #23
@Y:
BIT $00
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #35
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
PHP
SEC
LDA #26
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #35
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 195 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #38
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #38
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #38
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #38
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDX #37
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHP
LDY #37
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
SEC
LDA #38
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #37
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #37
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #35
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
|<pre>PHP
PHA
SEC
LDA #20
@A = * - 1
; ^ Hides !NOP zp,X
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Requires support for unofficial opcodes
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #35
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 196 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #39
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #39
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #37
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #37
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #38
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDX #37
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
BIT $00
LDY #37
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>LDA $00
SEC
LDA #38
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #36
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>TYA
PHA
LDY #23
@Y:
LDA $00
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #36
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #36
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #35
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #26
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #35
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 197 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #28
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #28
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #27
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #27
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PLA
SEC
LDA #38
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #37
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #37
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #37
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #36
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 198 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDY #39
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #39
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #38
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #38
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #39
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #37
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #37
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #37
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #37
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHA
TYA
PHA
LDY #35
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #35
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #35
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 199 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #232
@X = * - 1
; ^ Hides INX
PHA
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
|<pre>LDX #232
@X = * - 1
; ^ Hides INX
LDA $00
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>LDX #232
@X = * - 1
; ^ Hides INX
BIT $00
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>LDX #232
@X = * - 1
; ^ Hides INX
STA @zptemp
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>PHA
LDY #39
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>LDX #232
@X = * - 1
; ^ Hides INX
NOP $00
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|7 bytes
|-
|<pre>LDX #22
@X:
NOP
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #22
@Y:
NOP
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #28
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PHP
LDY #27
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #27
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #27
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #27
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #36
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #26
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 200 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDY #39
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
|<pre>PLA
LDX #39
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDX #39
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
LDY #39
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #38
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #38
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #39
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #38
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #38
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #36
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #36
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 201 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #40
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #40
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #38
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #38
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #39
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDY #38
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
BIT $00
LDX #38
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #22
@A:
NOP
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #27
@Y:
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
PHP
SEC
LDA #27
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #27
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TXA
PHA
LDX #26
@X:
NOP
DEX
BNE @X
PLA
TAX
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #26
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 202 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #232
@X = * - 1
; ^ Hides INX
PHA
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHA
PHA
LDY #39
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
NOP
LDY #39
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
LDX #39
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #39
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #38
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #38
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #38
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #38
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #38
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #37
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 203 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #40
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #40
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #39
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #39
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #40
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #38
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #38
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #38
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #38
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>PHA
TYA
PHA
LDY #23
@Y:
LDA $00
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #36
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #26
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 204 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #29
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #29
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #28
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #28
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PLA
SEC
LDA #39
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #38
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #37
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #38
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #37
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 205 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #40
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #40
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #17
@Y:
PHP
PLP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #17
@X:
PHP
PLP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #39
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #39
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #40
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #39
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #39
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #37
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #37
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 206 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #41
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #41
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #232
@X = * - 1
; ^ Hides INX
BIT $00
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #29
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHP
LDY #39
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDY #22
@Y:
NOP
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #28
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #28
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #27
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 207 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>LDY #233
@Y = * - 1
; ^ Hides SBC #imm
BIT $EA ;hides 'NOP'
INY
BNE @Y</pre> || Clobbers A, Y, Z&amp;N, C, and V
|-
|<pre>LDX #233
@X = * - 1
; ^ Hides SBC #imm
BIT $EA ;hides 'NOP'
INX
BNE @X</pre> || Clobbers A, X, Z&amp;N, C, and V
|-
|<pre>PHA
LDX #29
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #29
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
LDX #17
@X:
PHP
PLP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #17
@Y:
PHP
PLP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #40
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #39
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #39
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #39
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #39
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #39
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #38
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 208 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #41
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #41
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #40
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #40
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #41
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #28
@Y:
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHP
SEC
LDA #39
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #39
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #22
@A:
NOP
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #22
@A:
NOP
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #27
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #27
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 209 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDX #26
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>LDY #26
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDX #26
@X:
LDA $00
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>LDY #26
@Y:
LDA $00
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDX #26
@X:
BIT $00
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>LDY #26
@Y:
BIT $00
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>LDY #26
@Y:
STA @zptemp
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>LDX #26
@X:
STA @zptemp
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>LDY #26
@Y:
NOP $00
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>LDX #26
@X:
NOP $00
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>LDX #26
@X:
JMP *+3
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #26
@Y:
JMP *+3
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHA
PHA
PHP
LDY #39
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHA
PHP
LDX #39
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>NOP
PLA
SEC
LDA #40
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #39
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
LDX #39
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
NOP
PHP
LDY #39
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #38
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #39
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #38
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 210 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #41
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #41
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #41
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #41
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #40
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #40
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #41
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #40
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #40
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #38
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #38
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 211 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #42
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #42
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #29
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #29
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #26
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>LDA $00
SEC
LDA #41
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #39
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
NOP
TYA
PHA
LDY #39
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #39
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #39
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #38
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #39
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #38
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 212 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>PHA
LDX #26
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #26
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
NOP
LDX #41
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
LDY #41
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #41
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #40
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHP
LDX #17
@X:
PHP
PLP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #17
@Y:
PHP
PLP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #40
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #40
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #39
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 213 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #42
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #42
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #41
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #41
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #42
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #29
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #29
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #28
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 214 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #42
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #42
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDX #42
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>LDA $00
LDY #42
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>BIT $00
LDY #42
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>BIT $00
LDX #42
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDX #42
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDY #42
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDX #42
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDY #42
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #42
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>JMP *+3
LDY #42
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #233
@X = * - 1
; ^ Hides SBC #imm
BIT $EA ;hides 'NOP'
INX
BNE @X
PLP</pre> || Clobbers A, and X
|-
|<pre>PHP
LDY #233
@Y = * - 1
; ^ Hides SBC #imm
BIT $EA ;hides 'NOP'
INY
BNE @Y
PLP</pre> || Clobbers A, and Y
|-
|<pre>PHA
PHP
LDY #29
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #29
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>NOP
PLA
SEC
LDA #41
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #40
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
PHP
LDY #17
@Y:
PHP
PLP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #17
@X:
PHP
PLP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #39
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #40
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #39
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 215 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #24
@Y = * - 1
; ^ Hides CLC
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #24
@X = * - 1
; ^ Hides CLC
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #41
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #41
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #42
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #41
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #41
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #28
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHP
PHA
SEC
LDA #39
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #22
@A:
NOP
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 216 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #43
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #43
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #41
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #41
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #42
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #26
@X:
BIT $00
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #26
@Y:
BIT $00
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>LDA $00
SEC
LDA #42
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #40
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>TYA
PHA
LDY #17
@Y:
PHP
PLP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHP
SEC
LDA #29
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #29
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #39
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #40
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #39
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 217 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #27
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>LDX #27
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #18
@Y:
PHP
PLP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #18
@X:
PHP
PLP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PLA
SEC
LDA #42
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #41
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #41
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #41
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #41
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #41
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #40
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 218 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #31
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #31
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #42
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #42
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #43
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #41
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #41
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #26
@A:
BIT $00
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #41
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHA
TYA
PHA
LDY #39
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #39
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #39
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 219 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDY #43
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #43
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDY #43
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDA $00
LDX #43
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>BIT $00
LDY #43
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>LDY #216
@Y = * - 1
; ^ Hides CLD
NOP
INY
INY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and D
|-
|<pre>LDX #216
@X = * - 1
; ^ Hides CLD
NOP
INX
INX
BNE @X</pre> || Clobbers X, Z&amp;N, and D
|-
|<pre>BIT $00
LDX #43
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDY #43
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDX #43
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDY #43
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDX #43
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDX #43
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>JMP *+3
LDY #43
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>SEC
LDA #27
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>SEC
LDA #18
@A:
PHP
PLP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHA
PHP
LDY #41
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHA
PHP
LDX #41
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #41
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
LDX #41
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
NOP
PHP
LDY #41
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #40
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #41
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #40
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 220 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #43
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #43
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDX #31
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #31
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #42
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #42
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #31
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #42
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #42
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #29
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 221 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #44
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #44
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #42
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #42
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #43
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDY #42
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
BIT $00
LDX #42
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>LDA $00
SEC
LDA #43
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #41
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
NOP
TYA
PHA
LDY #41
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #41
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #41
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #40
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #41
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #40
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 222 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>PHA
PHA
LDY #43
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
PHA
LDX #43
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #24
@X = * - 1
; ^ Hides CLC
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #24
@Y = * - 1
; ^ Hides CLC
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PLA
SEC
LDA #43
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #42
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #42
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #42
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #41
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 223 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #44
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #44
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #43
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #43
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #44
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #42
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #42
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #42
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #42
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>PHA
TYA
PHA
LDY #17
@Y:
PHP
PLP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHP
PHA
SEC
LDA #29
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #40
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 224 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #232
@X = * - 1
; ^ Hides INX
PLA
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
|<pre>LDX #232
@X = * - 1
; ^ Hides INX
NOP
NOP
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #152
@Y = * - 1
; ^ Hides TYA
NOP
DEY
BMI @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDY #228
@Y = * - 1
; ^ Hides CPX zp
NOP
INY
BNE @Y</pre> || Clobbers Y, Z&amp;N, C, and V
|-
|<pre>PHA
LDY #44
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>LDY #100
@Y = * - 1
; ^ Hides !NOP zp
NOP
INY
BPL @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|7 bytes
|-
|<pre>BIT $00
LDY #44
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDY #44
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDY #44
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #18
@X:
PHP
PLP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #18
@Y:
PHP
PLP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PLA
SEC
LDA #43
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #42
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #41
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #42
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #41
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 225 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #32
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #32
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #31
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #31
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #44
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #43
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #43
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #41
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #26
@A:
BIT $00
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 226 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #45
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #45
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #43
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #43
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #44
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
|<pre>CLC
LDA #100
@A = * - 1
; ^ Hides !NOP zp
NOP
ADC #1
BPL @A</pre> || Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
BIT $00
LDY #43
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
BIT $00
LDX #43
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>LDA $00
SEC
LDA #44
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #24
@Y = * - 1
; ^ Hides CLC
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #18
@A:
PHP
PLP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #18
@A:
PHP
PLP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #41
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #41
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 227 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #232
@X = * - 1
; ^ Hides INX
PLA
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDX #32
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #32
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #32
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #43
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
PHP
LDY #31
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #31
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #31
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #31
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #42
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 228 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #45
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #45
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #44
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #44
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #45
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #43
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #43
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #43
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #43
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHA
TYA
PHA
LDY #41
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #41
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #41
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 229 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #45
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #45
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #19
@Y:
PHP
PLP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #19
@X:
PHP
PLP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
SEC
LDA #32
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHA
PHP
LDY #43
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHA
PHP
LDX #43
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #31
@Y:
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #31
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #31
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #42
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
PHP
SEC
LDA #31
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #42
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 230 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #45
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #45
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #45
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #45
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #44
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #44
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #45
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #44
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #44
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #42
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #42
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 231 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #46
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #46
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #232
@X = * - 1
; ^ Hides INX
NOP
NOP
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #228
@Y = * - 1
; ^ Hides CPX zp
NOP
INY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHA
SEC
LDA #45
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>SEC
LDA #19
@A:
PHP
PLP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #43
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
TYA
PHA
LDY #31
@Y:
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #43
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #43
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #42
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #31
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #42
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 232 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #33
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #33
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #32
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #32
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PLA
SEC
LDA #45
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #44
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #44
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #44
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #43
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 233 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #46
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #46
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #45
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #45
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #46
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #44
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #44
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
|<pre>PHP
CLC
LDA #100
@A = * - 1
; ^ Hides !NOP zp
NOP
ADC #1
BPL @A
PLP</pre> || Clobbers A; and requires support for unofficial opcodes
|-
|<pre>PHA
CLC
LDA #100
@A = * - 1
; ^ Hides !NOP zp
NOP
ADC #1
BPL @A
PLA</pre> || Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
LDA $00
SEC
LDA #44
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
LDA $00
SEC
LDA #44
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #24
@Y = * - 1
; ^ Hides CLC
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #18
@A:
PHP
PLP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 234 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #46
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #46
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDX #33
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #33
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #33
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PHP
LDY #32
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #32
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #32
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #32
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #43
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #31
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 235 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #26
@Y:
PLA
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
|<pre>LDX #26
@X:
PLA
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #26
@Y:
NOP
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #26
@X:
NOP
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #45
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #45
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #46
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #45
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #45
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #43
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #43
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 236 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #47
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #47
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #45
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #45
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
SEC
LDA #46
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDY #19
@Y:
PHP
PLP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #19
@X:
PHP
PLP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #33
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #32
@Y:
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
PHP
SEC
LDA #32
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #32
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #31
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #31
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 237 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>PHA
PHA
LDY #46
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
PHA
LDX #46
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
LDX #26
@X:
NOP
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #26
@Y:
NOP
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #46
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #45
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #45
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #45
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #45
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #45
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #44
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 238 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDY #47
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #47
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #46
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #46
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #47
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #45
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #45
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #19
@A:
PHP
PLP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #19
@A:
PHP
PLP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #31
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #43
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #31
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 239 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #34
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #34
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDX #33
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #33
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PLA
SEC
LDA #46
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #45
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #44
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #45
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #44
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 240 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDY #47
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
|<pre>PLA
LDX #47
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDX #47
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
LDY #47
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDX #46
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHP
LDY #46
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
SEC
LDA #47
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #46
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #46
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #44
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
|<pre>PHP
PHA
CLC
LDA #100
@A = * - 1
; ^ Hides !NOP zp
NOP
ADC #1
BPL @A
PLA
PLP</pre> || Requires support for unofficial opcodes
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
LDA $00
SEC
LDA #44
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 241 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #48
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #48
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>SEC
LDA #34
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
|<pre>PHA
PHP
LDX #46
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PHP
LDY #46
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
!colspan="2"|9 bytes
|-
|<pre>NOP
PHP
LDY #33
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #33
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #33
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #33
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #32
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 242 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #202
@Y = * - 1
; ^ Hides DEX
INY
INY
BNE @Y</pre> || Clobbers X, Y, and Z&amp;N
|-
|<pre>LDY #74
@Y = * - 1
; ^ Hides LSR A
INY
INY
BPL @Y</pre> || Clobbers A, Y, Z&amp;N, and C
|-
|<pre>LDX #74
@X = * - 1
; ^ Hides LSR A
INX
INX
BPL @X</pre> || Clobbers A, X, Z&amp;N, and C
|-
!colspan="2"|7 bytes
|-
|<pre>PHA
LDX #34
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #34
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
NOP
LDY #47
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
LDX #47
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #47
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #46
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHP
LDX #26
@X:
NOP
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #26
@Y:
NOP
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #46
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #46
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #45
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 243 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDX #48
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #48
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDX #47
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #47
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #48
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>TYA
PHA
LDY #33
@Y:
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHP
SEC
LDA #46
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #46
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
PHP
SEC
LDA #33
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #33
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #32
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #32
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 244 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #48
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #48
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #27
@Y:
NOP
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #27
@X:
NOP
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHA
PHA
PHP
LDY #46
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHA
PHP
LDX #46
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>NOP
PLA
SEC
LDA #47
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #46
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
PHP
LDY #26
@Y:
NOP
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #26
@X:
NOP
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #45
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #46
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #45
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 245 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #48
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #48
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDY #48
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
LDX #48
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #47
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #47
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #48
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #47
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #47
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
PHP
PHA
SEC
LDA #45
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
SEC
LDA #19
@A:
PHP
PLP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 246 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDX #49
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>LDY #49
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHP
LDY #34
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #34
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHA
SEC
LDA #48
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>SEC
LDA #27
@A:
NOP
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #46
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>TYA
PHA
LDY #26
@Y:
NOP
NOP
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHA
PHP
SEC
LDA #46
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
PHA
SEC
LDA #46
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #45
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #46
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #45
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 247 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>PHA
PHA
LDY #48
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
PHA
LDX #48
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
NOP
LDX #48
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
LDY #48
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #48
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #47
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #47
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #47
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #47
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #47
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #46
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 248 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>NOP
LDY #49
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
LDX #49
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #48
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #48
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #49
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHP
SEC
LDA #34
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #34
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #33
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 249 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #31
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>LDX #31
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDY #31
@Y:
LDA $00
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>LDX #31
@X:
LDA $00
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>LDY #31
@Y:
BIT $00
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>LDX #31
@X:
BIT $00
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>LDX #31
@X:
STA @zptemp
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>LDY #31
@Y:
STA @zptemp
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>LDX #31
@X:
NOP $00
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>LDY #31
@Y:
NOP $00
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>LDY #31
@Y:
JMP *+3
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #31
@X:
JMP *+3
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>PHP
LDX #74
@X = * - 1
; ^ Hides LSR A
INX
INX
BPL @X
PLP</pre> || Clobbers A, and X
|-
|<pre>PHP
LDY #74
@Y = * - 1
; ^ Hides LSR A
INY
INY
BPL @Y
PLP</pre> || Clobbers A, and Y
|-
|<pre>PHP
LDY #202
@Y = * - 1
; ^ Hides DEX
INY
INY
BNE @Y
PLP</pre> || Clobbers X, and Y
|-
!colspan="2"|9 bytes
|-
|<pre>PHA
PHP
LDX #34
@X:
NOP
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PHP
LDY #34
@Y:
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>NOP
PLA
SEC
LDA #48
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #47
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
LDX #47
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
NOP
PHP
LDY #47
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #46
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #47
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #46
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 250 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDY #49
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
|<pre>PLA
LDX #49
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
NOP
LDX #49
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
NOP
LDY #49
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDY #48
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
PHP
LDX #48
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
SEC
LDA #49
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #48
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #48
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
TYA
PHA
LDY #33
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHP
PHA
SEC
LDA #46
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #33
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 251 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #50
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #50
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>PHA
PHP
LDY #48
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>PHA
PHP
LDX #48
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>SEC
LDA #31
@A:
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDX #27
@X:
NOP
NOP
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>PHP
LDY #27
@Y:
NOP
NOP
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>LDA $00
SEC
LDA #49
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PLA
TYA
PHA
LDY #47
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, S, and Z&amp;N
|-
!colspan="2"|11 bytes
|-
|<pre>NOP
NOP
TYA
PHA
LDY #47
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>PHA
PHP
SEC
LDA #34
@A:
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #34
@A:
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHA
TYA
PHA
LDY #46
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
SEC
LDA #47
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>NOP
NOP
PHP
PHA
SEC
LDA #46
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 252 cycles ===
{| class="wikitable testtable"
!colspan="2"|7 bytes
|-
|<pre>PHA
LDY #31
@Y:
PHA
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
|<pre>PHA
LDX #31
@X:
PHA
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>LDY #84
@Y = * - 1
; ^ Hides !NOP zp,X
DEY ;first round only
INY
INY
BPL @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>LDX #84
@X = * - 1
; ^ Hides !NOP zp,X
DEX ;first round only
INX
INX
BPL @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
NOP
NOP
LDY #49
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
LDX #49
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>PLA
SEC
LDA #49
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>TYA
PHA
LDY #48
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
PHP
LDX #48
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
NOP
PHP
LDY #48
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
PHP
SEC
LDA #48
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>NOP
PHA
SEC
LDA #48
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
PHA
SEC
LDA #47
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 253 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>LDY #36
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #36
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>PHP
LDY #49
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #49
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #50
@A:
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>PHA
PHP
SEC
LDA #48
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A, and S
|-
|<pre>PHA
PHA
SEC
LDA #48
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers S, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>PHP
SEC
LDA #27
@A:
NOP
NOP
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #27
@A:
NOP
NOP
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|<pre>PHA
TYA
PHA
LDY #26
@Y:
NOP
NOP
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHA
PHA
PHP
PHA
SEC
LDA #46
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers S
|-
!colspan="2"|14 bytes
|-
|<pre>NOP
NOP
NOP
PHP
PHA
SEC
LDA #46
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 254 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PHA
LDX #50
@X:
DEX
BNE @X</pre> || Clobbers X, S, and Z&amp;N
|-
|<pre>PHA
LDY #50
@Y:
DEY
BNE @Y</pre> || Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>LDA $00
LDX #50
@X:
DEX
BNE @X</pre> || Clobbers A, X, and Z&amp;N
|-
|<pre>LDA $00
LDY #50
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, and Z&amp;N
|-
|<pre>BIT $00
LDY #50
@Y:
DEY
BNE @Y</pre> || Clobbers Y, Z&amp;N, and V
|-
|<pre>BIT $00
LDX #50
@X:
DEX
BNE @X</pre> || Clobbers X, Z&amp;N, and V
|-
|<pre>STA @zptemp
LDX #50
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires @zptemp
|-
|<pre>STA @zptemp
LDY #50
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|<pre>NOP $00
LDY #50
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|<pre>NOP $00
LDX #50
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|8 bytes
|-
|<pre>JMP *+3
LDY #50
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>JMP *+3
LDX #50
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHA
PHA
PHP
LDX #48
@X:
DEX
BNE @X
PLP</pre> || Clobbers X, and S
|-
|<pre>PHA
PHA
PHP
LDY #48
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y, and S
|-
|<pre>NOP
PLA
SEC
LDA #49
@A:
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>NOP
TYA
PHA
LDY #48
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
|<pre>NOP
NOP
NOP
PHP
LDY #48
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>NOP
NOP
NOP
PHP
LDX #48
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
!colspan="2"|11 bytes
|-
|<pre>PHA
TYA
PHA
LDY #47
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>NOP
NOP
PHP
SEC
LDA #48
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
!colspan="2"|12 bytes
|-
|<pre>NOP
PHP
PHA
SEC
LDA #47
@A:
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 255 cycles ===
{| class="wikitable testtable"
!colspan="2"|6 bytes
|-
|<pre>PLA
LDX #50
@X:
DEX
BNE @X</pre> || Clobbers A, X, S, and Z&amp;N
|-
|<pre>PLA
LDY #50
@Y:
DEY
BNE @Y</pre> || Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|<pre>NOP
LDX #36
@X:
NOP
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
|<pre>NOP
LDY #36
@Y:
NOP
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|<pre>NOP
PHP
LDX #49
@X:
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>NOP
PHP
LDY #49
@Y:
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>SEC
LDA #36
@A:
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
SEC
LDA #49
@A:
SBC #1
BNE @A
PLP</pre> || Clobbers A
|-
|<pre>PHA
SEC
LDA #49
@A:
SBC #1
BNE @A
PLA</pre> || Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|<pre>PHP
PHA
SEC
LDA #34
@A:
NOP
SBC #1
BNE @A
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}
 
 
=== 256 cycles ===
{| class="wikitable testtable"
!colspan="2"|5 bytes
|-
|<pre>LDY #51
@Y:
DEY
BNE @Y</pre> || Clobbers Y, and Z&amp;N
|-
|<pre>LDX #51
@X:
DEX
BNE @X</pre> || Clobbers X, and Z&amp;N
|-
!colspan="2"|9 bytes
|-
|<pre>PHP
LDY #31
@Y:
BIT $00
DEY
BNE @Y
PLP</pre> || Clobbers Y
|-
|<pre>PHP
LDX #31
@X:
BIT $00
DEX
BNE @X
PLP</pre> || Clobbers X
|-
|<pre>SEC
LDA #23
@A:
PHA
PHA
SBC #1
BNE @A</pre> || Clobbers A, S, Z&amp;N, and C
|-
!colspan="2"|10 bytes
|-
|<pre>SEC
LDA #23
@A:
NOP
NOP
NOP
SBC #1
BNE @A</pre> || Clobbers A, Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
|<pre>TYA
PHA
NOP
NOP
LDY #48
@Y:
DEY
BNE @Y
PLA
TAY</pre> || Clobbers A, and Z&amp;N
|-
!colspan="2"|12 bytes
|-
|<pre>PHA
NOP
TYA
PHA
LDY #47
@Y:
DEY
BNE @Y
PLA
TAY
PLA</pre> || Clobbers Z&amp;N
|-
|<pre>PHP
NOP
TYA
PHA
LDY #47
@Y:
DEY
BNE @Y
PLA
TAY
PLP</pre> || Clobbers A
|-
!colspan="2"|13 bytes
|-
|<pre>PHP
PHA
TYA
PHA
LDY #46
@Y:
DEY
BNE @Y
PLA
TAY
PLA
PLP</pre> || Clobbers nothing, requires nothing
|-
|}


== More ==
* [[Cycle counting]]
Bisqwit's 6502 delay_n macro set for ca65: http://bisqwit.iki.fi/src/6502-inline_delay.7z
* [[Delay code]] for functions that produce runtime-determined amount of delay
* Bisqwit’s “vending machine” for producing a ca65-compatible delay_n macro for arbitrary number of cycles, with more fine-grained configurable constraints: http://bisqwit.iki.fi/utils/nesdelay.php The samples on this page are excerpts from files generated by this online tool.

Latest revision as of 18:24, 12 November 2020

Shortest possible CPU code that creates N cycles of delay, depending on constraints.

Code

All code samples are written for CA65.

Assumptions:

  • No page wrap occurs during any branch instruction. If a page wrap occurs, it adds +1 cycle for each loop, completely thwarting the accurate delay.
  • No interrupt / NMI occurs during the delay code.

It is permissible for DMA to steal cycles during the loops. If you are expecting that to happen, you have to manually adjust the delay cycle count (and it is in fact possible to do so) in order to get the correct delay.

Explanations on the requirements

  • @rts12 means you know a memory address that contains byte $60 (RTS).

cycle instruction that fits your constraints (such as LDA $00), followed by RTS.

Instructions, addressing modes, byte counts, cycle counts and notes

Addressing mode Instruction type Bytes Cycle count Example instruction Notes
Implied Inter-register 1 2 TAX NOP has no side effects. Flag-manipulations like CLC, and SECCLV are used when their effects are desired.
Implied Stack push 1 3 PHA PHP is only paired with PLP.
Implied Stack pop 1 4 PLA
Implied Return 1 6 RTS Used indirectly when paired with JSR. Similarly for RTI.
Immediate 2 2 CMP #$C5 Includes instructions like LDA, LDX and LDY. Other ALU instructions are used in more complex situations.
Relative Branch 2 2—4 BCC *+2 Branch takes 3 cycles when taken, 2 otherwise. A page crossing adds +1 cycle when branch is taken, but because of difficulties setting that up, we don't use it.
Zeropage Read, write 2 3 LDA $A5
Zeropage RMW 2 5 INC @zptemp Writing to zeropage is only permitted when @zptemp is available. Technically we could save @zptemp into register and restore at end, but it is bytewise inferior to other techniques.
Zeropage indexed Read, write 2 4 LDA $EA,X Inferior to 2 × NOP, but useful for hiding additional code to be executed in a loop.
Zeropage indexed RMW 2 6 INC @zptemp,X Only doable when X is known to be 0, or when entire zeropage can be clobbered.
Indexed indirect Read, write 2 6 STA (@ptrtemp,X) Only doable when X is known to be 0.
Indexed indirect RMW 2 8 SLO (@ptrtemp,X) The most cost-effective instruction. Only doable when X is known to be 0, lest we write to a random address. All instructions in this category are unofficial.
Indirect indexed Read 2 5—6 LDA (@ptrtemp),Y Never used by this code.
Indirect indexed Write 2 6 STA (@ptrtemp),Y Only doable when Y is known to be 0.
Indirect indexed RMW 2 8 SLO (@ptrtemp),Y All instructions in this category are unofficial.
Absolute Jump 3 3 JMP *+3
Absolute Read, write 3 4 LDA $2808 Inferior to 2 × NOP, but can be used carefully to hide additional code to be executed in a loop.
Absolute RMW 3 6 INC $4018 Inferior to 3 × NOP.
Absolute indexed Read 3 4—5 LDA $0200,X Inferior to shorter alternatives.
Absolute indexed Write 3 5 STA $0200,X Inferior to shorter alternatives.
Absolute indexed RMW 3 7 INC $4018,X Only doable when writing into the given address is harmless considering the possible values of X.
Absolute indirect Jump 3 5 JMP (@ptrtemp) Inferior to shorter alternatives.

{{#css:

 .testtable td{padding:2px} .testtable td pre{padding:2px;margin:2px}

}}


2 cycles

1 bytes
EA       NOP
No requirements
  • All instructions cost at least 2 cycles. There is no way to do 1 cycle of delay (though −1 cycles may sometimes appear in branch cost calculations).


3 cycles

2 bytes
C5 C5    CMP $C5
Clobbers Z&N, and C
24 24    BIT $24
Clobbers Z&N, and V
A5 A5    LDA $A5
Clobbers A, and Z&N
A6 A6    LDX $A6
Clobbers X, and Z&N
A4 A4    LDY $A4
Clobbers Y, and Z&N
3 bytes
4C xx xx JMP *+3
No requirements
  • Not relocatable means that the target address is hardcoded into the code. In ROM hacking, it sometimes makes sense to move code blobs around, and a hardcoded address makes it difficult to relocate the code. This restriction does not apply to branches, which use relative addressing. It is also assumed to not apply to JSR instructions, as chances are the JSR target is outside the code being relocated.


4 cycles

2 bytes
EA   ... NOP      × 2
No requirements
  • zp-indexed modes such as LDA $00,X also do 4 cycles, but having side effects, these two-byte instructions are inferior to a simple 2 × NOP.
  • There is also an unofficial opcode NOP $00,X (34 00), but there is no reason to use this instruction when the official equivalent has the same performance.


5 cycles

3 bytes
18       CLC
90 00    BCC *+2
Clobbers C
B8       CLV
50 00    BVC *+2
Clobbers V
EA       NOP
A5 A5    LDA $A5
Clobbers A, and Z&N
EA       NOP
A6 A6    LDX $A6
Clobbers X, and Z&N
EA       NOP
A4 A4    LDY $A4
Clobbers Y, and Z&N
4 bytes
EA       NOP
4C xx xx JMP *+3
No requirements
  • abs-indexed modes such as LDA $1234,X cause 4 or 5 cycles of delay, depending whether a page wrap occurred. Because you need extra setup code to make sure that a wrap does occur, you do not see this mode in these samples, outside situations where circumstances permit.


6 cycles

3 bytes
EA   ... NOP      × 3
No requirements
  • zp-indexed RMW instructions such as INC @zptemp,X do 6 cycles. Unless we know the value of X, it might write into any address between $00-$FF. This option is only useful if the entire range of $00-$FF is free for clobbering with random data, or if X has a known value.
  • ix instructions like LDA ($00,X) do 6 cycles, but the value of X decides where a pointer is read from, and said pointer can point anywhere. We only do that when the value of X is known.
  • iy instructions like LDA ($00),Y also do 5-6 cycles, but in addition to the note above, we cannot predict whether a wrap occurs or not. So we don't use this mode.
  • Absolute RMW instructions like INC $4018 do 6 cycles, but weighing 3 bytes with side-effects it would be inferior to 3 × NOP.


7 cycles

2 bytes
08       PHP
28       PLP
No requirements
  • PHP-PLP is very efficient for 7 cycles of delay, but it does modify stack contents. S register remains unchanged though.
  • PLA-PHA does not overwrite any bytes in stack. It just writes back the same byte. But it does clobber A and Z+N. It is not interrupt-unsafe either: If an interrupt happens, the stack byte does get temporarily clobbered, but the value is still in A when the interrupt exits, and gets written back in stack.
  • abs-indexed RMW instructions such as INC abs,X do 7 cycles. We only do this when either we know the value of X (for instance, INC $4018,X is safe when X is 0—7, or when the entire 256-byte page can be safely overwritten with random data.


8 cycles

4 bytes
EA   ... NOP      × 4
No requirements
  • Unofficial ix and iy RMW instructions such as SLO ($00,X) or SLO ($00),Y would do 8 cycles for 2 bytes of code. We only do that if we know X or Y to be zero, and we have a known pointer to safely rewritable data.


9 cycles

3 bytes
EA       NOP
08       PHP
28       PLP
No requirements
  • Jumping into the middle of another instruction and thereby reusing code is a very efficient way of reducing code size. Note that all code samples using branches on this page require that no page wrap occurs.


10 cycles

4 bytes
08       PHP
C5 C5    CMP $C5
28       PLP
No requirements
  • The ROL-ROR sequence preserves the original value of the memory address. Carry is also preserved.


11 cycles

4 bytes
EA   ... NOP      × 2
08       PHP
28       PLP
No requirements


12 cycles

3 bytes
20 xx xx JSR @rts12
Requires @rts12
4 bytes
36 36    ROL $36,X
76 36    ROR $36,X
Clobbers Z&N
5 bytes
08       PHP
18       CLC
90 00    BCC *+2
28       PLP
No requirements
  • JSR-RTS causes 12 cycles of delay. But it does write a function return address in the stack, which may be unwanted in some applications. S is not modified.
  • Again, ROL-ROR does not have side effects (as long as an interrupt does not happen in the middle), except for Z+N.


13 cycles

5 bytes
EA   ... NOP      × 3
08       PHP
28       PLP
No requirements


14 cycles

4 bytes
08       PHP       \ × 2
28       PLP       /
No requirements


15 cycles

5 bytes
08       PHP
BA       TSX
28       PLP
9A       TXS
28       PLP
Clobbers X
C5 C5    CMP $C5
20 xx xx JSR @rts12
Clobbers Z&N, and C; and requires @rts12
24 24    BIT $24
20 xx xx JSR @rts12
Clobbers Z&N, and V; and requires @rts12
A5 A5    LDA $A5
20 xx xx JSR @rts12
Clobbers A, and Z&N; and requires @rts12
A4 A4    LDY $A4
20 xx xx JSR @rts12
Clobbers Y, and Z&N; and requires @rts12
6 bytes
08       PHP
28       PLP
EA   ... NOP      × 4
No requirements


16 cycles

5 bytes
EA       NOP
08       PHP       \ × 2
28       PLP       /
No requirements


17 cycles

6 bytes
08       PHP
48       PHA
A5 A5    LDA $A5
68       PLA
28       PLP
No requirements


18 cycles

6 bytes
EA   ... NOP      × 2
08       PHP       \ × 2
28       PLP       /
No requirements


19 cycles

5 bytes
08       PHP
28       PLP
20 xx xx JSR @rts12
Requires @rts12
6 bytes
08       PHP
36 36    ROL $36,X
76 36    ROR $36,X
28       PLP
No requirements


20 cycles

5 bytes
A9 2A    LDA #$2A ;hides 'ROL A'
38       SEC
10 FC    BPL *-2
Clobbers A, Z&N, and C
7 bytes
EA   ... NOP      × 3
08       PHP       \ × 2
28       PLP       /
No requirements


21 cycles

5 bytes
18       CLC
A9 2A    LDA #$2A ;hides 'ROL A'
90 FD    BCC *-1
Clobbers A, Z&N, and C
A2 04    LDX #4
CA       DEX
D0 FD    BNE *-1
Clobbers X, and Z&N
A0 04    LDY #4
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
6 bytes
08       PHP       \ × 3
28       PLP       /
No requirements


22 cycles

6 bytes
18       CLC
A9 2A    LDA #$2A ;hides 'ROL A'
38       SEC
10 FC    BPL *-2
Clobbers A, Z&N, and C
A2 02    LDX #2
EA       NOP
CA       DEX
10 FC    BPL *-2
Clobbers X, and Z&N
A0 03    LDY #3
EA       NOP
88       DEY
D0 FC    BNE *-2
Clobbers Y, and Z&N
7 bytes
08       PHP
BA       TSX
08       PHP
28   ... PLP      × 2
9A       TXS
28       PLP
Clobbers X
08       PHP
C5 C5    CMP $C5
28       PLP
20 xx xx JSR @rts12
Requires @rts12
8 bytes
08       PHP       \ × 2
28       PLP       /
EA   ... NOP      × 4
No requirements


23 cycles

6 bytes
18   ... CLC      × 2
A9 2A    LDA #$2A ;hides 'ROL A'
90 FD    BCC *-1
Clobbers A, Z&N, and C
EA       NOP
A2 04    LDX #4
CA       DEX
D0 FD    BNE *-1
Clobbers X, and Z&N
EA       NOP
A0 04    LDY #4
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
7 bytes
EA       NOP
08       PHP       \ × 3
28       PLP       /
No requirements


24 cycles

4 bytes
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
Clobbers A, Z&N, and C
6 bytes
20 xx xx JSR @rts12× 2
Requires @rts12
7 bytes
A6 A6    LDX $A6
A2 04    LDX #4
CA       DEX
D0 FD    BNE *-1
Clobbers X, and Z&N
A4 A4    LDY $A4
A0 04    LDY #4
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
8 bytes
08       PHP
C5 C5    CMP $C5
28       PLP       \ × 2
08       PHP       /
28       PLP
No requirements


25 cycles

7 bytes
98       TYA
A0 04    LDY #4
88       DEY
D0 FD    BNE *-1
A8       TAY
Clobbers A, and Z&N
EA   ... NOP      × 2
A2 04    LDX #4
CA       DEX
D0 FD    BNE *-1
Clobbers X, and Z&N
EA   ... NOP      × 2
A0 04    LDY #4
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
8 bytes
EA   ... NOP      × 2
08       PHP       \ × 3
28       PLP       /
No requirements


26 cycles

5 bytes
18       CLC
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
Clobbers A, Z&N, and C
A2 04    LDX #4
CA       DEX
10 FD    BPL *-1
Clobbers X, and Z&N
A0 05    LDY #5
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
7 bytes
EA       NOP
20 xx xx JSR @rts12× 2
Requires @rts12
8 bytes
08       PHP
48       PHA
36 36    ROL $36,X
76 36    ROR $36,X
68       PLA
28       PLP
No requirements


27 cycles

6 bytes
A5 A5    LDA $A5
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
Clobbers A, Z&N, and C
7 bytes
48       PHA
A9 2A    LDA #$2A ;hides 'ROL A'
38       SEC
10 FC    BPL *-2
68       PLA
Clobbers Z&N, and C
08       PHP
A9 2A    LDA #$2A ;hides 'ROL A'
38       SEC
10 FC    BPL *-2
28       PLP
Clobbers A
24 2C    BIT <$2C ;hides 'BIT $FDA2'
A2 FD    LDX #253
E8       INX
D0 FA    BNE *-4
Clobbers X, Z&N, and V
24 2C    BIT <$2C ;hides 'BIT $FDA0'
A0 FD    LDY #253
C8       INY
D0 FA    BNE *-4
Clobbers Y, Z&N, and V
A4 AC    LDY <$AC ;hides 'LDY $82A2'
A2 82    LDX #130
CA       DEX
30 FA    BMI *-4
Clobbers X, Y, and Z&N
8 bytes
EA   ... NOP      × 3
A2 04    LDX #4
CA       DEX
D0 FD    BNE *-1
Clobbers X, and Z&N
EA   ... NOP      × 3
A0 04    LDY #4
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
24 24    BIT $24
20 xx xx JSR @rts12× 2
Clobbers Z&N, and V; and requires @rts12
20 xx xx JSR @rts12
08       PHP
BA       TSX
28       PLP
9A       TXS
28       PLP
Clobbers X; and requires @rts12
9 bytes
EA   ... NOP      × 3
08       PHP       \ × 3
28       PLP       /
No requirements


28 cycles

6 bytes
38   ... SEC      × 2
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
Clobbers A, Z&N, and C
EA       NOP
A2 04    LDX #4
CA       DEX
10 FD    BPL *-1
Clobbers X, and Z&N
EA       NOP
A0 05    LDY #5
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
7 bytes
48       PHA
18       CLC
A9 2A    LDA #$2A ;hides 'ROL A'
90 FD    BCC *-1
68       PLA
Clobbers Z&N, and C
08       PHP
18       CLC
A9 2A    LDA #$2A ;hides 'ROL A'
90 FD    BCC *-1
28       PLP
Clobbers A
08       PHP
A2 04    LDX #4
CA       DEX
D0 FD    BNE *-1
28       PLP
Clobbers X
08       PHP
A0 04    LDY #4
88       DEY
D0 FD    BNE *-1
28       PLP
Clobbers Y
8 bytes
08       PHP       \ × 4
28       PLP       /
No requirements


29 cycles

6 bytes
18       CLC
A9 2A    LDA #$2A ;hides 'ROL A'
EA       NOP
90 FC    BCC *-2
Clobbers A, Z&N, and C
A2 04    LDX #4
EA       NOP
CA       DEX
D0 FC    BNE *-2
Clobbers X, and Z&N
A0 04    LDY #4
EA       NOP
88       DEY
D0 FC    BNE *-2
Clobbers Y, and Z&N
8 bytes
48       PHA
18       CLC
A9 2A    LDA #$2A ;hides 'ROL A'
38       SEC
10 FC    BPL *-2
68       PLA
Clobbers Z&N, and C
08       PHP
18       CLC
A9 2A    LDA #$2A ;hides 'ROL A'
38       SEC
10 FC    BPL *-2
28       PLP
Clobbers A
08       PHP
A2 02    LDX #2
EA       NOP
CA       DEX
10 FC    BPL *-2
28       PLP
Clobbers X
08       PHP
A0 03    LDY #3
EA       NOP
88       DEY
D0 FC    BNE *-2
28       PLP
Clobbers Y
9 bytes
08       PHP
28       PLP
08       PHP
C5 C5    CMP $C5
28       PLP
20 xx xx JSR @rts12
Requires @rts12
10 bytes
08       PHP
C5 C5    CMP $C5
28       PLP
08       PHP
36 36    ROL $36,X
76 36    ROR $36,X
28       PLP
No requirements


30 cycles

7 bytes
98       TYA
A0 05    LDY #5
88       DEY
D0 FD    BNE *-1
A8       TAY
Clobbers A, and Z&N
EA   ... NOP      × 2
A2 04    LDX #4
CA       DEX
10 FD    BPL *-1
Clobbers X, and Z&N
EA   ... NOP      × 2
A0 05    LDY #5
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
8 bytes
48       PHA
18   ... CLC      × 2
A9 2A    LDA #$2A ;hides 'ROL A'
90 FD    BCC *-1
68       PLA
Clobbers Z&N, and C
08       PHP
18   ... CLC      × 2
A9 2A    LDA #$2A ;hides 'ROL A'
90 FD    BCC *-1
28       PLP
Clobbers A
EA       NOP
08       PHP
A2 04    LDX #4
CA       DEX
D0 FD    BNE *-1
28       PLP
Clobbers X
EA       NOP
08       PHP
A0 04    LDY #4
88       DEY
D0 FD    BNE *-1
28       PLP
Clobbers Y
9 bytes
08       PHP
48       PHA
18       CLC
A9 6A    LDA #$6A ;hides 'ROR A'
90 FD    BCC *-1
68       PLA
28       PLP
No requirements


31 cycles

5 bytes
18       CLC
A9 0A    LDA #$0A ;hides 'ASL A'
90 FD    BCC *-1
Clobbers A, Z&N, and C
A2 05    LDX #5
CA       DEX
10 FD    BPL *-1
Clobbers X, and Z&N
A0 06    LDY #6
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
6 bytes
48       PHA
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
68       PLA
Clobbers Z&N, and C
08       PHP
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
28       PLP
Clobbers A
8 bytes
08       PHP
28       PLP
20 xx xx JSR @rts12× 2
Requires @rts12
9 bytes
08       PHP
A6 A6    LDX $A6
A2 04    LDX #4
CA       DEX
D0 FD    BNE *-1
28       PLP
Clobbers X
08       PHP
A4 A4    LDY $A4
A0 04    LDY #4
88       DEY
D0 FD    BNE *-1
28       PLP
Clobbers Y
10 bytes
08       PHP
36 36    ROL $36,X \ × 2
76 36    ROR $36,X /
28       PLP
No requirements


32 cycles

6 bytes
A2 05    LDX #5 ;hides 'ORA zp'
CA       DEX ;first loop only
CA       DEX
D0 FB    BNE *-3
Clobbers A, X, and Z&N
A0 05    LDY #5 ;hides 'ORA zp'
88       DEY ;first loop only
88       DEY
D0 FB    BNE *-3
Clobbers A, Y, and Z&N
7 bytes
A9 2A    LDA #$2A ;hides 'ROL A'
EA   ... NOP      × 3
10 FA    BPL *-4
Clobbers A, Z&N, and C
8 bytes
EA       NOP
98       TYA
A0 05    LDY #5
88       DEY
D0 FD    BNE *-1
A8       TAY
Clobbers A, and Z&N
A6 A6    LDX $A6
A2 04    LDX #4
EA       NOP
CA       DEX
D0 FC    BNE *-2
Clobbers X, and Z&N
A4 A4    LDY $A4
A0 04    LDY #4
EA       NOP
88       DEY
D0 FC    BNE *-2
Clobbers Y, and Z&N
9 bytes
48       PHA
98       TYA
A0 04    LDY #4
88       DEY
D0 FD    BNE *-1
A8       TAY
68       PLA
Clobbers Z&N
08       PHP
98       TYA
A0 04    LDY #4
88       DEY
D0 FD    BNE *-1
A8       TAY
28       PLP
Clobbers A
EA   ... NOP      × 2
08       PHP
A2 04    LDX #4
CA       DEX
D0 FD    BNE *-1
28       PLP
Clobbers X
EA   ... NOP      × 2
08       PHP
A0 04    LDY #4
88       DEY
D0 FD    BNE *-1
28       PLP
Clobbers Y
10 bytes
08       PHP
48       PHA
18   ... CLC      × 2
A9 6A    LDA #$6A ;hides 'ROR A'
90 FD    BCC *-1
68       PLA
28       PLP
No requirements


33 cycles

6 bytes
18   ... CLC      × 2
A9 0A    LDA #$0A ;hides 'ASL A'
90 FD    BCC *-1
Clobbers A, Z&N, and C
EA       NOP
A2 05    LDX #5
CA       DEX
10 FD    BPL *-1
Clobbers X, and Z&N
EA       NOP
A0 06    LDY #6
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
7 bytes
48       PHA
18       CLC
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
68       PLA
Clobbers Z&N, and C
08       PHP
18       CLC
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
28       PLP
Clobbers A
08       PHP
A2 04    LDX #4
CA       DEX
10 FD    BPL *-1
28       PLP
Clobbers X
08       PHP
A0 05    LDY #5
88       DEY
D0 FD    BNE *-1
28       PLP
Clobbers Y
9 bytes
EA       NOP
08       PHP
28       PLP
20 xx xx JSR @rts12× 2
Requires @rts12
10 bytes
08       PHP       \ × 2
28       PLP       /
08       PHP
36 36    ROL $36,X
76 36    ROR $36,X
28       PLP
No requirements


34 cycles

5 bytes
A9 0A    LDA #$0A ;hides 'ASL A'
18       CLC
10 FC    BPL *-2
Clobbers A, Z&N, and C
A0 88    LDY #136 ;hides 'DEY'
88       DEY
30 FC    BMI *-2
Clobbers Y, and Z&N
7 bytes
A6 A6    LDX $A6
A2 05    LDX #5
CA       DEX
10 FD    BPL *-1
Clobbers X, and Z&N
8 bytes
C5 C5    CMP $C5
48       PHA
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
68       PLA
Clobbers Z&N, and C
08       PHP
A5 A5    LDA $A5
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
28       PLP
Clobbers A
9 bytes
08       PHP
48       PHA
A9 2A    LDA #$2A ;hides 'ROL A'
38       SEC
10 FC    BPL *-2
68       PLA
28       PLP
No requirements


35 cycles

6 bytes
A9 2A    LDA #$2A ;hides 'ROL A'
08       PHP
28       PLP
10 FB    BPL *-3
Clobbers A, Z&N, and C
A2 F8    LDX #248 ;hides 'SED'
E8   ... INX      × 2
D0 FB    BNE *-3
Clobbers X, Z&N, and D
A0 88    LDY #136 ;hides 'DEY'
88   ... DEY      × 2
30 FB    BMI *-3
Clobbers Y, and Z&N
7 bytes
98       TYA
A0 06    LDY #6
88       DEY
D0 FD    BNE *-1
A8       TAY
Clobbers A, and Z&N
EA   ... NOP      × 2
A2 05    LDX #5
CA       DEX
10 FD    BPL *-1
Clobbers X, and Z&N
8 bytes
48       PHA
38   ... SEC      × 2
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
68       PLA
Clobbers Z&N, and C
08       PHP
38   ... SEC      × 2
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
28       PLP
Clobbers A
EA       NOP
08       PHP
A2 04    LDX #4
CA       DEX
10 FD    BPL *-1
28       PLP
Clobbers X
EA       NOP
08       PHP
A0 05    LDY #5
88       DEY
D0 FD    BNE *-1
28       PLP
Clobbers Y
9 bytes
08       PHP
48       PHA
18       CLC
A9 2A    LDA #$2A ;hides 'ROL A'
90 FD    BCC *-1
68       PLA
28       PLP
No requirements


36 cycles

5 bytes
A9 E9    LDA #$E9 ;hides 'SBC #$2A'
2A       ROL A ;first loop only
B0 FC    BCS *-2
Clobbers A, Z&N, C, and V
A2 07    LDX #7
CA       DEX
D0 FD    BNE *-1
Clobbers X, and Z&N
A0 06    LDY #6
88       DEY
10 FD    BPL *-1
Clobbers Y, and Z&N
6 bytes
38       SEC
A9 0A    LDA #$0A ;hides 'ASL A'
38       SEC
10 FC    BPL *-2
Clobbers A, Z&N, and C
8 bytes
48       PHA
18       CLC
A9 2A    LDA #$2A ;hides 'ROL A'
EA       NOP
90 FC    BCC *-2
68       PLA
Clobbers Z&N, and C
08       PHP
18       CLC
A9 2A    LDA #$2A ;hides 'ROL A'
EA       NOP
90 FC    BCC *-2
28       PLP
Clobbers A
08       PHP
A2 04    LDX #4
EA       NOP
CA       DEX
D0 FC    BNE *-2
28       PLP
Clobbers X
08       PHP
A0 04    LDY #4
EA       NOP
88       DEY
D0 FC    BNE *-2
28       PLP
Clobbers Y
9 bytes
20 xx xx JSR @rts12× 3
Requires @rts12
10 bytes
08       PHP
48       PHA
18       CLC
A9 2A    LDA #$2A ;hides 'ROL A'
38       SEC
10 FC    BPL *-2
68       PLA
28       PLP
No requirements


37 cycles

7 bytes
A5 A5    LDA $A5
A9 0A    LDA #$0A ;hides 'ASL A'
18       CLC
10 FC    BPL *-2
Clobbers A, Z&N, and C
A2 04    LDX #4
EA   ... NOP      × 2
CA       DEX
D0 FB    BNE *-3
Clobbers X, and Z&N
A0 04    LDY #4
EA   ... NOP      × 2
88       DEY
D0 FB    BNE *-3
Clobbers Y, and Z&N
8 bytes
EA       NOP
98       TYA
A0 06    LDY #6
88       DEY
D0 FD    BNE *-1
A8       TAY
Clobbers A, and Z&N
9 bytes
48       PHA
98       TYA
A0 05    LDY #5
88       DEY
D0 FD    BNE *-1
A8       TAY
68       PLA
Clobbers Z&N
08       PHP
98       TYA
A0 05    LDY #5
88       DEY
D0 FD    BNE *-1
A8       TAY
28       PLP
Clobbers A
EA   ... NOP      × 2
08       PHP
A2 04    LDX #4
CA       DEX
10 FD    BPL *-1
28       PLP
Clobbers X
EA   ... NOP      × 2
08       PHP
A0 05    LDY #5
88       DEY
D0 FD    BNE *-1
28       PLP
Clobbers Y
10 bytes
08       PHP
48       PHA
18   ... CLC      × 2
A9 2A    LDA #$2A ;hides 'ROL A'
90 FD    BCC *-1
68       PLA
28       PLP
No requirements


38 cycles

6 bytes
38       SEC
A9 69    LDA #$69 ;hides 'ADC #$EA'
EA       NOP ;first loop only
B0 FC    BCS *-2
Clobbers A, Z&N, C, and V
EA       NOP
A2 07    LDX #7
CA       DEX
D0 FD    BNE *-1
Clobbers X, and Z&N
EA       NOP
A0 06    LDY #6
88       DEY
10 FD    BPL *-1
Clobbers Y, and Z&N
7 bytes
48       PHA
18       CLC
A9 0A    LDA #$0A ;hides 'ASL A'
90 FD    BCC *-1
68       PLA
Clobbers Z&N, and C
08       PHP
18       CLC
A9 0A    LDA #$0A ;hides 'ASL A'
90 FD    BCC *-1
28       PLP
Clobbers A
08       PHP
A2 05    LDX #5
CA       DEX
10 FD    BPL *-1
28       PLP
Clobbers X
08       PHP
A0 06    LDY #6
88       DEY
D0 FD    BNE *-1
28       PLP
Clobbers Y
8 bytes
08       PHP
48       PHA
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
68       PLA
28       PLP
No requirements


39 cycles

4 bytes
A9 4A    LDA #$4A ;hides 'LSR A'
D0 FD    BNE *-1
Clobbers A, Z&N, and C
7 bytes
A6 A6    LDX $A6
A2 07    LDX #7
CA       DEX
D0 FD    BNE *-1
Clobbers X, and Z&N
A4 A4    LDY $A4
A0 06    LDY #6
88       DEY
10 FD    BPL *-1
Clobbers Y, and Z&N
8 bytes
98       TYA
A0 88    LDY #136 ;hides 'DEY'
88   ... DEY      × 2
30 FB    BMI *-3
A8       TAY
Clobbers A, and Z&N
08       PHP
A2 05    LDX #5 ;hides 'ORA zp'
CA       DEX ;first loop only
CA       DEX
D0 FB    BNE *-3
28       PLP
Clobbers A, and X
08       PHP
A0 05    LDY #5 ;hides 'ORA zp'
88       DEY ;first loop only
88       DEY
D0 FB    BNE *-3
28       PLP
Clobbers A, and Y
9 bytes
48       PHA
A9 2A    LDA #$2A ;hides 'ROL A'
EA   ... NOP      × 3
10 FA    BPL *-4
68       PLA
Clobbers Z&N, and C
08       PHP
A9 2A    LDA #$2A ;hides 'ROL A'
EA   ... NOP      × 3
10 FA    BPL *-4
28       PLP
Clobbers A
10 bytes
EA       NOP
48       PHA
98       TYA
A0 05    LDY #5
88       DEY
D0 FD    BNE *-1
A8       TAY
68       PLA
Clobbers Z&N
08       PHP
A6 A6    LDX $A6
A2 04    LDX #4
EA       NOP
CA       DEX
D0 FC    BNE *-2
28       PLP
Clobbers X
08       PHP
A4 A4    LDY $A4
A0 04    LDY #4
EA       NOP
88       DEY
D0 FC    BNE *-2
28       PLP
Clobbers Y
11 bytes
08       PHP
48       PHA
98       TYA
A0 04    LDY #4
88       DEY
D0 FD    BNE *-1
A8       TAY
68       PLA
28       PLP
No requirements


40 cycles

6 bytes
A2 05    LDX #5 ;hides 'ORA zp'
EA       NOP
CA       DEX
D0 FB    BNE *-3
Clobbers A, X, and Z&N
A0 05    LDY #5 ;hides 'ORA zp'
EA       NOP
88       DEY
D0 FB    BNE *-3
Clobbers A, Y, and Z&N
7 bytes
98       TYA
A0 06    LDY #6
88       DEY
10 FD    BPL *-1
A8       TAY
Clobbers A, and Z&N
EA   ... NOP      × 2
A2 07    LDX #7
CA       DEX
D0 FD    BNE *-1
Clobbers X, and Z&N
EA   ... NOP      × 2
A0 06    LDY #6
88       DEY
10 FD    BPL *-1
Clobbers Y, and Z&N
8 bytes
48       PHA
18   ... CLC      × 2
A9 0A    LDA #$0A ;hides 'ASL A'
90 FD    BCC *-1
68       PLA
Clobbers Z&N, and C
08       PHP
18   ... CLC      × 2
A9 0A    LDA #$0A ;hides 'ASL A'
90 FD    BCC *-1
28       PLP
Clobbers A
EA       NOP
08       PHP
A2 05    LDX #5
CA       DEX
10 FD    BPL *-1
28       PLP
Clobbers X
EA       NOP
08       PHP
A0 06    LDY #6
88       DEY
D0 FD    BNE *-1
28       PLP
Clobbers Y
9 bytes
08       PHP
48       PHA
18       CLC
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
68       PLA
28       PLP
No requirements


41 cycles

5 bytes
38       SEC
A9 4A    LDA #$4A ;hides 'LSR A'
D0 FD    BNE *-1
Clobbers A, Z&N, and C
A2 08    LDX #8
CA       DEX
D0 FD    BNE *-1
Clobbers X, and Z&N
A0 08    LDY #8
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
7 bytes
48       PHA
A9 0A    LDA #$0A ;hides 'ASL A'
18       CLC
10 FC    BPL *-2
68       PLA
Clobbers Z&N, and C
08       PHP
A9 0A    LDA #$0A ;hides 'ASL A'
18       CLC
10 FC    BPL *-2
28       PLP
Clobbers A
08       PHP
A0 88    LDY #136 ;hides 'DEY'
88       DEY
30 FC    BMI *-2
28       PLP
Clobbers Y
9 bytes
08       PHP
A6 A6    LDX $A6
A2 05    LDX #5
CA       DEX
10 FD    BPL *-1
28       PLP
Clobbers X
10 bytes
08       PHP
48       PHA
A5 A5    LDA $A5
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
68       PLA
28       PLP
No requirements


42 cycles

6 bytes
A5 A5    LDA $A5
A9 4A    LDA #$4A ;hides 'LSR A'
D0 FD    BNE *-1
Clobbers A, Z&N, and C
7 bytes
EA       NOP
A2 05    LDX #5 ;hides 'ORA zp'
EA       NOP
CA       DEX
D0 FB    BNE *-3
Clobbers A, X, and Z&N
EA       NOP
A0 05    LDY #5 ;hides 'ORA zp'
EA       NOP
88       DEY
D0 FB    BNE *-3
Clobbers A, Y, and Z&N
8 bytes
48       PHA
A9 2A    LDA #$2A ;hides 'ROL A'
08       PHP
28       PLP
10 FB    BPL *-3
68       PLA
Clobbers Z&N, and C
08       PHP
A9 2A    LDA #$2A ;hides 'ROL A'
08       PHP
28       PLP
10 FB    BPL *-3
28       PLP
Clobbers A
08       PHP
A2 F8    LDX #248 ;hides 'SED'
E8   ... INX      × 2
D0 FB    BNE *-3
28       PLP
Clobbers X
08       PHP
A0 88    LDY #136 ;hides 'DEY'
88   ... DEY      × 2
30 FB    BMI *-3
28       PLP
Clobbers Y
9 bytes
48       PHA
98       TYA
A0 06    LDY #6
88       DEY
D0 FD    BNE *-1
A8       TAY
68       PLA
Clobbers Z&N
10 bytes
08       PHP
48       PHA
38   ... SEC      × 2
A9 0A    LDA #$0A ;hides 'ASL A'
10 FD    BPL *-1
68       PLA
28       PLP
No requirements


43 cycles

6 bytes
38   ... SEC      × 2
A9 4A    LDA #$4A ;hides 'LSR A'
D0 FD    BNE *-1
Clobbers A, Z&N, and C
A2 05    LDX #5
EA       NOP
CA       DEX
10 FC    BPL *-2
Clobbers X, and Z&N
A0 06    LDY #6
EA       NOP
88       DEY
D0 FC    BNE *-2
Clobbers Y, and Z&N
7 bytes
48       PHA
A9 E9    LDA #$E9 ;hides 'SBC #$2A'
2A       ROL A ;first loop only
B0 FC    BCS *-2
68       PLA
Clobbers Z&N, C, and V
08       PHP
A9 E9    LDA #$E9 ;hides 'SBC #$2A'
2A       ROL A ;first loop only
B0 FC    BCS *-2
28       PLP
Clobbers A
08       PHP
A2 07    LDX #7
CA       DEX
D0 FD    BNE *-1
28       PLP
Clobbers X
08       PHP
A0 06    LDY #6
88       DEY
10 FD    BPL *-1
28       PLP
Clobbers Y
8 bytes
48       PHA
38       SEC
A9 0A    LDA #$0A ;hides 'ASL A'
38       SEC
10 FC    BPL *-2
68       PLA
Clobbers Z&N, and C
10 bytes
08       PHP
48       PHA
18       CLC
A9 2A    LDA #$2A ;hides 'ROL A'
EA       NOP
90 FC    BCC *-2
68       PLA
28       PLP
No requirements


44 cycles

6 bytes
A9 0A    LDA #$0A ;hides 'ASL A'
EA   ... NOP      × 2
10 FB    BPL *-3
Clobbers A, Z&N, and C
A0 88    LDY #136 ;hides 'DEY'
EA       NOP
88       DEY
30 FB    BMI *-3
Clobbers Y, and Z&N
7 bytes
A6 A6    LDX $A6
A2 08    LDX #8
CA       DEX
D0 FD    BNE *-1
Clobbers X, and Z&N
9 bytes
C5 C5    CMP $C5
48       PHA
A9 0A    LDA #$0A ;hides 'ASL A'
18       CLC
10 FC    BPL *-2
68       PLA
Clobbers Z&N, and C
08       PHP
A5 A5    LDA $A5
A9 0A    LDA #$0A ;hides 'ASL A'
18       CLC
10 FC    BPL *-2
28       PLP
Clobbers A
08       PHP
A2 04    LDX #4
EA   ... NOP      × 2
CA       DEX
D0 FB    BNE *-3
28       PLP
Clobbers X
08       PHP
A0 04    LDY #4
EA   ... NOP      × 2
88       DEY
D0 FB    BNE *-3
28       PLP
Clobbers Y
10 bytes
EA       NOP
48       PHA
98       TYA
A0 06    LDY #6
88       DEY
D0 FD    BNE *-1
A8       TAY
68       PLA
Clobbers Z&N
11 bytes
08       PHP
48       PHA
98       TYA
A0 05    LDY #5
88       DEY
D0 FD    BNE *-1
A8       TAY
68       PLA
28       PLP
No requirements


45 cycles

7 bytes
98       TYA
A0 08    LDY #8
88       DEY
D0 FD    BNE *-1
A8       TAY
Clobbers A, and Z&N
EA   ... NOP      × 2
A2 08    LDX #8
CA       DEX
D0 FD    BNE *-1
Clobbers X, and Z&N
EA   ... NOP      × 2
A0 08    LDY #8
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
8 bytes
48       PHA
38       SEC
A9 69    LDA #$69 ;hides 'ADC #$EA'
EA       NOP ;first loop only
B0 FC    BCS *-2
68       PLA
Clobbers Z&N, C, and V
08       PHP
38       SEC
A9 69    LDA #$69 ;hides 'ADC #$EA'
EA       NOP ;first loop only
B0 FC    BCS *-2
28       PLP
Clobbers A
EA       NOP
08       PHP
A2 07    LDX #7
CA       DEX
D0 FD    BNE *-1
28       PLP
Clobbers X
EA       NOP
08       PHP
A0 06    LDY #6
88       DEY
10 FD    BPL *-1
28       PLP
Clobbers Y
9 bytes
08       PHP
48       PHA
18       CLC
A9 0A    LDA #$0A ;hides 'ASL A'
90 FD    BCC *-1
68       PLA
28       PLP
No requirements


46 cycles

5 bytes
A2 08    LDX #8
CA       DEX
10 FD    BPL *-1
Clobbers X, and Z&N
A0 09    LDY #9
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
6 bytes
48       PHA
A9 4A    LDA #$4A ;hides 'LSR A'
D0 FD    BNE *-1
68       PLA
Clobbers Z&N, and C
08       PHP
A9 4A    LDA #$4A ;hides 'LSR A'
D0 FD    BNE *-1
28       PLP
Clobbers A
9 bytes
08       PHP
A6 A6    LDX $A6
A2 07    LDX #7
CA       DEX
D0 FD    BNE *-1
28       PLP
Clobbers X
08       PHP
A4 A4    LDY $A4
A0 06    LDY #6
88       DEY
10 FD    BPL *-1
28       PLP
Clobbers Y
10 bytes
48       PHA
98       TYA
A0 88    LDY #136 ;hides 'DEY'
88   ... DEY      × 2
30 FB    BMI *-3
A8       TAY
68       PLA
Clobbers Z&N
11 bytes
08       PHP
48       PHA
A9 2A    LDA #$2A ;hides 'ROL A'
EA   ... NOP      × 3
10 FA    BPL *-4
68       PLA
28       PLP
No requirements


47 cycles

8 bytes
98       TYA
A0 06    LDY #6
EA       NOP
88       DEY
D0 FC    BNE *-2
A8       TAY
Clobbers A, and Z&N
EA   ... NOP      × 3
A2 08    LDX #8
CA       DEX
D0 FD    BNE *-1
Clobbers X, and Z&N
08       PHP
A2 05    LDX #5 ;hides 'ORA zp'
EA       NOP
CA       DEX
D0 FB    BNE *-3
28       PLP
Clobbers A, and X
EA   ... NOP      × 3
A0 08    LDY #8
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
08       PHP
A0 05    LDY #5 ;hides 'ORA zp'
EA       NOP
88       DEY
D0 FB    BNE *-3
28       PLP
Clobbers A, and Y
9 bytes
48       PHA
98       TYA
A0 06    LDY #6
88       DEY
10 FD    BPL *-1
A8       TAY
68       PLA
Clobbers Z&N
08       PHP
98       TYA
A0 06    LDY #6
88       DEY
10 FD    BPL *-1
A8       TAY
28       PLP
Clobbers A
EA   ... NOP      × 2
08       PHP
A2 07    LDX #7
CA       DEX
D0 FD    BNE *-1
28       PLP
Clobbers X
EA   ... NOP      × 2
08       PHP
A0 06    LDY #6
88       DEY
10 FD    BPL *-1
28       PLP
Clobbers Y
10 bytes
08       PHP
48       PHA
18   ... CLC      × 2
A9 0A    LDA #$0A ;hides 'ASL A'
90 FD    BCC *-1
68       PLA
28       PLP
No requirements


48 cycles

6 bytes
EA       NOP
A2 08    LDX #8
CA       DEX
10 FD    BPL *-1
Clobbers X, and Z&N
EA       NOP
A0 09    LDY #9
88       DEY
D0 FD    BNE *-1
Clobbers Y, and Z&N
7 bytes
48       PHA
38       SEC
A9 4A    LDA #$4A ;hides 'LSR A'
D0 FD    BNE *-1
68       PLA
Clobbers Z&N, and C
08       PHP
38       SEC
A9 4A    LDA #$4A ;hides 'LSR A'
D0 FD    BNE *-1
28       PLP
Clobbers A
08       PHP
A2 08    LDX #8
CA       DEX
D0 FD    BNE *-1
28       PLP
Clobbers X
08       PHP
A0 08    LDY #8
88       DEY
D0 FD    BNE *-1
28       PLP
Clobbers Y
9 bytes
08       PHP
48       PHA
A9 0A    LDA #$0A ;hides 'ASL A'
18       CLC
10 FC    BPL *-2
68       PLA
28       PLP
No requirements


49 cycles

4 bytes
A0 88    LDY #136 ;hides 'DEY'
30 FD    BMI *-1
Clobbers Y, and Z&N
7 bytes
18       CLC
A9 2A    LDA #$2A ;hides 'ROL A'
08       PHP
28       PLP
90 FB    BCC *-3
Clobbers A, Z&N, and C
A6 A6    LDX $A6
A2 08    LDX #8
CA       DEX
10 FD    BPL *-1
Clobbers X, and Z&N
8 bytes
C5 C5    CMP $C5
48       PHA
A9 4A    LDA #$4A ;hides 'LSR A'
D0 FD    BNE *-1
68       PLA
Clobbers Z&N, and C
08       PHP
A5 A5    LDA $A5
A9 4A    LDA #$4A ;hides 'LSR A'
D0 FD    BNE *-1
28       PLP
Clobbers A
10 bytes
08       PHP
48       PHA
A9 2A    LDA #$2A ;hides 'ROL A'
08       PHP
28       PLP
10 FB    BPL *-3
68       PLA
28       PLP
No requirements


50 cycles

6 bytes
A9 E9    LDA #$E9 ;hides 'SBC #$2A'
2A       ROL A ;first loop only
EA       NOP
B0 FB    BCS *-3
Clobbers A, Z&N, C, and V
A2 07    LDX #7
EA       NOP
CA       DEX
D0 FC    BNE *-2
Clobbers X, and Z&N
A0 06    LDY #6
EA       NOP
88       DEY
10 FC    BPL *-2
Clobbers Y, and Z&N
7 bytes
98       TYA
A0 09    LDY #9
88       DEY
D0 FD    BNE *-1
A8       TAY
Clobbers A, and Z&N
8 bytes
48       PHA
38   ... SEC      × 2
A9 4A    LDA #$4A ;hides 'LSR A'
D0 FD    BNE *-1
68       PLA
Clobbers Z&N, and C
08       PHP
38   ... SEC      × 2
A9 4A    LDA #$4A ;hides 'LSR A'
D0 FD    BNE *-1
28       PLP
Clobbers A
08       PHP
A2 05    LDX #5
EA       NOP
CA       DEX
10 FC    BPL *-2
28       PLP
Clobbers X
08       PHP
A0 06    LDY #6
EA       NOP
88       DEY
D0 FC    BNE *-2
28       PLP
Clobbers Y
9 bytes
08       PHP
48       PHA
A9 E9    LDA #$E9 ;hides 'SBC #$2A'
2A       ROL A ;first loop only
B0 FC    BCS *-2
68       PLA
28       PLP
No requirements


Sanity checks

It is possible to verify on compile time that no page wrap occurs, by replacing all branches with these macros:

.macro branch_check opc, dest
    opc dest
    .assert >* = >(dest), warning, "branch_check: failed, crosses page"
.endmacro
.macro bccnw dest
        branch_check bcc, dest
.endmacro
.macro bcsnw dest
        branch_check bcs, dest
.endmacro
.macro beqnw dest
        branch_check beq, dest
.endmacro
.macro bnenw dest
        branch_check bne, dest
.endmacro
.macro bminw dest
        branch_check bmi, dest
.endmacro
.macro bplnw dest
        branch_check bpl, dest
.endmacro
.macro bvcnw dest
        branch_check bvc, dest
.endmacro
.macro bvsnw dest
        branch_check bvs, dest
.endmacro

See also

  • Cycle counting
  • Delay code for functions that produce runtime-determined amount of delay
  • Bisqwit’s “vending machine” for producing a ca65-compatible delay_n macro for arbitrary number of cycles, with more fine-grained configurable constraints: http://bisqwit.iki.fi/utils/nesdelay.php The samples on this page are excerpts from files generated by this online tool.