Fixed cycle delay

From NESdev Wiki
Revision as of 01:57, 14 March 2016 by Bisqwit (talk | contribs) (add tesuji)
Jump to navigationJump to search

Delay code

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

All branch instructions assume that no page wrap occurs.

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 (RTS).
  • @rts14 means you know a memory address that contains a harmless 2-cycle instruction that fits your constraints (such as CLC, LDA #0, or NOP), followed by RTS.
  • @rts15 means you know a memory address that contains a JMP that jumps to another location that contains RTS.
  • Alternatively, @rts15 means you know a memory address that contains a harmless 3-cycle instruction that fits your constraints (such as LDA $00), followed by RTS.
  • @A, @X, @Y are local labels.

2 cycles

1 bytes
NOP
Clobbers nothing, requires nothing


3 cycles

1 bytes
PHA
Clobbers S
2 bytes
LDA $00
Clobbers A, and Z&N
BIT $00
Clobbers Z&N, and V
STA @zptemp
Requires @zptemp
NOP $00
Requires support for unofficial opcodes
3 bytes
JMP *+3
Clobbers nothing, requires nothing


4 cycles

1 bytes
PLA
Clobbers A, S, and Z&N
2 bytes
NOP
NOP
Clobbers nothing, requires nothing


5 cycles

2 bytes
NOP
PHA
Clobbers S
3 bytes
NOP
LDA $00
Clobbers A, and Z&N
NOP
BIT $00
Clobbers Z&N, and V
NOP
STA @zptemp
Requires @zptemp
NOP
NOP $00
Requires support for unofficial opcodes
4 bytes
NOP
JMP *+3
Clobbers nothing, requires nothing


6 cycles

2 bytes
PHA
PHA
Clobbers S
3 bytes
NOP
NOP
NOP
Clobbers nothing, requires nothing


7 cycles

2 bytes
PHP
PLP
Clobbers nothing, requires nothing


8 cycles

2 bytes
PLA
PLA
Clobbers A, S, and Z&N
3 bytes
TSX
PLA
TXS
Clobbers A, X, and Z&N
NOP
PHA
PHA
Clobbers S
4 bytes
NOP
NOP
NOP
NOP
Clobbers nothing, requires nothing


9 cycles

3 bytes
NOP
PHP
PLP
Clobbers nothing, requires nothing


10 cycles

3 bytes
PHA
PHP
PLP
Clobbers S
4 bytes
PHP
BIT $00
PLP
Clobbers nothing, requires nothing


11 cycles

3 bytes
PHA
PLA
PLA
Clobbers A, S, and Z&N
4 bytes
NOP
NOP
PHP
PLP
Clobbers nothing, requires nothing


12 cycles

3 bytes
JSR @rts12
Requires @rts12
PLA
PLA
PLA
Clobbers A, S, and Z&N
4 bytes
ROL $00,X
ROR $00,X
Clobbers Z&N
NOP
PHA
PHP
PLP
Clobbers S
5 bytes
NOP
PHP
BIT $00
PLP
Clobbers nothing, requires nothing


13 cycles

4 bytes
PHA
PHA
PHP
PLP
Clobbers S
5 bytes
NOP
NOP
NOP
PHP
PLP
Clobbers nothing, requires nothing


14 cycles

3 bytes
JSR @rts14
Requires @rts14
4 bytes
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


15 cycles

3 bytes
JSR @rts15
Requires @rts15
4 bytes
PHA
JSR @rts12
Clobbers S; and requires @rts12
PHA
PLA
PLA
PLA
Clobbers A, S, and Z&N
5 bytes
LDA $00
JSR @rts12
Clobbers A, and Z&N; and requires @rts12
PHA
TSX
PLA
TXS
PLA
Clobbers X, and Z&N
PHP
TSX
PLA
TXS
PLP
Clobbers A, and X
BIT $00
JSR @rts12
Clobbers Z&N, and V; and requires @rts12
STA @zptemp
JSR @rts12
Requires @zptemp, and @rts12
NOP
PHA
PHA
PHP
PLP
Clobbers S
NOP $00
JSR @rts12
Requires @rts12, and support for unofficial opcodes
6 bytes
NOP
NOP
NOP
NOP
PHP
PLP
Clobbers nothing, requires nothing


16 cycles

4 bytes
NOP
JSR @rts14
Requires @rts14
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
5 bytes
NOP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


17 cycles

4 bytes
NOP
JSR @rts15
Requires @rts15
PHA
JSR @rts14
Clobbers S; and requires @rts14
5 bytes
LDA $00
JSR @rts14
Clobbers A, and Z&N; and requires @rts14
BIT $00
JSR @rts14
Clobbers Z&N, and V; and requires @rts14
STA @zptemp
JSR @rts14
Requires @zptemp, and @rts14
PHA
PHP
PLP
PHP
PLP
Clobbers S
NOP $00
JSR @rts14
Requires @rts14, and support for unofficial opcodes
6 bytes
PHP
PLP
PHP
BIT $00
PLP
Clobbers nothing, requires nothing


18 cycles

4 bytes
PHA
JSR @rts15
Clobbers S; and requires @rts15
PLA
JSR @rts14
Clobbers A, S, and Z&N; and requires @rts14
5 bytes
LDA $00
JSR @rts15
Clobbers A, and Z&N; and requires @rts15
BIT $00
JSR @rts15
Clobbers Z&N, and V; and requires @rts15
NOP
NOP
JSR @rts14
Requires @rts14
STA @zptemp
JSR @rts15
Requires @zptemp, and @rts15
PHA
PHA
JSR @rts12
Clobbers S; and requires @rts12
NOP
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
NOP $00
JSR @rts15
Requires @rts15, and support for unofficial opcodes
6 bytes
NOP
NOP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


19 cycles

4 bytes
PLA
JSR @rts15
Clobbers A, S, and Z&N; and requires @rts15
5 bytes
PHP
PLP
JSR @rts12
Requires @rts12
NOP
NOP
JSR @rts15
Requires @rts15
PHA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
NOP
PHA
JSR @rts14
Clobbers S; and requires @rts14
6 bytes
PHP
ROL $00,X
ROR $00,X
PLP
Clobbers nothing, requires nothing


20 cycles

5 bytes
NOP
PHA
JSR @rts15
Clobbers S; and requires @rts15
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
PHA
PHA
JSR @rts14
Clobbers S; and requires @rts14
6 bytes
NOP
LDA $00
JSR @rts15
Clobbers A, and Z&N; and requires @rts15
TSX
PLA
PLA
PLA
PLA
TXS
Clobbers A, X, and Z&N
NOP
BIT $00
JSR @rts15
Clobbers Z&N, and V; and requires @rts15
NOP
NOP
NOP
JSR @rts14
Requires @rts14
NOP
STA @zptemp
JSR @rts15
Requires @zptemp, and @rts15
PHA
PHA
PHP
PLP
PHP
PLP
Clobbers S
NOP
NOP $00
JSR @rts15
Requires @rts15, and support for unofficial opcodes
7 bytes
NOP
NOP
NOP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


21 cycles

5 bytes
LDY #4
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #4
@X:
DEX
BNE @X
Clobbers X, and Z&N
PHP
PLP
JSR @rts14
Requires @rts14
PHA
PHA
JSR @rts15
Clobbers S; and requires @rts15
6 bytes
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


22 cycles

5 bytes
PHP
PLP
JSR @rts15
Requires @rts15
PLA
PLA
JSR @rts14
Clobbers A, S, and Z&N; and requires @rts14
6 bytes
LDY #3
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #3
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
PHA
PHP
PLP
JSR @rts12
Clobbers S; and requires @rts12
NOP
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
NOP
PHA
PHA
JSR @rts14
Clobbers S; and requires @rts14
7 bytes
PHP
BIT $00
PLP
JSR @rts12
Requires @rts12
PHP
PHA
TSX
PLA
TXS
PLA
PLP
Clobbers X
NOP
NOP
NOP
NOP
JSR @rts14
Requires @rts14
NOP
PHA
PHA
PHP
PLP
PHP
PLP
Clobbers S
8 bytes
NOP
NOP
NOP
NOP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


23 cycles

5 bytes
PLA
PLA
JSR @rts15
Clobbers A, S, and Z&N; and requires @rts15
6 bytes
NOP
LDX #4
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #4
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
PHP
PLP
JSR @rts14
Requires @rts14
NOP
PHA
PHA
JSR @rts15
Clobbers S; and requires @rts15
PHA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
7 bytes
NOP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


24 cycles

6 bytes
JSR @rts12
JSR @rts12
Requires @rts12
NOP
PHP
PLP
JSR @rts15
Requires @rts15
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
PHA
LDX #4
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
PHA
LDY #4
@Y:
DEY
BNE @Y
Clobbers Y, S, and Z&N
PHA
PHP
PLP
JSR @rts14
Clobbers S; and requires @rts14
7 bytes
NOP
LDX #3
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #3
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
PHP
BIT $00
PLP
JSR @rts14
Requires @rts14
PHA
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers S
8 bytes
PHP
PLP
PHP
PLP
PHP
BIT $00
PLP
Clobbers nothing, requires nothing


25 cycles

6 bytes
PHA
PHP
PLP
JSR @rts15
Clobbers S; and requires @rts15
LDY #3
@Y:
PHA
DEY
BNE @Y
Clobbers Y, S, and Z&N
LDX #3
@X:
PHA
DEX
BNE @X
Clobbers X, S, and Z&N
PHA
PLA
PLA
JSR @rts14
Clobbers A, S, and Z&N; and requires @rts14
7 bytes
PHP
BIT $00
PLP
JSR @rts15
Requires @rts15
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #2
@X:
PHP
PLP
DEX
BNE @X
Clobbers X, and Z&N
NOP
NOP
PHP
PLP
JSR @rts14
Requires @rts14
PHA
PHA
PHP
PLP
JSR @rts12
Clobbers S; and requires @rts12
NOP
PHA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
8 bytes
NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


26 cycles

5 bytes
LDY #5
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #5
@X:
DEX
BNE @X
Clobbers X, and Z&N
6 bytes
JSR @rts12
JSR @rts14
Requires @rts12, and @rts14
PHA
PLA
PLA
JSR @rts15
Clobbers A, S, and Z&N; and requires @rts15
PLA
PLA
PLA
JSR @rts14
Clobbers A, S, and Z&N; and requires @rts14
7 bytes
NOP
JSR @rts12
JSR @rts12
Requires @rts12
NOP
NOP
PHP
PLP
JSR @rts15
Requires @rts15
ROL $00,X
ROR $00,X
JSR @rts14
Clobbers Z&N; and requires @rts14
NOP
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
NOP
PHA
PHP
PLP
JSR @rts14
Clobbers S; and requires @rts14
8 bytes
PHP
PLP
PHP
ROL $00,X
ROR $00,X
PLP
Clobbers nothing, requires nothing


27 cycles

6 bytes
JSR @rts12
JSR @rts15
Requires @rts12, and @rts15
PLA
PLA
PLA
JSR @rts15
Clobbers A, S, and Z&N; and requires @rts15
7 bytes
ROL $00,X
ROR $00,X
JSR @rts15
Clobbers Z&N; and requires @rts15
PHA
JSR @rts12
JSR @rts12
Clobbers S; and requires @rts12
NOP
PHA
PHP
PLP
JSR @rts15
Clobbers S; and requires @rts15
PHA
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
NOP
LDX #3
@X:
PHA
DEX
BNE @X
Clobbers X, S, and Z&N
NOP
LDY #3
@Y:
PHA
DEY
BNE @Y
Clobbers Y, S, and Z&N
PHA
PHA
PHP
PLP
JSR @rts14
Clobbers S; and requires @rts14
LDY #130
@Y = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
DEY
BMI @Y
Clobbers Y, and Z&N; and requires support for unofficial opcodes
LDX #130
@X = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
DEX
BMI @X
Clobbers X, and Z&N; and requires support for unofficial opcodes
8 bytes
NOP
PHP
BIT $00
PLP
JSR @rts15
Requires @rts15
LDA $00
JSR @rts12
JSR @rts12
Clobbers A, and Z&N; and requires @rts12
NOP
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y
Clobbers Y, and Z&N
PHA
TSX
PLA
PLA
PLA
PLA
TXS
PLA
Clobbers X, and Z&N
PHP
TSX
PLA
PLA
PLA
PLA
TXS
PLP
Clobbers A, and X
BIT $00
JSR @rts12
JSR @rts12
Clobbers Z&N, and V; and requires @rts12
NOP
NOP
NOP
PHP
PLP
JSR @rts14
Requires @rts14
STA @zptemp
JSR @rts12
JSR @rts12
Requires @zptemp, and @rts12
PHA
PHA
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers S
NOP $00
JSR @rts12
JSR @rts12
Requires @rts12, and support for unofficial opcodes
9 bytes
NOP
NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


28 cycles

6 bytes
NOP
LDX #5
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #5
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
JSR @rts14
JSR @rts14
Requires @rts14
7 bytes
PHP
LDX #4
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #4
@Y:
DEY
BNE @Y
PLP
Clobbers Y
SEC
LDA #5
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
PHA
PHA
PHP
PLP
JSR @rts15
Clobbers S; and requires @rts15
PLA
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
8 bytes
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


29 cycles

6 bytes
LDX #4
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
LDY #4
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
JSR @rts14
JSR @rts15
Requires @rts14, and @rts15
7 bytes
PHP
PLP
PHP
PLP
JSR @rts15
Requires @rts15
PHA
JSR @rts12
JSR @rts14
Clobbers S; and requires @rts12, and @rts14
PHA
PLA
PLA
PLA
JSR @rts14
Clobbers A, S, and Z&N; and requires @rts14
8 bytes
PHP
LDY #3
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #3
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
LDA $00
JSR @rts12
JSR @rts14
Clobbers A, and Z&N; and requires @rts12, and @rts14
BIT $00
JSR @rts12
JSR @rts14
Clobbers Z&N, and V; and requires @rts12, and @rts14
STA @zptemp
JSR @rts12
JSR @rts14
Requires @zptemp, @rts12, and @rts14
NOP
PHA
JSR @rts12
JSR @rts12
Clobbers S; and requires @rts12
NOP
PHA
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
NOP
PHA
PHA
PHP
PLP
JSR @rts14
Clobbers S; and requires @rts14
NOP $00
JSR @rts12
JSR @rts14
Requires @rts12, @rts14, and support for unofficial opcodes
9 bytes
PHP
PLP
PHP
BIT $00
PLP
JSR @rts12
Requires @rts12
NOP
NOP
NOP
NOP
PHP
PLP
JSR @rts14
Requires @rts14
NOP
PHA
PHA
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers S
10 bytes
NOP
NOP
NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


30 cycles

6 bytes
JSR @rts15
JSR @rts15
Requires @rts15
PLA
LDX #5
@X:
DEX
BNE @X
Clobbers A, X, S, and Z&N
PLA
LDY #5
@Y:
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
7 bytes
NOP
NOP
LDY #5
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
NOP
LDX #5
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
JSR @rts14
JSR @rts14
Requires @rts14
8 bytes
NOP
PHP
LDY #4
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #4
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
SEC
LDA #5
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
PHA
PHA
JSR @rts12
JSR @rts12
Clobbers S; and requires @rts12
NOP
PLA
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
9 bytes
NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


31 cycles

5 bytes
LDY #6
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #6
@X:
DEX
BNE @X
Clobbers X, and Z&N
7 bytes
NOP
JSR @rts14
JSR @rts15
Requires @rts14, and @rts15
PLA
PLA
PLA
PLA
JSR @rts15
Clobbers A, S, and Z&N; and requires @rts15
PHA
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts14
8 bytes
PHP
PLP
JSR @rts12
JSR @rts12
Requires @rts12
NOP
PHP
PLP
PHP
PLP
JSR @rts15
Requires @rts15
SEC
LDA #4
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
LDA $00
JSR @rts14
JSR @rts14
Clobbers A, and Z&N; and requires @rts14
BIT $00
JSR @rts14
JSR @rts14
Clobbers Z&N, and V; and requires @rts14
STA @zptemp
JSR @rts14
JSR @rts14
Requires @zptemp, and @rts14
PHA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
PHA
PHP
LDX #4
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHA
PHP
LDY #4
@Y:
DEY
BNE @Y
PLP
Clobbers Y, and S
NOP $00
JSR @rts14
JSR @rts14
Requires @rts14, and support for unofficial opcodes
9 bytes
NOP
PHP
LDY #3
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #3
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
JMP *+3
JSR @rts14
JSR @rts14
Requires @rts14
PHA
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers S
10 bytes
PHP
PLP
PHP
PLP
PHP
PLP
PHP
BIT $00
PLP
Clobbers nothing, requires nothing


32 cycles

6 bytes
LDY #5
@Y = * - 1
; ^ Hides ORA zp
DEY ;first round only
DEY
BNE @Y
Clobbers A, Y, and Z&N
LDX #5
@X = * - 1
; ^ Hides ORA zp
DEX ;first round only
DEX
BNE @X
Clobbers A, X, and Z&N
7 bytes
NOP
JSR @rts15
JSR @rts15
Requires @rts15
PHA
LDX #4
@X:
NOP
DEX
BNE @X
Clobbers X, S, and Z&N
PHA
LDY #4
@Y:
NOP
DEY
BNE @Y
Clobbers Y, S, and Z&N
PLA
JSR @rts14
JSR @rts14
Clobbers A, S, and Z&N; and requires @rts14
LDY #250
@Y = * - 1
; ^ Hides !NOP
NOP
INY
INY
BNE @Y
Clobbers Y, and Z&N; and requires support for unofficial opcodes
LDX #250
@X = * - 1
; ^ Hides !NOP
NOP
INX
INX
BNE @X
Clobbers X, and Z&N; and requires support for unofficial opcodes
8 bytes
NOP
NOP
NOP
LDX #5
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
NOP
NOP
LDY #5
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
NOP
JSR @rts14
JSR @rts14
Requires @rts14
PLA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
9 bytes
TYA
PHA
LDY #4
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
PHP
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #2
@X:
PHP
PLP
DEX
BNE @X
PLP
Clobbers X
NOP
PHA
PHA
JSR @rts12
JSR @rts12
Clobbers S; and requires @rts12
10 bytes
NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


33 cycles

6 bytes
NOP
LDY #6
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
LDX #6
@X:
DEX
BNE @X
Clobbers X, and Z&N
7 bytes
PHP
LDY #5
@Y:
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #5
@X:
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #6
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
PHA
JSR @rts15
JSR @rts15
Clobbers S; and requires @rts15
8 bytes
LDA $00
JSR @rts15
JSR @rts15
Clobbers A, and Z&N; and requires @rts15
BIT $00
JSR @rts15
JSR @rts15
Clobbers Z&N, and V; and requires @rts15
PHP
PLP
JSR @rts12
JSR @rts14
Requires @rts12, and @rts14
NOP
NOP
JSR @rts14
JSR @rts15
Requires @rts14, and @rts15
STA @zptemp
JSR @rts15
JSR @rts15
Requires @zptemp, and @rts15
NOP
PHA
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts14
NOP $00
JSR @rts15
JSR @rts15
Requires @rts15, and support for unofficial opcodes
9 bytes
NOP
PHP
PLP
JSR @rts12
JSR @rts12
Requires @rts12
JMP *+3
JSR @rts15
JSR @rts15
Requires @rts15
JSR @rts14
PHP
ROL $00,X
ROR $00,X
PLP
Requires @rts14
NOP
PHA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
10 bytes
PHP
PLP
PHP
PLP
PHP
ROL $00,X
ROR $00,X
PLP
Clobbers nothing, requires nothing


34 cycles

5 bytes
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
BMI @Y
Clobbers Y, and Z&N
6 bytes
PHA
LDX #6
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
7 bytes
LDA $00
LDX #6
@X:
DEX
BNE @X
Clobbers A, X, and Z&N
BIT $00
LDX #6
@X:
DEX
BNE @X
Clobbers X, Z&N, and V
STA @zptemp
LDX #6
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires @zptemp
PLA
JSR @rts15
JSR @rts15
Clobbers A, S, and Z&N; and requires @rts15
NOP $00
LDX #6
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires support for unofficial opcodes
8 bytes
NOP
NOP
JSR @rts15
JSR @rts15
Requires @rts15
JMP *+3
LDX #6
@X:
DEX
BNE @X
Clobbers X, and Z&N
PHA
PHA
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts14
9 bytes
NOP
NOP
NOP
JSR @rts14
JSR @rts14
Requires @rts14
PHA
PHP
PLP
JSR @rts12
JSR @rts12
Clobbers S; and requires @rts12
NOP
PLA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
PHA
PHA
PHP
LDY #4
@Y:
DEY
BNE @Y
PLP
Clobbers Y, and S
PHA
PHA
PHP
LDX #4
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHP
LDY #130
@Y = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
DEY
BMI @Y
PLP
Clobbers Y; and requires support for unofficial opcodes
PHP
LDX #130
@X = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
DEX
BMI @X
PLP
Clobbers X; and requires support for unofficial opcodes
10 bytes
PHP
BIT $00
PLP
JSR @rts12
JSR @rts12
Requires @rts12
NOP
TYA
PHA
LDY #4
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
PHP
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y
PLP
Clobbers Y
PHP
PHA
TSX
PLA
PLA
PLA
PLA
TXS
PLA
PLP
Clobbers X
PHA
PHA
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers S
11 bytes
NOP
NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


35 cycles

6 bytes
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
DEY
BMI @Y
Clobbers Y, and Z&N
LDX #248
@X = * - 1
; ^ Hides SED
INX
INX
BNE @X
Clobbers X, Z&N, and D
PLA
LDX #6
@X:
DEX
BNE @X
Clobbers A, X, S, and Z&N
7 bytes
NOP
NOP
LDX #6
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
NOP
PHP
LDY #5
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #5
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
SEC
LDA #6
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
PHP
PLP
JSR @rts14
JSR @rts14
Requires @rts14
NOP
PHA
JSR @rts15
JSR @rts15
Clobbers S; and requires @rts15
9 bytes
PHP
SEC
LDA #5
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #5
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
NOP
BIT $00
JSR @rts15
JSR @rts15
Clobbers Z&N, and V; and requires @rts15
NOP
STA @zptemp
JSR @rts15
JSR @rts15
Requires @zptemp, and @rts15
NOP
NOP $00
JSR @rts15
JSR @rts15
Requires @rts15, and support for unofficial opcodes
10 bytes
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


36 cycles

5 bytes
LDY #7
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #7
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
PHP
LDX #4
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #4
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
PHP
PLP
JSR @rts14
JSR @rts15
Requires @rts14, and @rts15
PHA
PHA
JSR @rts15
JSR @rts15
Clobbers S; and requires @rts15
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
PLA
PLA
JSR @rts14
JSR @rts14
Clobbers A, S, and Z&N; and requires @rts14
9 bytes
JSR @rts12
JSR @rts12
JSR @rts12
Requires @rts12
NOP
NOP
NOP
JSR @rts15
JSR @rts15
Requires @rts15
LDA $00
SEC
LDA #6
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
PLA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
NOP
PHA
PHA
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts14
10 bytes
NOP
NOP
NOP
NOP
JSR @rts14
JSR @rts14
Requires @rts14
11 bytes
TYA
PHA
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
PHA
PHA
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers S
12 bytes
NOP
NOP
NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


37 cycles

6 bytes
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
BMI @Y
Clobbers Y, S, and Z&N
LDX #4
@X:
PLA
DEX
BNE @X
Clobbers A, X, S, and Z&N
7 bytes
LDX #3
@X:
PHP
PLP
DEX
BNE @X
Clobbers X, and Z&N
LDY #3
@Y:
PHP
PLP
DEY
BNE @Y
Clobbers Y, and Z&N
8 bytes
PHP
PLP
JSR @rts15
JSR @rts15
Requires @rts15
PLA
SEC
LDA #6
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
NOP
PHP
LDX #5
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
NOP
PHP
LDY #5
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
PLP
JSR @rts14
JSR @rts14
Requires @rts14
10 bytes
NOP
PHP
SEC
LDA #5
@A:
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHA
SEC
LDA #5
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
PHA
PHA
PHP
PLP
JSR @rts12
JSR @rts12
Clobbers S; and requires @rts12
11 bytes
NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


38 cycles

6 bytes
NOP
LDY #7
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
LDX #7
@X:
DEX
BNE @X
Clobbers X, and Z&N
7 bytes
PHP
LDY #6
@Y:
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #6
@X:
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #7
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
8 bytes
PLA
PLA
JSR @rts15
JSR @rts15
Clobbers A, S, and Z&N; and requires @rts15
9 bytes
JSR @rts12
JSR @rts12
JSR @rts14
Requires @rts12, and @rts14
NOP
PHP
PLP
JSR @rts14
JSR @rts15
Requires @rts14, and @rts15
NOP
PHA
PHA
JSR @rts15
JSR @rts15
Clobbers S; and requires @rts15
PHA
PHP
PLP
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts14
10 bytes
NOP
JSR @rts12
JSR @rts12
JSR @rts12
Requires @rts12
NOP
NOP
NOP
NOP
JSR @rts15
JSR @rts15
Requires @rts15
PHP
SEC
LDA #4
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #4
@A:
NOP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
PHP
BIT $00
PLP
JSR @rts14
JSR @rts14
Requires @rts14
11 bytes
PHA
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers S
12 bytes
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
BIT $00
PLP
Clobbers nothing, requires nothing


39 cycles

6 bytes
PHA
LDX #7
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
PHA
LDY #7
@Y:
DEY
BNE @Y
Clobbers Y, S, and Z&N
7 bytes
LDA $00
LDY #7
@Y:
DEY
BNE @Y
Clobbers A, Y, and Z&N
LDA $00
LDX #7
@X:
DEX
BNE @X
Clobbers A, X, and Z&N
BIT $00
LDX #7
@X:
DEX
BNE @X
Clobbers X, Z&N, and V
BIT $00
LDY #7
@Y:
DEY
BNE @Y
Clobbers Y, Z&N, and V
STA @zptemp
LDY #7
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N; and requires @zptemp
STA @zptemp
LDX #7
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires @zptemp
NOP $00
LDX #7
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires support for unofficial opcodes
NOP $00
LDY #7
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N; and requires support for unofficial opcodes
8 bytes
JMP *+3
LDY #7
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
JMP *+3
LDX #7
@X:
DEX
BNE @X
Clobbers X, and Z&N
PHP
LDY #5
@Y = * - 1
; ^ Hides ORA zp
DEY ;first round only
DEY
BNE @Y
PLP
Clobbers A, and Y
PHP
LDX #5
@X = * - 1
; ^ Hides ORA zp
DEX ;first round only
DEX
BNE @X
PLP
Clobbers A, and X
9 bytes
NOP
PHP
PLP
JSR @rts15
JSR @rts15
Requires @rts15
SEC
LDA #3
@A:
PHP
PLP
SBC #1
BNE @A
Clobbers A, Z&N, and C
PHA
PHP
LDY #4
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y, and S
PHA
PHP
LDX #4
@X:
NOP
DEX
BNE @X
PLP
Clobbers X, and S
PHA
PLA
PLA
JSR @rts14
JSR @rts14
Clobbers A, S, and Z&N; and requires @rts14
PHP
LDY #250
@Y = * - 1
; ^ Hides !NOP
NOP
INY
INY
BNE @Y
PLP
Clobbers Y; and requires support for unofficial opcodes
PHP
LDX #250
@X = * - 1
; ^ Hides !NOP
NOP
INX
INX
BNE @X
PLP
Clobbers X; and requires support for unofficial opcodes
10 bytes
NOP
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
NOP
NOP
PHP
LDY #5
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
NOP
NOP
PHP
LDX #5
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
NOP
PHP
PLP
JSR @rts14
JSR @rts14
Requires @rts14
PHA
JSR @rts12
JSR @rts12
JSR @rts12
Clobbers S; and requires @rts12
11 bytes
PHA
TYA
PHA
LDY #4
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
NOP
PHP
SEC
LDA #5
@A:
SBC #1
BNE @A
PLP
Clobbers A
STA @zptemp
JSR @rts12
JSR @rts12
JSR @rts12
Requires @zptemp, and @rts12
NOP $00
JSR @rts12
JSR @rts12
JSR @rts12
Requires @rts12, and support for unofficial opcodes
12 bytes
NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


40 cycles

6 bytes
LDY #5
@Y = * - 1
; ^ Hides ORA zp
NOP
DEY
BNE @Y
Clobbers A, Y, and Z&N
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X
Clobbers A, X, and Z&N
7 bytes
NOP
NOP
LDY #7
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
NOP
LDX #7
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
NOP
PHP
LDX #6
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
PHP
LDY #6
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
SEC
LDA #7
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
PHP
SEC
LDA #6
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
JSR @rts12
JSR @rts14
JSR @rts14
Requires @rts12, and @rts14
PHA
PHP
PLP
JSR @rts15
JSR @rts15
Clobbers S; and requires @rts15
10 bytes
PHP
BIT $00
PLP
JSR @rts15
JSR @rts15
Requires @rts15
ROL $00,X
ROR $00,X
JSR @rts14
JSR @rts14
Clobbers Z&N; and requires @rts14
NOP
PHA
PHP
PLP
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts14
11 bytes
NOP
NOP
JSR @rts12
JSR @rts12
JSR @rts12
Requires @rts12
NOP
PHP
BIT $00
PLP
JSR @rts14
JSR @rts14
Requires @rts14
12 bytes
PHP
PLP
PHP
PLP
PHP
PLP
PHP
ROL $00,X
ROR $00,X
PLP
Clobbers nothing, requires nothing


41 cycles

5 bytes
LDX #8
@X:
DEX
BNE @X
Clobbers X, and Z&N
LDY #8
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
BMI @Y
PLP
Clobbers Y
8 bytes
PHA
PHP
LDX #6
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
PHP
BIT $00
LDX #6
@X:
DEX
BNE @X
PLP
Clobbers X
LDA $00
SEC
LDA #7
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
JSR @rts12
JSR @rts14
JSR @rts15
Requires @rts12, @rts14, and @rts15
PHA
PLA
PLA
JSR @rts15
JSR @rts15
Clobbers A, S, and Z&N; and requires @rts15
10 bytes
NOP
NOP
PHP
PLP
JSR @rts15
JSR @rts15
Requires @rts15
PLA
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, S, and Z&N
PHA
PHA
PHP
PLP
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts14
11 bytes
NOP
NOP
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
NOP
NOP
PHP
PLP
JSR @rts14
JSR @rts14
Requires @rts14
NOP
PHA
JSR @rts12
JSR @rts12
JSR @rts12
Clobbers S; and requires @rts12
PHA
PHP
SEC
LDA #4
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
SEC
LDA #4
@A:
NOP
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
12 bytes
PHP
PLP
PHP
BIT $00
PLP
JSR @rts12
JSR @rts12
Requires @rts12
NOP
PHA
TYA
PHA
LDY #4
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
NOP
NOP
PHP
SEC
LDA #5
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
PHA
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers S
13 bytes
NOP
NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


42 cycles

7 bytes
NOP
LDY #5
@Y = * - 1
; ^ Hides ORA zp
NOP
DEY
BNE @Y
Clobbers A, Y, and Z&N
NOP
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X
Clobbers A, X, and Z&N
PHA
PHA
LDX #7
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
PHA
PHA
LDY #7
@Y:
DEY
BNE @Y
Clobbers Y, S, and Z&N
8 bytes
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
DEY
BMI @Y
PLP
Clobbers Y
PHP
LDX #248
@X = * - 1
; ^ Hides SED
INX
INX
BNE @X
PLP
Clobbers X
PLA
SEC
LDA #7
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
JSR @rts12
JSR @rts15
JSR @rts15
Requires @rts12, and @rts15
TYA
PHA
LDY #6
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
JSR @rts14
JSR @rts14
JSR @rts14
Requires @rts14
10 bytes
ROL $00,X
ROR $00,X
JSR @rts15
JSR @rts15
Clobbers Z&N; and requires @rts15
NOP
PHP
SEC
LDA #6
@A:
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
NOP
PHA
PHP
PLP
JSR @rts15
JSR @rts15
Clobbers S; and requires @rts15
11 bytes
PHP
PHA
SEC
LDA #5
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


43 cycles

6 bytes
LDX #6
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
LDY #6
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #7
@X:
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #8
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
JSR @rts14
JSR @rts14
JSR @rts15
Requires @rts14, and @rts15
10 bytes
TXA
PHA
LDX #5
@X = * - 1
; ^ Hides ORA zp
DEX ;first round only
DEX
BNE @X
PLA
TAX
Clobbers A, and Z&N
PHA
PHA
PHP
PLP
JSR @rts15
JSR @rts15
Clobbers S; and requires @rts15
PHA
PHP
SEC
LDA #6
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
PHA
JSR @rts12
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts12, and @rts14
11 bytes
PHP
PLP
JSR @rts12
JSR @rts12
JSR @rts12
Requires @rts12
NOP
NOP
NOP
PHP
PLP
JSR @rts15
JSR @rts15
Requires @rts15
PHP
LDA $00
SEC
LDA #6
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
LDA $00
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
NOP
PHA
PHA
PHP
PLP
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts14
12 bytes
NOP
NOP
NOP
NOP
PHP
PLP
JSR @rts14
JSR @rts14
Requires @rts14
13 bytes
PHA
TYA
PHA
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
PHA
PHA
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers S
14 bytes
NOP
NOP
NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


44 cycles

6 bytes
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
DEY
BMI @Y
Clobbers Y, and Z&N
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
DEX
BNE @X
Clobbers A, X, Z&N, and C
PHA
LDX #8
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
7 bytes
LDA $00
LDX #8
@X:
DEX
BNE @X
Clobbers A, X, and Z&N
BIT $00
LDX #8
@X:
DEX
BNE @X
Clobbers X, Z&N, and V
STA @zptemp
LDX #8
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires @zptemp
NOP $00
LDX #8
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires support for unofficial opcodes
8 bytes
JMP *+3
LDX #8
@X:
DEX
BNE @X
Clobbers X, and Z&N
PHA
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
BMI @Y
PLP
Clobbers Y, and S
9 bytes
PHP
LDY #3
@Y:
PHP
PLP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #3
@X:
PHP
PLP
DEX
BNE @X
PLP
Clobbers X
JSR @rts14
JSR @rts15
JSR @rts15
Requires @rts14, and @rts15
NOP
PLA
SEC
LDA #7
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
10 bytes
PHP
PLP
PHP
PLP
JSR @rts15
JSR @rts15
Requires @rts15
NOP
TYA
PHA
LDY #6
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
JSR @rts14
JSR @rts14
JSR @rts14
Requires @rts14
11 bytes
PHA
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
NOP
PHP
SEC
LDA #6
@A:
SBC #1
BNE @A
PLP
Clobbers A
12 bytes
NOP
PHP
PHA
SEC
LDA #5
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


45 cycles

6 bytes
PLA
LDY #8
@Y:
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
PLA
LDX #8
@X:
DEX
BNE @X
Clobbers A, X, S, and Z&N
7 bytes
NOP
LDY #6
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
LDX #6
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
NOP
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #7
@X:
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
JSR @rts15
JSR @rts15
JSR @rts15
Requires @rts15
PHP
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
10 bytes
PHA
JSR @rts14
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts14
11 bytes
PHP
PLP
JSR @rts12
JSR @rts12
JSR @rts14
Requires @rts12, and @rts14
BIT $00
JSR @rts14
JSR @rts14
JSR @rts14
Clobbers Z&N, and V; and requires @rts14
STA @zptemp
JSR @rts14
JSR @rts14
JSR @rts14
Requires @zptemp, and @rts14
NOP $00
JSR @rts14
JSR @rts14
JSR @rts14
Requires @rts14, and support for unofficial opcodes
12 bytes
PHP
PHA
SEC
LDA #4
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


46 cycles

5 bytes
LDX #9
@X:
DEX
BNE @X
Clobbers X, and Z&N
LDY #9
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
8 bytes
PHA
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP
Clobbers Y, and S
PHA
PHP
LDX #7
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHA
SEC
LDA #8
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
PHP
BIT $00
LDX #7
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
BIT $00
LDY #7
@Y:
DEY
BNE @Y
PLP
Clobbers Y
LDA $00
SEC
LDA #8
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
DEY
BMI @Y
PLA
TAY
Clobbers A, and Z&N
NOP
JSR @rts14
JSR @rts15
JSR @rts15
Requires @rts14, and @rts15
11 bytes
NOP
PHP
PLP
PHP
PLP
JSR @rts15
JSR @rts15
Requires @rts15
PHP
SEC
LDA #3
@A:
PHP
PLP
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #3
@A:
PHP
PLP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
NOP
NOP
JSR @rts14
JSR @rts14
JSR @rts14
Requires @rts14
12 bytes
NOP
PHA
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHA
PHP
PLP
JSR @rts12
JSR @rts12
JSR @rts12
Clobbers S; and requires @rts12
13 bytes
NOP
NOP
PHP
PHA
SEC
LDA #5
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


47 cycles

7 bytes
PHA
PHA
LDY #8
@Y:
DEY
BNE @Y
Clobbers Y, S, and Z&N
PHA
PHA
LDX #8
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
8 bytes
NOP
NOP
LDX #6
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
NOP
NOP
LDY #6
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
PHP
LDY #5
@Y = * - 1
; ^ Hides ORA zp
NOP
DEY
BNE @Y
PLP
Clobbers A, and Y
PHP
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X
PLP
Clobbers A, and X
PLA
SEC
LDA #8
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
TYA
PHA
LDY #7
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
NOP
PHP
LDX #7
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
NOP
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP
Clobbers Y
10 bytes
NOP
JSR @rts15
JSR @rts15
JSR @rts15
Requires @rts15
NOP
PHP
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHP
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


48 cycles

6 bytes
NOP
LDX #9
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #9
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
PHP
LDX #8
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #8
@Y:
DEY
BNE @Y
PLP
Clobbers Y
SEC
LDA #9
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PHA
JSR @rts15
JSR @rts15
JSR @rts15
Clobbers S; and requires @rts15
PHA
PHP
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
11 bytes
PHP
LDA $00
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
LDA $00
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
BIT $00
JSR @rts15
JSR @rts15
JSR @rts15
Clobbers Z&N, and V; and requires @rts15
NOP
NOP
JSR @rts14
JSR @rts15
JSR @rts15
Requires @rts14, and @rts15
STA @zptemp
JSR @rts15
JSR @rts15
JSR @rts15
Requires @zptemp, and @rts15
PHA
PHA
JSR @rts14
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts14
NOP $00
JSR @rts15
JSR @rts15
JSR @rts15
Requires @rts15, and support for unofficial opcodes
12 bytes
JSR @rts12
JSR @rts12
JSR @rts12
JSR @rts12
Requires @rts12
JMP *+3
JSR @rts15
JSR @rts15
JSR @rts15
Requires @rts15
NOP
NOP
NOP
JSR @rts14
JSR @rts14
JSR @rts14
Requires @rts14
13 bytes
NOP
NOP
PHA
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHA
PHP
PHA
SEC
LDA #4
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers S
14 bytes
NOP
NOP
NOP
PHP
PHA
SEC
LDA #5
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


49 cycles

4 bytes
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
Clobbers Y, and Z&N
6 bytes
LDX #6
@X:
PHA
DEX
BNE @X
Clobbers X, S, and Z&N
7 bytes
LDX #4
@X:
PHP
PLP
DEX
BNE @X
Clobbers X, and Z&N
9 bytes
NOP
PHP
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X
PLP
Clobbers A, and X
NOP
PHP
LDY #5
@Y = * - 1
; ^ Hides ORA zp
NOP
DEY
BNE @Y
PLP
Clobbers A, and Y
PHA
PHA
PHP
LDX #7
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHA
PHA
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP
Clobbers Y, and S
NOP
PLA
SEC
LDA #8
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
10 bytes
NOP
TYA
PHA
LDY #7
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
NOP
NOP
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
NOP
NOP
PHP
LDX #7
@X:
DEX
BNE @X
PLP
Clobbers X
11 bytes
NOP
NOP
JSR @rts15
JSR @rts15
JSR @rts15
Requires @rts15
PHA
TYA
PHA
LDY #6
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
NOP
PHP
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHP
PLP
JSR @rts14
JSR @rts14
JSR @rts14
Requires @rts14
12 bytes
NOP
PHP
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


50 cycles

6 bytes
LDY #7
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #7
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
PHP
LDY #6
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #6
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
NOP
SEC
LDA #9
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
PHP
SEC
LDA #8
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHP
PLP
JSR @rts14
JSR @rts14
JSR @rts15
Requires @rts14, and @rts15
NOP
PHA
JSR @rts15
JSR @rts15
JSR @rts15
Clobbers S; and requires @rts15
12 bytes
PHA
TXA
PHA
LDX #5
@X = * - 1
; ^ Hides ORA zp
DEX ;first round only
DEX
BNE @X
PLA
TAX
PLA
Clobbers Z&N
JSR @rts12
JSR @rts12
JSR @rts12
JSR @rts14
Requires @rts12, and @rts14
NOP
STA @zptemp
JSR @rts15
JSR @rts15
JSR @rts15
Requires @zptemp, and @rts15
PHA
PHP
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
NOP
NOP $00
JSR @rts15
JSR @rts15
JSR @rts15
Requires @rts15, and support for unofficial opcodes
13 bytes
PHP
PHA
LDA $00
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


51 cycles

5 bytes
LDX #10
@X:
DEX
BNE @X
Clobbers X, and Z&N
LDY #10
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
8 bytes
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
DEY
BMI @Y
PLP
Clobbers Y
PHP
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
DEX
BNE @X
PLP
Clobbers A, and X
PHA
PHP
LDX #8
@X:
DEX
BNE @X
PLP
Clobbers X, and S
SEC
LDA #6
@A:
PHA
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
PHP
BIT $00
LDX #8
@X:
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #4
@A:
PHP
PLP
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
TXA
PHA
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X
PLA
TAX
Clobbers A, and Z&N
11 bytes
PHP
PLP
JSR @rts14
JSR @rts15
JSR @rts15
Requires @rts14, and @rts15
PHA
PHA
JSR @rts15
JSR @rts15
JSR @rts15
Clobbers S; and requires @rts15
PHA
PHA
PHP
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
12 bytes
NOP
NOP
NOP
JSR @rts15
JSR @rts15
JSR @rts15
Requires @rts15
NOP
PHA
TYA
PHA
LDY #6
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
NOP
NOP
PHP
SEC
LDA #7
@A:
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHP
PLP
JSR @rts14
JSR @rts14
JSR @rts14
Requires @rts14
13 bytes
NOP
NOP
PHP
PHA
SEC
LDA #6
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


52 cycles

5 bytes
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
Clobbers Y, S, and Z&N
6 bytes
LDA $00
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
Clobbers A, Y, and Z&N
BIT $00
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
Clobbers Y, Z&N, and V
STA @zptemp
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
Clobbers Y, and Z&N; and requires @zptemp
NOP $00
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
Clobbers Y, and Z&N; and requires support for unofficial opcodes
7 bytes
NOP
LDX #7
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #7
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
8 bytes
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
TYA
PHA
LDY #8
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
PHP
LDY #6
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #6
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
10 bytes
PHP
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


53 cycles

5 bytes
PLA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
Clobbers A, Y, S, and Z&N
6 bytes
NOP
LDX #10
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #10
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
PHP
LDY #9
@Y:
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #9
@X:
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #10
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PHA
PHP
SEC
LDA #8
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
11 bytes
PHP
LDA $00
SEC
LDA #8
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
LDA $00
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
PHA
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
DEY
BMI @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
PHP
PLP
JSR @rts14
JSR @rts15
JSR @rts15
Requires @rts14, and @rts15
NOP
PHA
PHA
JSR @rts15
JSR @rts15
JSR @rts15
Clobbers S; and requires @rts15
13 bytes
PHP
PHA
SEC
LDA #3
@A:
PHP
PLP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


54 cycles

6 bytes
PHA
LDY #10
@Y:
DEY
BNE @Y
Clobbers Y, S, and Z&N
PHA
LDX #10
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
7 bytes
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
NOP
DEY
BMI @Y
Clobbers Y, and Z&N
LDA $00
LDX #10
@X:
DEX
BNE @X
Clobbers A, X, and Z&N
BIT $00
LDX #10
@X:
DEX
BNE @X
Clobbers X, Z&N, and V
STA @zptemp
LDX #10
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires @zptemp
NOP $00
LDX #10
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires support for unofficial opcodes
8 bytes
JMP *+3
LDX #10
@X:
DEX
BNE @X
Clobbers X, and Z&N
9 bytes
NOP
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
PHA
PHA
PHP
LDX #8
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHA
PHA
PHP
LDY #8
@Y:
DEY
BNE @Y
PLP
Clobbers Y, and S
10 bytes
TYA
PHA
LDY #6
@Y:
NOP
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
NOP
PHP
LDX #6
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
NOP
NOP
PHP
LDY #6
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
11 bytes
PHA
TYA
PHA
LDY #7
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
PHP
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
12 bytes
NOP
PHP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


55 cycles

5 bytes
LDY #248
@Y = * - 1
; ^ Hides SED
INY
BNE @Y
Clobbers Y, Z&N, and D
LDX #248
@X = * - 1
; ^ Hides SED
INX
BNE @X
Clobbers X, Z&N, and D
6 bytes
PHA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
Clobbers Y, S, and Z&N
LDX #6
@X:
PLA
DEX
BNE @X
Clobbers A, X, S, and Z&N
7 bytes
LDY #6
@Y:
NOP
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #6
@X:
NOP
NOP
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
NOP
PHP
LDY #9
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #9
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
SEC
LDA #10
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
PHP
SEC
LDA #9
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #9
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
JSR @rts12
JSR @rts14
JSR @rts14
JSR @rts15
Requires @rts12, @rts14, and @rts15
PHA
PHP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
13 bytes
PHP
PHA
LDA $00
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


56 cycles

5 bytes
LDY #11
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #11
@X:
DEX
BNE @X
Clobbers X, and Z&N
6 bytes
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLP
Clobbers Y
8 bytes
PHA
PHP
LDX #9
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
PHP
LDX #4
@X:
PHP
PLP
DEX
BNE @X
PLP
Clobbers X
LDA $00
SEC
LDA #10
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PLA
TYA
PHA
LDY #8
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, S, and Z&N
11 bytes
NOP
TYA
PHA
LDY #6
@Y:
NOP
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
PHA
PHA
PHP
SEC
LDA #8
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
PHA
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
12 bytes
NOP
PHA
TYA
PHA
LDY #7
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
NOP
PHP
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
JSR @rts14
JSR @rts14
JSR @rts14
JSR @rts14
Requires @rts14
13 bytes
NOP
NOP
PHP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


57 cycles

6 bytes
LDX #8
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
LDY #8
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
CLC
LDA #248
@A = * - 1
; ^ Hides SED
ADC #1
BNE @A
Clobbers A, Z&N, C, and D
8 bytes
PHP
LDX #7
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #7
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
PLA
SEC
LDA #10
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
TYA
PHA
LDY #9
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
10 bytes
NOP
PHP
SEC
LDA #9
@A:
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHA
SEC
LDA #9
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHP
PHA
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


58 cycles

6 bytes
NOP
LDX #11
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #11
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
PHP
LDY #10
@Y:
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #10
@X:
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #11
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PHA
PHP
SEC
LDA #9
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
SEC
LDA #9
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
11 bytes
PHP
SEC
LDA #4
@A:
PHP
PLP
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #4
@A:
PHP
PLP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
PHA
TXA
PHA
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X
PLA
TAX
PLA
Clobbers Z&N
JSR @rts14
JSR @rts14
JSR @rts15
JSR @rts15
Requires @rts14, and @rts15
13 bytes
NOP
JSR @rts14
JSR @rts14
JSR @rts14
JSR @rts14
Requires @rts14
PHA
PHA
PHP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
14 bytes
NOP
NOP
NOP
PHP
PHA
SEC
LDA #7
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


59 cycles

6 bytes
PHA
LDX #11
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
PHA
LDY #11
@Y:
DEY
BNE @Y
Clobbers Y, S, and Z&N
7 bytes
NOP
LDY #8
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
LDX #8
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
PHA
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLP
Clobbers Y, and S
8 bytes
PHP
BIT $00
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLP
Clobbers Y
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
NOP
PHP
LDX #7
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
10 bytes
PHP
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHA
TYA
PHA
LDY #8
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
12 bytes
PHP
PHA
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


60 cycles

6 bytes
PLA
LDX #11
@X:
DEX
BNE @X
Clobbers A, X, S, and Z&N
PLA
LDY #11
@Y:
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
7 bytes
NOP
NOP
LDY #11
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
NOP
LDX #11
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY
Clobbers A, and Z&N
NOP
PHP
LDY #10
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #10
@X:
DEX
BNE @X
PLP
Clobbers X
9 bytes
PHP
SEC
LDA #10
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
JSR @rts15
JSR @rts15
JSR @rts15
JSR @rts15
Requires @rts15
PHA
PHP
PHA
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
13 bytes
PHP
PHA
LDA $00
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


61 cycles

5 bytes
LDY #12
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #12
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
PHA
PHP
LDY #10
@Y:
DEY
BNE @Y
PLP
Clobbers Y, and S
PHA
PHP
LDX #10
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
PHP
BIT $00
LDX #10
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
NOP
DEY
BMI @Y
PLP
Clobbers Y
NOP
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
TYA
PHA
LDY #7
@Y:
NOP
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
11 bytes
NOP
PHP
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHA
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
PHA
TYA
PHA
LDY #6
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
13 bytes
NOP
PHP
PHA
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


62 cycles

5 bytes
LDX #136
@X = * - 1
; ^ Hides DEY
DEX
BMI @X
Clobbers X, Y, and Z&N
7 bytes
PHP
LDX #248
@X = * - 1
; ^ Hides SED
INX
BNE @X
PLP
Clobbers X
PHP
LDY #248
@Y = * - 1
; ^ Hides SED
INY
BNE @Y
PLP
Clobbers Y
8 bytes
PLA
SEC
LDA #11
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
TYA
PHA
LDY #10
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
10 bytes
NOP
PHP
SEC
LDA #10
@A:
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHP
PHA
SEC
LDA #9
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


63 cycles

6 bytes
NOP
LDX #12
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #12
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
PHP
LDX #11
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #11
@Y:
DEY
BNE @Y
PLP
Clobbers Y
SEC
LDA #12
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
PHA
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY
Clobbers A, S, and Z&N
10 bytes
LDA $00
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY
Clobbers A, and Z&N
PHA
PHP
SEC
LDA #10
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
11 bytes
PHP
LDA $00
SEC
LDA #10
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
LDA $00
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
13 bytes
NOP
PHA
TYA
PHA
LDY #6
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHA
PHA
PHP
PHA
SEC
LDA #8
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
14 bytes
NOP
NOP
PHP
PHA
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


64 cycles

6 bytes
LDY #9
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #9
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
PHP
LDY #8
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #8
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
9 bytes
PHP
CLC
LDA #248
@A = * - 1
; ^ Hides SED
ADC #1
BNE @A
PLP
Clobbers A
PHA
CLC
LDA #248
@A = * - 1
; ^ Hides SED
ADC #1
BNE @A
PLA
Clobbers Z&N, C, and D
11 bytes
PHA
TYA
PHA
LDY #9
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
12 bytes
NOP
PHP
PHA
SEC
LDA #9
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


65 cycles

6 bytes
LDX #8
@X:
PHA
DEX
BNE @X
Clobbers X, S, and Z&N
LDY #8
@Y:
PHA
DEY
BNE @Y
Clobbers Y, S, and Z&N
7 bytes
NOP
NOP
LDY #12
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
NOP
LDX #12
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
NOP
PHP
LDY #11
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #11
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
SEC
LDA #12
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
PHP
SEC
LDA #11
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
PHA
PHP
PHA
SEC
LDA #9
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
13 bytes
PHP
PHA
SEC
LDA #4
@A:
PHP
PLP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


66 cycles

5 bytes
LDY #13
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #13
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
PHA
PHP
LDY #11
@Y:
DEY
BNE @Y
PLP
Clobbers Y, and S
PHA
PHP
LDX #11
@X:
DEX
BNE @X
PLP
Clobbers X, and S
9 bytes
NOP
PHP
LDY #8
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #8
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
TYA
PHA
LDY #248
@Y = * - 1
; ^ Hides SED
INY
BNE @Y
PLA
TAY
Clobbers A, Z&N, and D
10 bytes
PHP
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
PHP
PHA
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


67 cycles

7 bytes
LDY #6
@Y:
PHA
PHA
DEY
BNE @Y
Clobbers Y, S, and Z&N
LDX #6
@X:
PHA
PHA
DEX
BNE @X
Clobbers X, S, and Z&N
8 bytes
LDY #6
@Y:
NOP
NOP
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #6
@X:
NOP
NOP
NOP
DEX
BNE @X
Clobbers X, and Z&N
SEC
LDA #8
@A:
PHA
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
TYA
PHA
LDY #11
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
NOP
PHP
LDX #11
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
NOP
PHP
LDY #11
@Y:
DEY
BNE @Y
PLP
Clobbers Y
10 bytes
PHA
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
PHP
SEC
LDA #11
@A:
SBC #1
BNE @A
PLP
Clobbers A
11 bytes
PHP
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


68 cycles

6 bytes
NOP
LDX #13
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #13
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
PHP
LDY #12
@Y:
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #12
@X:
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #13
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
TXA
PHA
LDX #8
@X:
NOP
DEX
BNE @X
PLA
TAX
Clobbers A, and Z&N
PHA
PHP
SEC
LDA #11
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
11 bytes
NOP
PHP
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHA
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
PHA
TYA
PHA
LDY #7
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
13 bytes
NOP
PHP
PHA
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


69 cycles

5 bytes
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
Clobbers Y, and Z&N
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X
Clobbers A, X, Z&N, and C
6 bytes
PHA
LDX #13
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
7 bytes
LDA $00
LDX #13
@X:
DEX
BNE @X
Clobbers A, X, and Z&N
PHP
LDX #136
@X = * - 1
; ^ Hides DEY
DEX
BMI @X
PLP
Clobbers X, and Y
BIT $00
LDX #13
@X:
DEX
BNE @X
Clobbers X, Z&N, and V
STA @zptemp
LDX #13
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires @zptemp
NOP $00
LDX #13
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires support for unofficial opcodes
8 bytes
JMP *+3
LDX #13
@X:
DEX
BNE @X
Clobbers X, and Z&N
9 bytes
PHP
PLP
PHP
LDY #248
@Y = * - 1
; ^ Hides SED
INY
BNE @Y
PLP
Clobbers Y
PHP
PLP
PHP
LDX #248
@X = * - 1
; ^ Hides SED
INX
BNE @X
PLP
Clobbers X
SEC
LDA #6
@A:
PHA
PHA
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
10 bytes
NOP
TYA
PHA
LDY #11
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
11 bytes
PHA
TYA
PHA
LDY #10
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
NOP
PHP
SEC
LDA #11
@A:
SBC #1
BNE @A
PLP
Clobbers A
12 bytes
NOP
PHP
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


70 cycles

6 bytes
PLA
LDX #13
@X:
DEX
BNE @X
Clobbers A, X, S, and Z&N
PLA
LDY #13
@Y:
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
7 bytes
NOP
NOP
LDY #13
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
NOP
LDX #13
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
NOP
PHP
LDX #12
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
PHP
LDY #12
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
SEC
LDA #13
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
PHP
SEC
LDA #12
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #12
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHA
PHA
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY
PLA
Clobbers S, and Z&N
12 bytes
PHA
LDA $00
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY
PLA
Clobbers Z&N
PHA
PHP
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
13 bytes
PHP
PHA
LDA $00
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


71 cycles

5 bytes
LDY #14
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #14
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
PHP
LDX #9
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #9
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
LDA $00
SEC
LDA #13
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PLA
TYA
PHA
LDY #11
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, S, and Z&N
11 bytes
PHP
PHA
CLC
LDA #248
@A = * - 1
; ^ Hides SED
ADC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


72 cycles

6 bytes
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
Clobbers Y, S, and Z&N
PHA
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X
Clobbers A, X, S, Z&N, and C
7 bytes
LDA $00
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
Clobbers A, Y, and Z&N
LDA $00
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X
Clobbers A, X, Z&N, and C
BIT $00
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
Clobbers Y, Z&N, and V
STA @zptemp
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
Clobbers Y, and Z&N; and requires @zptemp
PHA
PHA
LDX #13
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
NOP $00
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
Clobbers Y, and Z&N; and requires support for unofficial opcodes
8 bytes
NOP
NOP
NOP
LDX #13
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
NOP
NOP
LDY #13
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
PHA
PHP
LDX #136
@X = * - 1
; ^ Hides DEY
DEX
BMI @X
PLP
Clobbers X, Y, and S
PLA
SEC
LDA #13
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
TYA
PHA
LDY #12
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
PHP
LDX #8
@X:
BIT $00
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #8
@Y:
BIT $00
DEY
BNE @Y
PLP
Clobbers Y
10 bytes
NOP
PHP
SEC
LDA #12
@A:
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHA
SEC
LDA #12
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHP
PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


73 cycles

6 bytes
NOP
LDX #14
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #14
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
PHP
LDX #13
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #13
@Y:
DEY
BNE @Y
PLP
Clobbers Y
SEC
LDA #14
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PHP
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHA
TYA
PHA
LDY #248
@Y = * - 1
; ^ Hides SED
INY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N, and D
12 bytes
PHP
PHA
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


74 cycles

6 bytes
PHA
LDX #14
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
PHA
LDY #14
@Y:
DEY
BNE @Y
Clobbers Y, S, and Z&N
7 bytes
LDA $00
LDX #14
@X:
DEX
BNE @X
Clobbers A, X, and Z&N
LDA $00
LDY #14
@Y:
DEY
BNE @Y
Clobbers A, Y, and Z&N
BIT $00
LDY #14
@Y:
DEY
BNE @Y
Clobbers Y, Z&N, and V
BIT $00
LDX #14
@X:
DEX
BNE @X
Clobbers X, Z&N, and V
STA @zptemp
LDX #14
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires @zptemp
STA @zptemp
LDY #14
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N; and requires @zptemp
NOP $00
LDY #14
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N; and requires support for unofficial opcodes
NOP $00
LDX #14
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires support for unofficial opcodes
8 bytes
JMP *+3
LDX #14
@X:
DEX
BNE @X
Clobbers X, and Z&N
JMP *+3
LDY #14
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
9 bytes
PHA
PHP
LDX #9
@X:
NOP
DEX
BNE @X
PLP
Clobbers X, and S
PHA
PHP
LDY #9
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y, and S
NOP
PLA
SEC
LDA #13
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
10 bytes
NOP
TYA
PHA
LDY #12
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
PHP
LDX #6
@X:
NOP
NOP
NOP
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #6
@Y:
NOP
NOP
NOP
DEY
BNE @Y
PLP
Clobbers Y
11 bytes
PHA
TYA
PHA
LDY #11
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
NOP
PHP
SEC
LDA #12
@A:
SBC #1
BNE @A
PLP
Clobbers A
12 bytes
NOP
PHP
PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


75 cycles

6 bytes
PLA
LDX #14
@X:
DEX
BNE @X
Clobbers A, X, S, and Z&N
PLA
LDY #14
@Y:
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
7 bytes
NOP
NOP
LDY #14
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
NOP
LDX #14
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
NOP
PHP
LDY #13
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #13
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
SEC
LDA #14
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
PHP
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
PHA
TXA
PHA
LDX #8
@X:
NOP
DEX
BNE @X
PLA
TAX
PLA
Clobbers Z&N
PHA
PHP
PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
13 bytes
NOP
PHP
PHA
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


76 cycles

5 bytes
LDY #15
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #15
@X:
DEX
BNE @X
Clobbers X, and Z&N
7 bytes
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
PLP
Clobbers Y
PHP
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X
PLP
Clobbers A, and X
8 bytes
PHA
PHP
LDX #13
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
PHP
BIT $00
LDX #13
@X:
DEX
BNE @X
PLP
Clobbers X
LDA $00
SEC
LDA #14
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PLA
TYA
PHA
LDY #12
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, S, and Z&N
11 bytes
TYA
PHA
LDY #8
@Y:
LDA $00
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
PHA
PHP
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
12 bytes
NOP
PHA
TYA
PHA
LDY #11
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHP
SEC
LDA #6
@A:
NOP
NOP
NOP
SBC #1
BNE @A
PLP
Clobbers A
13 bytes
NOP
NOP
PHP
PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


77 cycles

7 bytes
PHA
PHA
LDY #14
@Y:
DEY
BNE @Y
Clobbers Y, S, and Z&N
PHA
PHA
LDX #14
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
8 bytes
NOP
NOP
NOP
LDX #14
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
NOP
NOP
LDY #14
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
PLA
SEC
LDA #14
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
NOP
PHP
LDX #13
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
NOP
PHP
LDY #13
@Y:
DEY
BNE @Y
PLP
Clobbers Y
10 bytes
NOP
PHP
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHP
PHA
SEC
LDA #12
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


78 cycles

6 bytes
LDX #11
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
LDY #11
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
PHP
LDX #14
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #14
@Y:
DEY
BNE @Y
PLP
Clobbers Y
SEC
LDA #15
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PHA
PHP
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
11 bytes
PHP
LDA $00
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
LDA $00
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
13 bytes
PHP
PLP
PHP
PHA
CLC
LDA #248
@A = * - 1
; ^ Hides SED
ADC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


79 cycles

5 bytes
LDY #136
@Y = * - 1
; ^ Hides DEY
PHA
BMI @Y
Clobbers Y, S, and Z&N
6 bytes
LDY #136
@Y = * - 1
; ^ Hides DEY
LDA $00
BMI @Y
Clobbers A, Y, and Z&N
LDY #136
@Y = * - 1
; ^ Hides DEY
BIT $00
BMI @Y
Clobbers Y, Z&N, and V
LDY #136
@Y = * - 1
; ^ Hides DEY
STA @zptemp
BMI @Y
Clobbers Y, and Z&N; and requires @zptemp
PHA
LDX #15
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP $00
BMI @Y
Clobbers Y, and Z&N; and requires support for unofficial opcodes
7 bytes
LDY #136
@Y = * - 1
; ^ Hides DEY
JMP *+3
BMI @Y
Clobbers Y, and Z&N
LDA $00
LDX #15
@X:
DEX
BNE @X
Clobbers A, X, and Z&N
BIT $00
LDX #15
@X:
DEX
BNE @X
Clobbers X, Z&N, and V
STA @zptemp
LDX #15
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires @zptemp
NOP $00
LDX #15
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires support for unofficial opcodes
8 bytes
JMP *+3
LDX #15
@X:
DEX
BNE @X
Clobbers X, and Z&N
PHA
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
PLP
Clobbers Y, and S
PHA
PHP
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X
PLP
Clobbers A, X, and S
9 bytes
PHP
BIT $00
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
PLP
Clobbers Y
PHP
LDA $00
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X
PLP
Clobbers A, and X
PHA
PHA
PHP
LDX #13
@X:
DEX
BNE @X
PLP
Clobbers X, and S
NOP
PLA
SEC
LDA #14
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
10 bytes
NOP
TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
NOP
NOP
PHP
LDX #13
@X:
DEX
BNE @X
PLP
Clobbers X
11 bytes
PHA
TYA
PHA
LDY #12
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
NOP
PHP
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP
Clobbers A
12 bytes
NOP
PHP
PHA
SEC
LDA #12
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


80 cycles

6 bytes
LDX #136
@X = * - 1
; ^ Hides DEY
NOP
DEX
BMI @X
Clobbers X, Y, and Z&N
PLA
LDX #15
@X:
DEX
BNE @X
Clobbers A, X, S, and Z&N
PLA
LDY #15
@Y:
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
7 bytes
NOP
LDY #11
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
LDX #11
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
NOP
PHP
LDY #14
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #14
@X:
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #11
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
PHP
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
PHP
PHA
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


81 cycles

5 bytes
LDY #16
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #16
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
PHA
PHP
LDY #14
@Y:
DEY
BNE @Y
PLP
Clobbers Y, and S
PHA
PHP
LDX #14
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHA
SEC
LDA #15
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
PHP
BIT $00
LDX #14
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
BIT $00
LDY #14
@Y:
DEY
BNE @Y
PLP
Clobbers Y
LDA $00
SEC
LDA #15
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PLA
TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, S, and Z&N
11 bytes
NOP
NOP
TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
PHA
PHA
PHP
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
12 bytes
NOP
PHA
TYA
PHA
LDY #12
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
NOP
NOP
PHP
SEC
LDA #13
@A:
SBC #1
BNE @A
PLP
Clobbers A
13 bytes
NOP
NOP
PHP
PHA
SEC
LDA #12
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


82 cycles

6 bytes
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
PHA
BMI @Y
Clobbers Y, S, and Z&N
LDX #9
@X:
PLA
DEX
BNE @X
Clobbers A, X, S, and Z&N
7 bytes
LDY #9
@Y:
NOP
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #9
@X:
NOP
NOP
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
PLA
SEC
LDA #15
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
NOP
PHP
LDX #14
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
NOP
PHP
LDY #14
@Y:
DEY
BNE @Y
PLP
Clobbers Y
10 bytes
NOP
PHP
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


83 cycles

6 bytes
NOP
LDX #16
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #16
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
PHP
LDX #15
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #15
@Y:
DEY
BNE @Y
PLP
Clobbers Y
SEC
LDA #16
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PHA
PHP
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
11 bytes
PHP
LDA $00
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
LDA $00
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
13 bytes
PHA
TYA
PHA
LDY #8
@Y:
LDA $00
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHA
PHP
PHA
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers S
14 bytes
PHP
PHA
SEC
LDA #6
@A:
NOP
NOP
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


84 cycles

6 bytes
PHA
LDX #16
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
PHA
LDY #16
@Y:
DEY
BNE @Y
Clobbers Y, S, and Z&N
7 bytes
LDA $00
LDX #16
@X:
DEX
BNE @X
Clobbers A, X, and Z&N
LDA $00
LDY #16
@Y:
DEY
BNE @Y
Clobbers A, Y, and Z&N
BIT $00
LDY #16
@Y:
DEY
BNE @Y
Clobbers Y, Z&N, and V
BIT $00
LDX #16
@X:
DEX
BNE @X
Clobbers X, Z&N, and V
STA @zptemp
LDX #16
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires @zptemp
STA @zptemp
LDY #16
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N; and requires @zptemp
NOP $00
LDX #16
@X:
DEX
BNE @X
Clobbers X, and Z&N; and requires support for unofficial opcodes
NOP $00
LDY #16
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N; and requires support for unofficial opcodes
8 bytes
JMP *+3
LDY #16
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
JMP *+3
LDX #16
@X:
DEX
BNE @X
Clobbers X, and Z&N
9 bytes
SEC
LDA #9
@A:
NOP
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
PHA
PHA
PHP
LDX #14
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHA
PHA
PHP
LDY #14
@Y:
DEY
BNE @Y
PLP
Clobbers Y, and S
10 bytes
NOP
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
NOP
NOP
PHP
LDY #14
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
NOP
NOP
PHP
LDX #14
@X:
DEX
BNE @X
PLP
Clobbers X
11 bytes
PHA
TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
NOP
PHP
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP
Clobbers A
12 bytes
NOP
PHP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


85 cycles

6 bytes
LDY #12
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #12
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
PHP
LDY #11
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #11
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
NOP
SEC
LDA #16
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
PHP
SEC
LDA #15
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #15
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
PHA
PHP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
13 bytes
PHP
PHA
LDA $00
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


86 cycles

5 bytes
LDX #17
@X:
DEX
BNE @X
Clobbers X, and Z&N
LDY #17
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
8 bytes
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
BIT $00
BMI @Y
PLP
Clobbers Y
PHA
PHP
LDX #15
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHA
SEC
LDA #16
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
PHP
BIT $00
LDX #15
@X:
DEX
BNE @X
PLP
Clobbers X
LDA $00
SEC
LDA #16
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PLA
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, S, and Z&N
11 bytes
NOP
NOP
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
PHA
PHA
PHP
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
12 bytes
NOP
PHA
TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
NOP
NOP
PHP
SEC
LDA #14
@A:
SBC #1
BNE @A
PLP
Clobbers A
13 bytes
NOP
NOP
PHP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


87 cycles

6 bytes
LDX #248
@X = * - 1
; ^ Hides SED
PLA
INX
BNE @X
Clobbers A, X, S, Z&N, and D
LDY #248
@Y = * - 1
; ^ Hides SED
PLA
INY
BNE @Y
Clobbers A, Y, S, Z&N, and D
7 bytes
NOP
LDX #12
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #12
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
8 bytes
PHP
LDX #136
@X = * - 1
; ^ Hides DEY
NOP
DEX
BMI @X
PLP
Clobbers X, and Y
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
TYA
PHA
LDY #15
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
PHP
LDX #11
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
NOP
PHP
LDY #11
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
10 bytes
PHP
SEC
LDA #11
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #11
@A:
NOP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


88 cycles

6 bytes
NOP
LDY #17
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
LDX #17
@X:
DEX
BNE @X
Clobbers X, and Z&N
7 bytes
PHP
LDY #16
@Y:
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #16
@X:
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #17
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PHA
PHP
SEC
LDA #15
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
SEC
LDA #15
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
11 bytes
PHP
LDA $00
SEC
LDA #15
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
LDA $00
SEC
LDA #15
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
13 bytes
NOP
NOP
PHA
TYA
PHA
LDY #13
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHA
PHA
PHP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
14 bytes
NOP
NOP
NOP
PHP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


89 cycles

5 bytes
LDY #136
@Y = * - 1
; ^ Hides DEY
PLA
BMI @Y
Clobbers A, Y, S, and Z&N
6 bytes
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
NOP
BMI @Y
Clobbers Y, and Z&N
LDX #10
@X = * - 1
; ^ Hides ASL A
NOP
DEX
BNE @X
Clobbers A, X, Z&N, and C
LDX #11
@X:
PHA
DEX
BNE @X
Clobbers X, S, and Z&N
7 bytes
LDX #11
@X:
LDA $00
DEX
BNE @X
Clobbers A, X, and Z&N
LDX #11
@X:
BIT $00
DEX
BNE @X
Clobbers X, Z&N, and V
LDX #11
@X:
STA @zptemp
DEX
BNE @X
Clobbers X, and Z&N; and requires @zptemp
LDX #11
@X:
NOP $00
DEX
BNE @X
Clobbers X, and Z&N; and requires support for unofficial opcodes
8 bytes
LDX #11
@X:
JMP *+3
DEX
BNE @X
Clobbers X, and Z&N
9 bytes
PHP
LDX #9
@X:
NOP
NOP
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #9
@Y:
NOP
NOP
DEY
BNE @Y
PLP
Clobbers Y
NOP
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
TXA
PHA
LDX #11
@X:
NOP
DEX
BNE @X
PLA
TAX
Clobbers A, and Z&N
11 bytes
PHA
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
PHP
SEC
LDA #11
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
12 bytes
NOP
PHP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


90 cycles

6 bytes
PLA
LDX #17
@X:
DEX
BNE @X
Clobbers A, X, S, and Z&N
PLA
LDY #17
@Y:
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
7 bytes
NOP
NOP
LDX #17
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
NOP
LDY #17
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
8 bytes
NOP
PHP
LDY #16
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #16
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
SEC
LDA #17
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
PHP
SEC
LDA #16
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
PHA
PHP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
13 bytes
PHP
PHA
LDA $00
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


91 cycles

5 bytes
LDY #18
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #18
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
PHA
PHP
LDX #16
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHA
PHP
LDY #16
@Y:
DEY
BNE @Y
PLP
Clobbers Y, and S
SEC
LDA #11
@A:
PHA
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
PHP
BIT $00
LDY #16
@Y:
DEY
BNE @Y
PLP
Clobbers Y
PHP
BIT $00
LDX #16
@X:
DEX
BNE @X
PLP
Clobbers X
LDA $00
SEC
LDA #17
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PLA
TYA
PHA
LDY #15
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, S, and Z&N
11 bytes
PHP
SEC
LDA #9
@A:
NOP
NOP
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #9
@A:
NOP
NOP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
NOP
PHA
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
13 bytes
NOP
NOP
PHP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


92 cycles

6 bytes
LDY #13
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #13
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
PHP
LDX #12
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #12
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
PLA
SEC
LDA #17
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
TYA
PHA
LDY #16
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
10 bytes
NOP
PHP
SEC
LDA #16
@A:
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHA
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHP
PHA
SEC
LDA #15
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


93 cycles

6 bytes
NOP
LDX #18
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #18
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
PHP
LDY #17
@Y:
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #17
@X:
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #18
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PHA
PHP
SEC
LDA #16
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
11 bytes
PHP
LDA $00
SEC
LDA #16
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
LDA $00
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
13 bytes
NOP
NOP
PHA
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHA
PHA
PHP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
14 bytes
NOP
NOP
NOP
PHP
PHA
SEC
LDA #14
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


94 cycles

6 bytes
PHA
LDX #18
@X:
DEX
BNE @X
Clobbers X, S, and Z&N
PHA
LDY #18
@Y:
DEY
BNE @Y
Clobbers Y, S, and Z&N
7 bytes
NOP
LDX #13
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #13
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
8 bytes
SEC
LDA #13
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
NOP
PHP
LDY #12
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #12
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
10 bytes
PHP
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHA
TYA
PHA
LDY #15
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
12 bytes
PHP
PHA
SEC
LDA #11
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


95 cycles

6 bytes
PLA
LDX #18
@X:
DEX
BNE @X
Clobbers A, X, S, and Z&N
PLA
LDY #18
@Y:
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
7 bytes
NOP
NOP
LDY #18
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
NOP
NOP
LDX #18
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
NOP
PHP
LDX #17
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
PHP
LDY #17
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
SEC
LDA #18
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
PHP
SEC
LDA #17
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #17
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
PHA
PHP
PHA
SEC
LDA #15
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
13 bytes
PHP
PHA
LDA $00
SEC
LDA #15
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


96 cycles

5 bytes
LDY #19
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #19
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
NOP
BMI @Y
PLP
Clobbers Y
PHP
LDX #10
@X = * - 1
; ^ Hides ASL A
NOP
DEX
BNE @X
PLP
Clobbers A, and X
PHA
PHP
LDX #17
@X:
DEX
BNE @X
PLP
Clobbers X, and S
PHA
SEC
LDA #18
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
PHP
LDX #11
@X:
BIT $00
DEX
BNE @X
PLP
Clobbers X
NOP
SEC
LDA #13
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
TYA
PHA
LDY #12
@Y:
NOP
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
11 bytes
NOP
PHP
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHA
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
PHA
TXA
PHA
LDX #11
@X:
NOP
DEX
BNE @X
PLA
TAX
PLA
Clobbers Z&N
13 bytes
NOP
PHP
PHA
SEC
LDA #11
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


97 cycles

6 bytes
LDX #12
@X:
PHA
DEX
BNE @X
Clobbers X, S, and Z&N
LDY #12
@Y:
PHA
DEY
BNE @Y
Clobbers Y, S, and Z&N
7 bytes
LDX #8
@X:
PHP
PLP
DEX
BNE @X
Clobbers X, and Z&N
LDY #8
@Y:
PHP
PLP
DEY
BNE @Y
Clobbers Y, and Z&N
8 bytes
PLA
SEC
LDA #18
@A:
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
TYA
PHA
LDY #17
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
NOP
PHP
LDY #17
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
NOP
PHP
LDX #17
@X:
DEX
BNE @X
PLP
Clobbers X
10 bytes
NOP
PHP
SEC
LDA #17
@A:
SBC #1
BNE @A
PLP
Clobbers A
NOP
PHA
SEC
LDA #17
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
11 bytes
PHP
PHA
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


98 cycles

6 bytes
NOP
LDX #19
@X:
DEX
BNE @X
Clobbers X, and Z&N
NOP
LDY #19
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
PHP
LDX #18
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #18
@Y:
DEY
BNE @Y
PLP
Clobbers Y
SEC
LDA #19
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PHA
PHP
SEC
LDA #17
@A:
SBC #1
BNE @A
PLP
Clobbers A, and S
PHA
PHA
SEC
LDA #17
@A:
SBC #1
BNE @A
PLA
Clobbers S, Z&N, and C
11 bytes
PHP
SEC
LDA #11
@A:
BIT $00
SBC #1
BNE @A
PLP
Clobbers A
PHA
LDA $00
SEC
LDA #17
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
13 bytes
PHP
PHA
SEC
LDA #9
@A:
NOP
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


99 cycles

6 bytes
LDX #14
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
LDY #14
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
8 bytes
PHP
LDY #13
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #13
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #12
@A:
PHA
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
SEC
LDA #8
@A:
PHP
PLP
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
NOP
TYA
PHA
LDY #17
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
11 bytes
PHA
TYA
PHA
LDY #16
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
NOP
NOP
PHP
SEC
LDA #17
@A:
SBC #1
BNE @A
PLP
Clobbers A
12 bytes
NOP
PHP
PHA
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


100 cycles

6 bytes
LDY #11
@Y:
PLA
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
LDX #11
@X:
PLA
DEX
BNE @X
Clobbers A, X, S, and Z&N
7 bytes
LDX #11
@X:
NOP
NOP
DEX
BNE @X
Clobbers X, and Z&N
LDY #11
@Y:
NOP
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
8 bytes
NOP
PHP
LDY #18
@Y:
DEY
BNE @Y
PLP
Clobbers Y
NOP
PHP
LDX #18
@X:
DEX
BNE @X
PLP
Clobbers X
NOP
SEC
LDA #19
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
9 bytes
PHP
SEC
LDA #18
@A:
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #18
@A:
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
12 bytes
PHA
PHP
PHA
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers S
13 bytes
PHP
PHA
LDA $00
SEC
LDA #16
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing

More

Bisqwit's 6502 delay_n macro set for ca65: http://bisqwit.iki.fi/src/6502-inline_delay.7z