Fixed cycle delay

From NESdev Wiki
Revision as of 01:15, 14 March 2016 by Bisqwit (talk | contribs) (Gotta have more data)
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
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
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
TSX
PLA
TXS
JSR @rts15
Clobbers A, X, and Z&N; and requires @rts15
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
PHP
PLP
JSR @rts14
Clobbers S; and requires @rts14
7 bytes
TSX
PLA
PLA
PLA
PLA
PLA
TXS
Clobbers A, X, and Z&N
PHP
BIT $00
PLP
JSR @rts14
Requires @rts14
PHA
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers S
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
.byte $0C,$E6,@zptemp ;NOP abs; hides 'INC @zptemp'
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires @zptemp, and support for unofficial opcodes
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
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
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
PHA
PHA
PHP
PLP
JSR @rts14
Clobbers S; and requires @rts14
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
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
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
NOP
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
9 bytes
NOP
NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


28 cycles

6 bytes
JSR @rts14
JSR @rts14
Requires @rts14
LDX #3
@X:
PLA
DEX
BNE @X
Clobbers A, X, S, and Z&N
LDY #3
@Y:
PLA
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
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
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
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
7 bytes
NOP
JSR @rts14
JSR @rts14
Requires @rts14
8 bytes
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
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
NOP
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
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
NOP $00
JSR @rts14
JSR @rts14
Requires @rts14, and support for unofficial opcodes
9 bytes
PHP
TSX
PLA
PLA
PLA
PLA
PLA
TXS
PLP
Clobbers A, and X
JMP *+3
JSR @rts14
JSR @rts14
Requires @rts14
PHA
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers S
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
.byte $0C,$E6,@zptemp ;NOP abs; hides 'INC @zptemp'
SBC #1
BMI @A
PLP
Clobbers A; and requires @zptemp, and support for unofficial opcodes
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
.byte $0C,$E6,@zptemp ;NOP abs; hides 'INC @zptemp'
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires @zptemp, and support for unofficial opcodes
10 bytes
PHP
PLP
PHP
PLP
PHP
PLP
PHP
BIT $00
PLP
Clobbers nothing, requires nothing


32 cycles

7 bytes
NOP
JSR @rts15
JSR @rts15
Requires @rts15
PLA
JSR @rts14
JSR @rts14
Clobbers A, S, and Z&N; and requires @rts14
8 bytes
TSX
LDY #3
@Y:
PLA
DEY
BNE @Y
TXS
Clobbers A, X, 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
LDX #2
@X:
PHP
PLP
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y
PLP
Clobbers Y
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
LDY #4
@Y:
PHA
DEY
BNE @Y
Clobbers Y, S, and Z&N
LDX #4
@X:
PHA
DEX
BNE @X
Clobbers X, S, and Z&N
7 bytes
PHP
LDX #5
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #5
@Y:
DEY
BNE @Y
PLP
Clobbers Y
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
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
SBC #1
BMI @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
10 bytes
PHP
PLP
PHP
PLP
PHP
ROL $00,X
ROR $00,X
PLP
Clobbers nothing, requires nothing


34 cycles

7 bytes
PLA
JSR @rts15
JSR @rts15
Clobbers A, S, and Z&N; and requires @rts15
LDY #3
@Y:
PHA
PHA
DEY
BNE @Y
Clobbers Y, S, and Z&N
LDX #3
@X:
PHA
PHA
DEX
BNE @X
Clobbers X, S, and Z&N
8 bytes
NOP
NOP
JSR @rts15
JSR @rts15
Requires @rts15
LDX #3
@X:
NOP
NOP
NOP
DEX
BNE @X
Clobbers X, and Z&N
LDY #3
@Y:
NOP
NOP
NOP
DEY
BNE @Y
Clobbers Y, 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
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
PHP
PLP
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
10 bytes
PHP
BIT $00
PLP
JSR @rts12
JSR @rts12
Requires @rts12
PHP
PHA
TSX
PLA
PLA
PLA
PLA
TXS
PLA
PLP
Clobbers X
PHA
PHA
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers S
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
NOP
SBC #1
BMI @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
NOP
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
11 bytes
NOP
NOP
NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


35 cycles

8 bytes
LDY #2
@Y:
JSR @rts12
DEY
BNE @Y
Clobbers Y, and Z&N; and requires @rts12
LDX #2
@X:
JSR @rts12
DEX
BNE @X
Clobbers X, and Z&N; and requires @rts12
PHP
PLP
JSR @rts14
JSR @rts14
Requires @rts14
NOP
PHA
JSR @rts15
JSR @rts15
Clobbers S; and requires @rts15
LDX #2
@X:
PLA
PLA
PLA
DEX
BNE @X
Clobbers A, X, S, and Z&N
LDY #2
@Y:
PLA
PLA
PLA
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
SEC
LDA #4
@A:
PHA
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
PHP
SEC
LDA #5
@A:
SBC #1
BNE @A
PLP
Clobbers A
LDX #2
@X:
ROL $00,X
ROR $00,X
DEX
BNE @X
Clobbers X, and Z&N
LDY #2
@Y:
ROL $00,X
ROR $00,X
DEY
BNE @Y
Clobbers Y, and Z&N
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
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
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
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
PHP
PLP
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
10 bytes
SEC
LDA #3
@A:
NOP
NOP
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
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
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A
PLA
PLP
Requires support for unofficial opcodes


37 cycles

6 bytes
LDY #4
@Y:
PLA
DEY
BNE @Y
Clobbers A, 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
9 bytes
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
NOP
PHP
PLP
JSR @rts14
JSR @rts14
Requires @rts14
10 bytes
PHA
PHA
PHP
PLP
JSR @rts12
JSR @rts12
Clobbers S; and requires @rts12
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
NOP
SBC #1
BMI @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
NOP
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
11 bytes
NOP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
PHP
PLP
Clobbers nothing, requires nothing


38 cycles

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
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
.byte $0C,$E6,@zptemp ;NOP abs; hides 'INC @zptemp'
SBC #1
BMI @A
PLA
PLP
Requires @zptemp, and support for unofficial opcodes


39 cycles

8 bytes
LDY #2
@Y:
JSR @rts14
DEY
BNE @Y
Clobbers Y, and Z&N; and requires @rts14
LDX #2
@X:
JSR @rts14
DEX
BNE @X
Clobbers X, and Z&N; and requires @rts14
9 bytes
NOP
PHP
PLP
JSR @rts15
JSR @rts15
Requires @rts15
LDY #2
@Y:
PHP
PLP
PHP
PLP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #2
@X:
PHP
PLP
PHP
PLP
DEX
BNE @X
Clobbers X, and Z&N
SEC
LDA #3
@A:
PHP
PLP
SBC #1
BNE @A
Clobbers A, Z&N, and C
PHA
PLA
PLA
JSR @rts14
JSR @rts14
Clobbers A, S, and Z&N; and requires @rts14
10 bytes
PHP
TSX
LDY #3
@Y:
PLA
DEY
BNE @Y
TXS
PLP
Clobbers A, X, and Y
NOP
NOP
PHP
PLP
JSR @rts14
JSR @rts14
Requires @rts14
PHA
JSR @rts12
JSR @rts12
JSR @rts12
Clobbers S; and requires @rts12
PHA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
11 bytes
PHA
TYA
PHA
LDY #4
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHP
TYA
PHA
LDY #4
@Y:
DEY
BNE @Y
PLA
TAY
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


40 cycles

7 bytes
LDY #3
@Y:
PLA
PLA
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
LDX #3
@X:
PLA
PLA
DEX
BNE @X
Clobbers A, X, S, and Z&N
8 bytes
LDY #3
@Y:
TSX
PLA
TXS
DEY
BNE @Y
Clobbers A, X, Y, and Z&N
LDY #3
@Y:
NOP
PHA
PHA
DEY
BNE @Y
Clobbers Y, S, and Z&N
LDX #3
@X:
NOP
PHA
PHA
DEX
BNE @X
Clobbers X, S, and Z&N
9 bytes
PHP
SEC
LDA #6
@A:
SBC #1
BNE @A
PLP
Clobbers A
LDY #3
@Y:
NOP
NOP
NOP
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #3
@X:
NOP
NOP
NOP
NOP
DEX
BNE @X
Clobbers X, and Z&N
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
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
SBC #1
BMI @A
PLA
PLP
Requires support for unofficial opcodes


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
9 bytes
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
PHP
LDY #3
@Y:
NOP
NOP
NOP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #3
@X:
NOP
NOP
NOP
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #2
@A:
JSR @rts14
SBC #1
BNE @A
Clobbers A, Z&N, and C; and requires @rts14
PHA
PHA
PHP
PLP
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts14
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
NOP
PHP
PLP
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
11 bytes
SEC
LDA #2
@A:
PHP
PLP
PHP
PLP
SBC #1
BNE @A
Clobbers A, Z&N, and C
NOP
NOP
NOP
PHP
PLP
JSR @rts14
JSR @rts14
Requires @rts14
NOP
PHA
JSR @rts12
JSR @rts12
JSR @rts12
Clobbers S; and requires @rts12
NOP
PHA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
PHP
PLP
SBC #1
BMI @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
PHP
PLP
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
12 bytes
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
NOP
SBC #1
BMI @A
PLA
PLP
Requires support for unofficial opcodes


42 cycles

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
PHP
LDX #2
@X:
JSR @rts12
DEX
BNE @X
PLP
Clobbers X; and requires @rts12
PHP
LDY #2
@Y:
JSR @rts12
DEY
BNE @Y
PLP
Clobbers Y; and requires @rts12
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
LDY #6
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #6
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
7 bytes
PHP
LDX #7
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP
Clobbers Y
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
PHA
PHA
PHP
PLP
JSR @rts15
JSR @rts15
Clobbers S; and requires @rts15
PHA
JSR @rts12
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts12, and @rts14
PHA
PLA
PLA
PLA
JSR @rts14
JSR @rts14
Clobbers A, S, and Z&N; and requires @rts14
11 bytes
PHP
PLP
JSR @rts12
JSR @rts12
JSR @rts12
Requires @rts12
NOP
NOP
NOP
PHP
PLP
JSR @rts15
JSR @rts15
Requires @rts15
PHA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
PLA
Clobbers A, S, and Z&N
NOP
PHA
PHA
PHP
PLP
JSR @rts14
JSR @rts14
Clobbers S; and requires @rts14
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
PHP
PLP
SBC #1
BMI @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
PHP
PLP
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
12 bytes
PHP
SEC
LDA #3
@A:
NOP
NOP
NOP
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #3
@A:
NOP
NOP
NOP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
13 bytes
PHA
TYA
PHA
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N


44 cycles

9 bytes
PHP
LDX #3
@X:
PHP
PLP
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #3
@Y:
PHP
PLP
DEY
BNE @Y
PLP
Clobbers Y
JSR @rts14
JSR @rts15
JSR @rts15
Requires @rts14, and @rts15
10 bytes
PHP
PLP
PHP
PLP
JSR @rts15
JSR @rts15
Requires @rts15
NOP
JSR @rts14
JSR @rts14
JSR @rts14
Requires @rts14
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
NOP
PHP
PLP
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
11 bytes
PHA
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHP
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
PLP
Clobbers A
12 bytes
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
NOP
SBC #1
BMI @A
PLA
PLP
Requires support for unofficial opcodes


45 cycles

7 bytes
LDY #4
@Y:
PHA
PHA
DEY
BNE @Y
Clobbers Y, S, and Z&N
LDX #4
@X:
PHA
PHA
DEX
BNE @X
Clobbers X, S, and Z&N
8 bytes
LDY #4
@Y:
NOP
NOP
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #4
@X:
NOP
NOP
NOP
DEX
BNE @X
Clobbers X, and Z&N
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
LDY #9
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #9
@X:
DEX
BNE @X
Clobbers X, and Z&N
10 bytes
NOP
JSR @rts14
JSR @rts15
JSR @rts15
Requires @rts14, and @rts15
PHP
LDY #2
@Y:
JSR @rts14
DEY
BNE @Y
PLP
Clobbers Y; and requires @rts14
PHP
LDX #2
@X:
JSR @rts14
DEX
BNE @X
PLP
Clobbers X; and requires @rts14
PLA
PLA
PLA
PLA
JSR @rts15
JSR @rts15
Clobbers A, S, and Z&N; and requires @rts15
PLA
JSR @rts14
JSR @rts14
JSR @rts14
Clobbers A, S, and Z&N; and requires @rts14
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
JSR @rts12
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires @rts12, and support for unofficial opcodes
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
PHA
PHP
PLP
SBC #1
BMI @A
Clobbers A, S, Z&N, and C; and requires support for unofficial opcodes
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
PHP
LDY #2
@Y:
PHP
PLP
PHP
PLP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #2
@X:
PHP
PLP
PHP
PLP
DEX
BNE @X
PLP
Clobbers X
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
13 bytes
PHP
PHA
TYA
PHA
LDY #4
@Y:
DEY
BNE @Y
PLA
TAY
PLA
PLP
Clobbers nothing, requires nothing


47 cycles

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


48 cycles

7 bytes
PHP
LDY #8
@Y:
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #8
@X:
DEX
BNE @X
PLP
Clobbers X
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
11 bytes
TXA
PHA
LDX #3
@X:
PHP
PLP
DEX
BNE @X
PLA
TAX
Clobbers A, and Z&N
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
PHP
SEC
LDA #2
@A:
JSR @rts14
SBC #1
BNE @A
PLP
Clobbers A; and requires @rts14
PHA
SEC
LDA #2
@A:
JSR @rts14
SBC #1
BNE @A
PLA
Clobbers Z&N, and C; and requires @rts14
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
NOP
PHP
PLP
SBC #1
BMI @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
NOP
PHP
PLP
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
13 bytes
PHP
SEC
LDA #2
@A:
PHP
PLP
PHP
PLP
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #2
@A:
PHP
PLP
PHP
PLP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
PHP
PLP
SBC #1
BMI @A
PLA
PLP
Requires support for unofficial opcodes


49 cycles

6 bytes
LDY #6
@Y:
PHA
DEY
BNE @Y
Clobbers Y, S, and Z&N
LDX #6
@X:
PHA
DEX
BNE @X
Clobbers X, S, and Z&N
7 bytes
LDY #4
@Y:
PHP
PLP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #4
@X:
PHP
PLP
DEX
BNE @X
Clobbers X, and Z&N
10 bytes
PLA
JSR @rts15
JSR @rts15
JSR @rts15
Clobbers A, S, and Z&N; and requires @rts15
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
JSR @rts14
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires @rts14, and support for unofficial opcodes
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $4848 ;hides two 'PHA's
JSR @rts12
SBC #1
BMI @A
Clobbers A, S, Z&N, and C; and requires @rts12, and support for unofficial opcodes
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
PHP
TYA
PHA
LDY #6
@Y:
DEY
BNE @Y
PLA
TAY
PLP
Clobbers A
PHP
PLP
JSR @rts14
JSR @rts14
JSR @rts14
Requires @rts14


50 cycles

6 bytes
LDX #7
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
LDY #7
@Y:
NOP
DEY
BNE @Y
Clobbers Y, 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
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
13 bytes
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
PHP
PLP
SBC #1
BMI @A
PLA
PLP
Requires support for unofficial opcodes
14 bytes
PHP
PHA
SEC
LDA #3
@A:
NOP
NOP
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


51 cycles

5 bytes
LDY #10
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #10
@X:
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
SEC
LDA #6
@A:
PHA
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
SEC
LDA #4
@A:
PHP
PLP
SBC #1
BNE @A
Clobbers A, Z&N, and C
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
12 bytes
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
NOP
PHP
PLP
SBC #1
BMI @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
NOP
PHP
PLP
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
13 bytes
PHP
PHA
TYA
PHA
LDY #5
@Y:
DEY
BNE @Y
PLA
TAY
PLA
PLP
Clobbers nothing, requires nothing


52 cycles

8 bytes
LDX #3
@X:
JSR @rts12
DEX
BNE @X
Clobbers X, and Z&N; and requires @rts12
LDY #3
@Y:
JSR @rts12
DEY
BNE @Y
Clobbers Y, and Z&N; and requires @rts12
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
LDX #3
@X:
PLA
PLA
PLA
DEX
BNE @X
Clobbers A, X, S, and Z&N
LDY #3
@Y:
PLA
PLA
PLA
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
9 bytes
TYA
PHA
LDY #8
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
LDX #3
@X:
ROL $00,X
ROR $00,X
DEX
BNE @X
Clobbers X, and Z&N
LDY #3
@Y:
ROL $00,X
ROR $00,X
DEY
BNE @Y
Clobbers Y, and Z&N
10 bytes
PHP
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
PHP
LDY #4
@Y:
NOP
NOP
NOP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #4
@X:
NOP
NOP
NOP
DEX
BNE @X
PLP
Clobbers X
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

7 bytes
PHP
LDX #9
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #9
@Y:
DEY
BNE @Y
PLP
Clobbers Y
SEC
LDA #10
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
11 bytes
PLA
PLA
JSR @rts15
JSR @rts15
JSR @rts15
Clobbers A, S, and Z&N; and requires @rts15
12 bytes
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
JSR @rts12
SBC #1
BMI @A
PLP
Clobbers A; and requires @rts12, and support for unofficial opcodes
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
JSR @rts12
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires @rts12, and support for unofficial opcodes
13 bytes
PHP
PHA
SEC
LDA #3
@A:
PHP
PLP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


54 cycles

10 bytes
TYA
PHA
LDY #6
@Y:
NOP
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
11 bytes
PHA
TYA
PHA
LDY #7
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHP
TYA
PHA
LDY #7
@Y:
DEY
BNE @Y
PLA
TAY
PLP
Clobbers A
12 bytes
PHP
PHA
LDY #3
@Y:
TSX
PLA
TXS
DEY
BNE @Y
PLA
PLP
Clobbers X, and Y
PHP
LDX #2
@X:
NOP
NOP
JSR @rts14
DEX
BNE @X
PLP
Clobbers X; and requires @rts14
PHP
LDY #2
@Y:
NOP
NOP
JSR @rts14
DEY
BNE @Y
PLP
Clobbers Y; and requires @rts14


55 cycles

6 bytes
LDY #6
@Y:
PLA
DEY
BNE @Y
Clobbers A, 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
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
NOP
ADC #1
BNE @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
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
13 bytes
PHP
BIT $00
JSR @rts15
JSR @rts15
JSR @rts15
PLP
Requires @rts15
PHA
TXA
PHA
LDX #3
@X:
PHP
PLP
DEX
BNE @X
PLA
TAX
PLA
Clobbers Z&N
14 bytes
PHP
PHA
SEC
LDA #2
@A:
JSR @rts14
SBC #1
BNE @A
PLA
PLP
Requires @rts14
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
NOP
PHP
PLP
SBC #1
BMI @A
PLA
PLP
Requires support for unofficial opcodes
15 bytes
PHP
PHA
SEC
LDA #2
@A:
PHP
PLP
PHP
PLP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


56 cycles

5 bytes
LDX #11
@X:
DEX
BNE @X
Clobbers X, and Z&N
LDY #11
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
9 bytes
PHP
LDX #4
@X:
PHP
PLP
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #4
@Y:
PHP
PLP
DEY
BNE @Y
PLP
Clobbers Y
10 bytes
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
JSR @rts15
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires @rts15, and support for unofficial opcodes
11 bytes
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
.byte $0C,$E6,@zptemp ;NOP abs; hides 'INC @zptemp'
NOP
JSR @rts14
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires @zptemp, @rts14, and support for unofficial opcodes
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
PHA
JSR @rts12
SBC #1
BMI @A
Clobbers A, S, Z&N, and C; and requires @rts12, and support for unofficial opcodes
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $48,X ;hides 'PHA'
PHA
JSR @rts14
SBC #1
BMI @A
Clobbers A, S, Z&N, and C; and requires @rts14, and support for unofficial opcodes
12 bytes
TYA
PHA
LDY #4
@Y:
NOP
NOP
NOP
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
JSR @rts14
SBC #1
BMI @A
PLP
Clobbers A; and requires @rts14, and support for unofficial opcodes
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
JSR @rts14
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires @rts14, and support for unofficial opcodes
13 bytes
PHP
PHA
TYA
PHA
LDY #6
@Y:
DEY
BNE @Y
PLA
TAY
PLA
PLP
Clobbers nothing, requires nothing


57 cycles

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


58 cycles

7 bytes
PHP
LDX #10
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #10
@Y:
DEY
BNE @Y
PLP
Clobbers Y
SEC
LDA #11
@A:
SBC #1
BNE @A
Clobbers A, 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
14 bytes
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
NOP
PHP
PLP
SBC #1
BMI @A
PLA
PLP
Requires support for unofficial opcodes
15 bytes
PHA
TYA
PHA
LDY #3
@Y:
NOP
NOP
NOP
NOP
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N


59 cycles

8 bytes
TSX
LDY #6
@Y:
PLA
DEY
BNE @Y
TXS
Clobbers A, X, Y, and Z&N
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PHP
SEC
LDA #7
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
PHP
LDY #3
@Y:
JSR @rts12
DEY
BNE @Y
PLP
Clobbers Y; and requires @rts12
PHP
LDX #3
@X:
JSR @rts12
DEX
BNE @X
PLP
Clobbers X; and requires @rts12
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
PHP
LDY #3
@Y:
ROL $00,X
ROR $00,X
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #3
@X:
ROL $00,X
ROR $00,X
DEX
BNE @X
PLP
Clobbers X
12 bytes
PHP
PHA
SEC
LDA #6
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


60 cycles

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
14 bytes
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
JSR @rts12
SBC #1
BMI @A
PLA
PLP
Requires @rts12, and support for unofficial opcodes


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
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
PHA
ADC #1
BNE @A
Clobbers A, S, Z&N, and C; and requires support for unofficial opcodes
9 bytes
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
NOP $00
ADC #1
BNE @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
10 bytes
TXA
PHA
LDX #7
@X:
NOP
DEX
BNE @X
PLA
TAX
Clobbers A, and Z&N
12 bytes
PHA
TYA
PHA
LDY #6
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHP
TYA
PHA
LDY #6
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLP
Clobbers A
13 bytes
PHP
PHA
TYA
PHA
LDY #7
@Y:
DEY
BNE @Y
PLA
TAY
PLA
PLP
Clobbers nothing, requires nothing


62 cycles

9 bytes
TYA
PHA
LDY #10
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
PHP
LDX #6
@X:
NOP
NOP
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #6
@Y:
NOP
NOP
DEY
BNE @Y
PLP
Clobbers Y
10 bytes
PHP
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
NOP
ADC #1
BNE @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
NOP
ADC #1
BNE @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
11 bytes
PHP
PHA
SEC
LDA #9
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


63 cycles

7 bytes
PHP
LDY #11
@Y:
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #11
@X:
DEX
BNE @X
PLP
Clobbers X
SEC
LDA #12
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
12 bytes
TYA
PHA
LDY #3
@Y:
JSR @rts12
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N; and requires @rts12
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
JSR @rts15
SBC #1
BMI @A
PLP
Clobbers A; and requires @rts15, and support for unofficial opcodes
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
JSR @rts15
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires @rts15, and support for unofficial opcodes
13 bytes
TYA
PHA
LDY #3
@Y:
ROL $00,X
ROR $00,X
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
.byte $0C,$E6,@zptemp ;NOP abs; hides 'INC @zptemp'
NOP
JSR @rts14
SBC #1
BMI @A
PLP
Clobbers A; and requires @zptemp, @rts14, and support for unofficial opcodes
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
.byte $0C,$E6,@zptemp ;NOP abs; hides 'INC @zptemp'
NOP
JSR @rts14
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires @zptemp, @rts14, and support for unofficial opcodes
14 bytes
PHA
TYA
PHA
LDY #4
@Y:
NOP
NOP
NOP
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHP
TYA
PHA
LDY #4
@Y:
NOP
NOP
NOP
DEY
BNE @Y
PLA
TAY
PLP
Clobbers A
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
JSR @rts14
SBC #1
BMI @A
PLA
PLP
Requires @rts14, and support for unofficial opcodes


64 cycles

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


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
LDX #8
@X:
LDA $00
DEX
BNE @X
Clobbers A, X, and Z&N
LDY #8
@Y:
LDA $00
DEY
BNE @Y
Clobbers A, Y, and Z&N
LDX #8
@X:
BIT $00
DEX
BNE @X
Clobbers X, Z&N, and V
LDY #8
@Y:
BIT $00
DEY
BNE @Y
Clobbers Y, Z&N, and V
LDX #8
@X:
STA @zptemp
DEX
BNE @X
Clobbers X, and Z&N; and requires @zptemp
LDY #8
@Y:
STA @zptemp
DEY
BNE @Y
Clobbers Y, and Z&N; and requires @zptemp
LDX #8
@X:
NOP $00
DEX
BNE @X
Clobbers X, and Z&N; and requires support for unofficial opcodes
LDY #8
@Y:
NOP $00
DEY
BNE @Y
Clobbers Y, and Z&N; and requires support for unofficial opcodes
8 bytes
LDX #8
@X:
JMP *+3
DEX
BNE @X
Clobbers X, and Z&N
LDY #8
@Y:
JMP *+3
DEY
BNE @Y
Clobbers Y, and Z&N
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
13 bytes
PHP
PHA
SEC
LDA #4
@A:
PHP
PLP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


66 cycles

5 bytes
LDX #13
@X:
DEX
BNE @X
Clobbers X, and Z&N
LDY #13
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
8 bytes
SEC
LDA #9
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
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
LDX #6
@X:
NOP
NOP
NOP
DEX
BNE @X
Clobbers X, and Z&N
LDY #6
@Y:
NOP
NOP
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
SEC
LDA #8
@A:
PHA
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
TXA
PHA
LDX #11
@X:
DEX
BNE @X
PLA
TAX
Clobbers A, and Z&N
11 bytes
PHP
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


68 cycles

7 bytes
PHP
LDX #12
@X:
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #12
@Y:
DEY
BNE @Y
PLP
Clobbers Y
SEC
LDA #13
@A:
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
TYA
PHA
LDY #8
@Y:
NOP
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
11 bytes
PHP
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
NOP $00
ADC #1
BNE @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
NOP $00
ADC #1
BNE @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
12 bytes
PHA
TXA
PHA
LDX #7
@X:
NOP
DEX
BNE @X
PLA
TAX
PLA
Clobbers Z&N
PHP
TXA
PHA
LDX #7
@X:
NOP
DEX
BNE @X
PLA
TAX
PLP
Clobbers A
14 bytes
PHP
PHA
TYA
PHA
LDY #6
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA
PLP
Clobbers nothing, requires nothing


69 cycles

8 bytes
LDY #4
@Y:
JSR @rts12
DEY
BNE @Y
Clobbers Y, and Z&N; and requires @rts12
LDX #4
@X:
JSR @rts12
DEX
BNE @X
Clobbers X, and Z&N; and requires @rts12
TSX
LDY #8
@Y:
PHA
DEY
BNE @Y
TXS
Clobbers X, Y, and Z&N
LDY #4
@Y:
PLA
PLA
PLA
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
LDX #4
@X:
PLA
PLA
PLA
DEX
BNE @X
Clobbers A, X, S, and Z&N
9 bytes
LDY #4
@Y:
ROL $00,X
ROR $00,X
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #4
@X:
ROL $00,X
ROR $00,X
DEX
BNE @X
Clobbers X, and Z&N
SEC
LDA #6
@A:
PHA
PHA
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
10 bytes
SEC
LDA #6
@A:
NOP
NOP
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
11 bytes
PHA
TYA
PHA
LDY #10
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHP
TYA
PHA
LDY #10
@Y:
DEY
BNE @Y
PLA
TAY
PLP
Clobbers A
12 bytes
PHP
PHA
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
NOP
ADC #1
BNE @A
PLA
PLP
Requires support for unofficial opcodes


70 cycles

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
LDY #3
@Y:
PHA
JSR @rts15
DEY
BNE @Y
Clobbers Y, S, and Z&N; and requires @rts15
LDX #3
@X:
PHA
JSR @rts15
DEX
BNE @X
Clobbers X, S, and Z&N; and requires @rts15
10 bytes
LDY #3
@Y:
BIT $00
JSR @rts15
DEY
BNE @Y
Clobbers Y, Z&N, and V; and requires @rts15
LDX #3
@X:
BIT $00
JSR @rts15
DEX
BNE @X
Clobbers X, Z&N, and V; and requires @rts15
LDY #3
@Y:
NOP
NOP
JSR @rts14
DEY
BNE @Y
Clobbers Y, and Z&N; and requires @rts14
LDX #3
@X:
NOP
NOP
JSR @rts14
DEX
BNE @X
Clobbers X, and Z&N; and requires @rts14
LDX #3
@X:
STA @zptemp
JSR @rts15
DEX
BNE @X
Clobbers X, and Z&N; and requires @zptemp, and @rts15
LDY #3
@Y:
STA @zptemp
JSR @rts15
DEY
BNE @Y
Clobbers Y, and Z&N; and requires @zptemp, and @rts15
LDY #3
@Y:
PHA
PHA
JSR @rts12
DEY
BNE @Y
Clobbers Y, S, and Z&N; and requires @rts12
LDX #3
@X:
PHA
PHA
JSR @rts12
DEX
BNE @X
Clobbers X, S, and Z&N; and requires @rts12
LDY #3
@Y:
NOP $00
JSR @rts15
DEY
BNE @Y
Clobbers Y, and Z&N; and requires @rts15, and support for unofficial opcodes
LDX #3
@X:
NOP $00
JSR @rts15
DEX
BNE @X
Clobbers X, and Z&N; and requires @rts15, and support for unofficial opcodes
11 bytes
LDY #3
@Y:
NOP
NOP
PHP
PLP
PHP
PLP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #3
@X:
NOP
NOP
PHP
PLP
PHP
PLP
DEX
BNE @X
Clobbers X, and Z&N
14 bytes
PHA
TYA
PHA
LDY #3
@Y:
JSR @rts12
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N; and requires @rts12
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
JSR @rts15
SBC #1
BMI @A
PLA
PLP
Requires @rts15, and support for unofficial opcodes
15 bytes
PHA
TYA
PHA
LDY #3
@Y:
ROL $00,X
ROR $00,X
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
.byte $0C,$E6,@zptemp ;NOP abs; hides 'INC @zptemp'
NOP
JSR @rts14
SBC #1
BMI @A
PLA
PLP
Requires @zptemp, @rts14, and support for unofficial opcodes
16 bytes
PHP
PHA
TYA
PHA
LDY #4
@Y:
NOP
NOP
NOP
DEY
BNE @Y
PLA
TAY
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
LDY #9
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #9
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
10 bytes
SEC
LDA #4
@A:
JSR @rts12
SBC #1
BNE @A
Clobbers A, Z&N, and C; and requires @rts12
11 bytes
PHP
PHA
SEC
LDA #136
@A = * - 1
; ^ Hides DEY
SBC #1
BMI @A
PLA
PLP
Clobbers nothing, requires nothing


72 cycles

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


73 cycles

6 bytes
LDY #9
@Y:
PHA
DEY
BNE @Y
Clobbers Y, S, and Z&N
LDX #9
@X:
PHA
DEX
BNE @X
Clobbers X, S, 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
9 bytes
PHP
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
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
12 bytes
PHP
PHA
SEC
LDA #8
@A:
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


74 cycles

10 bytes
PHP
LDY #6
@Y:
NOP
NOP
NOP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #6
@X:
NOP
NOP
NOP
DEX
BNE @X
PLP
Clobbers X
11 bytes
PHA
TXA
PHA
LDX #11
@X:
DEX
BNE @X
PLA
TAX
PLA
Clobbers Z&N
PHP
TXA
PHA
LDX #11
@X:
DEX
BNE @X
PLA
TAX
PLP
Clobbers A


75 cycles

8 bytes
SEC
LDA #9
@A:
PHA
SBC #1
BNE @A
Clobbers A, S, 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
TYA
PHA
LDY #8
@Y:
NOP
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
13 bytes
PHP
PHA
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
NOP $00
ADC #1
BNE @A
PLA
PLP
Requires support for unofficial opcodes
14 bytes
PHP
PHA
TXA
PHA
LDX #7
@X:
NOP
DEX
BNE @X
PLA
TAX
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
10 bytes
PHP
LDX #4
@X:
JSR @rts12
DEX
BNE @X
PLP
Clobbers X; and requires @rts12
PHP
LDY #4
@Y:
JSR @rts12
DEY
BNE @Y
PLP
Clobbers Y; and requires @rts12
PHP
TSX
LDY #8
@Y:
PHA
DEY
BNE @Y
TXS
PLP
Clobbers X, and Y
11 bytes
TXA
PHA
LDX #8
@X:
LDA $00
DEX
BNE @X
PLA
TAX
Clobbers A, and Z&N
PHP
LDY #4
@Y:
ROL $00,X
ROR $00,X
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #4
@X:
ROL $00,X
ROR $00,X
DEX
BNE @X
PLP
Clobbers X
12 bytes
PHP
SEC
LDA #6
@A:
NOP
NOP
NOP
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #6
@A:
NOP
NOP
NOP
SBC #1
BNE @A
PLA
Clobbers Z&N, and C
13 bytes
PHP
PHA
TYA
PHA
LDY #10
@Y:
DEY
BNE @Y
PLA
TAY
PLA
PLP
Clobbers nothing, requires nothing


77 cycles

8 bytes
TSX
LDY #9
@Y:
PHA
DEY
BNE @Y
TXS
Clobbers X, Y, and Z&N
LDX #4
@X:
JSR @rts14
DEX
BNE @X
Clobbers X, and Z&N; and requires @rts14
LDY #4
@Y:
JSR @rts14
DEY
BNE @Y
Clobbers Y, and Z&N; and requires @rts14
9 bytes
TXA
PHA
LDX #13
@X:
DEX
BNE @X
PLA
TAX
Clobbers A, and Z&N
LDX #4
@X:
PHP
PLP
PHP
PLP
DEX
BNE @X
Clobbers X, and Z&N
LDY #4
@Y:
PHP
PLP
PHP
PLP
DEY
BNE @Y
Clobbers Y, and Z&N
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
12 bytes
PHP
SEC
LDA #4
@A:
JSR @rts12
SBC #1
BNE @A
PLP
Clobbers A; and requires @rts12
TXA
PHA
LDX #6
@X:
NOP
NOP
NOP
DEX
BNE @X
PLA
TAX
Clobbers A, and Z&N
PHA
SEC
LDA #4
@A:
JSR @rts12
SBC #1
BNE @A
PLA
Clobbers Z&N, and C; and requires @rts12
13 bytes
PHA
SEC
LDA #4
@A:
ROL $00,X
ROR $00,X
SBC #1
BNE @A
PLA
Clobbers Z&N, and C


79 cycles

7 bytes
LDY #6
@Y:
PLA
PLA
DEY
BNE @Y
Clobbers A, Y, S, and Z&N
LDX #6
@X:
PLA
PLA
DEX
BNE @X
Clobbers A, X, S, and Z&N
8 bytes
LDY #6
@Y:
TSX
PLA
TXS
DEY
BNE @Y
Clobbers A, X, Y, and Z&N
LDX #6
@X:
NOP
PHA
PHA
DEX
BNE @X
Clobbers X, S, and Z&N
LDY #6
@Y:
NOP
PHA
PHA
DEY
BNE @Y
Clobbers Y, S, and Z&N
9 bytes
LDX #6
@X:
NOP
NOP
NOP
NOP
DEX
BNE @X
Clobbers X, and Z&N
LDY #6
@Y:
NOP
NOP
NOP
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
PHA
PHA
ADC #1
BNE @A
Clobbers A, S, Z&N, and C; and requires support for unofficial opcodes
10 bytes
SEC
LDA #4
@A:
JSR @rts14
SBC #1
BNE @A
Clobbers A, Z&N, and C; and requires @rts14
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
NOP
NOP
NOP
ADC #1
BNE @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
11 bytes
PHA
TYA
PHA
LDY #12
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHP
TYA
PHA
LDY #12
@Y:
DEY
BNE @Y
PLA
TAY
PLP
Clobbers A


80 cycles

8 bytes
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
11 bytes
PHP
PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A
PLA
PLP
Requires support for unofficial opcodes
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
SEC
LDA #136
@A = * - 1
; ^ Hides DEY
PHA
SBC #1
BMI @A
Clobbers A, S, Z&N, and C
9 bytes
SEC
LDA #136
@A = * - 1
; ^ Hides DEY
BIT $00
SBC #1
BMI @A
Clobbers A, Z&N, C, and V
SEC
LDA #136
@A = * - 1
; ^ Hides DEY
STA @zptemp
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires @zptemp
SEC
LDA #136
@A = * - 1
; ^ Hides DEY
NOP $00
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
10 bytes
SEC
LDA #136
@A = * - 1
; ^ Hides DEY
JMP *+3
SBC #1
BMI @A
Clobbers A, Z&N, and C
13 bytes
PHP
PHA
TXA
PHA
LDX #11
@X:
DEX
BNE @X
PLA
TAX
PLA
PLP
Clobbers nothing, requires nothing


82 cycles

6 bytes
LDY #9
@Y:
PLA
DEY
BNE @Y
Clobbers A, 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
9 bytes
TYA
PHA
LDY #14
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
11 bytes
PHP
PHA
SEC
LDA #13
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


83 cycles

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
13 bytes
PHA
TXA
PHA
LDX #8
@X:
LDA $00
DEX
BNE @X
PLA
TAX
PLA
Clobbers Z&N
PHP
TXA
PHA
LDX #8
@X:
LDA $00
DEX
BNE @X
PLA
TAX
PLP
Clobbers A
14 bytes
PHP
PHA
SEC
LDA #6
@A:
NOP
NOP
NOP
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


84 cycles

7 bytes
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
9 bytes
SEC
LDA #9
@A:
NOP
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PHP
TSX
LDY #9
@Y:
PHA
DEY
BNE @Y
TXS
PLP
Clobbers X, and Y
PHP
LDX #4
@X:
JSR @rts14
DEX
BNE @X
PLP
Clobbers X; and requires @rts14
PHP
LDY #4
@Y:
JSR @rts14
DEY
BNE @Y
PLP
Clobbers Y; and requires @rts14
11 bytes
PHA
TXA
PHA
LDX #13
@X:
DEX
BNE @X
PLA
TAX
PLA
Clobbers Z&N
PHP
TXA
PHA
LDX #13
@X:
DEX
BNE @X
PLA
TAX
PLP
Clobbers A
PHP
LDY #4
@Y:
PHP
PLP
PHP
PLP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #4
@X:
PHP
PLP
PHP
PLP
DEX
BNE @X
PLP
Clobbers X


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
LDX #11
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #11
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
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
14 bytes
PHP
PHA
SEC
LDA #4
@A:
JSR @rts12
SBC #1
BNE @A
PLA
PLP
Requires @rts12
PHA
TXA
PHA
LDX #6
@X:
NOP
NOP
NOP
DEX
BNE @X
PLA
TAX
PLA
Clobbers Z&N
15 bytes
PHP
PHA
SEC
LDA #4
@A:
ROL $00,X
ROR $00,X
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
10 bytes
PHP
LDY #6
@Y:
TSX
PLA
TXS
DEY
BNE @Y
PLP
Clobbers A, X, and Y
11 bytes
PHP
LDY #6
@Y:
NOP
NOP
NOP
NOP
DEY
BNE @Y
PLP
Clobbers Y
PHP
LDX #6
@X:
NOP
NOP
NOP
NOP
DEX
BNE @X
PLP
Clobbers X
12 bytes
PHP
SEC
LDA #4
@A:
JSR @rts14
SBC #1
BNE @A
PLP
Clobbers A; and requires @rts14
PHA
SEC
LDA #4
@A:
JSR @rts14
SBC #1
BNE @A
PLA
Clobbers Z&N, and C; and requires @rts14
PHP
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
NOP
NOP
NOP
ADC #1
BNE @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
NOP
NOP
NOP
ADC #1
BNE @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
13 bytes
PHP
PHA
TYA
PHA
LDY #12
@Y:
DEY
BNE @Y
PLA
TAY
PLA
PLP
Clobbers nothing, requires nothing


87 cycles

8 bytes
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
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

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
11 bytes
PHP
SEC
LDA #136
@A = * - 1
; ^ Hides DEY
BIT $00
SBC #1
BMI @A
PLP
Clobbers A
PHA
SEC
LDA #136
@A = * - 1
; ^ Hides DEY
BIT $00
SBC #1
BMI @A
PLA
Clobbers Z&N, C, and V
PHA
SEC
LDA #136
@A = * - 1
; ^ Hides DEY
STA @zptemp
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires @zptemp
PHA
SEC
LDA #136
@A = * - 1
; ^ Hides DEY
NOP $00
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
12 bytes
PHA
SEC
LDA #136
@A = * - 1
; ^ Hides DEY
JMP *+3
SBC #1
BMI @A
PLA
Clobbers Z&N, and C
16 bytes
PHA
TXA
PHA
LDX #3
@X:
LDA $00
JSR @rts15
DEX
BNE @X
PLA
TAX
PLA
Clobbers Z&N; and requires @rts15
PHA
TXA
PHA
LDX #3
@X:
NOP
NOP
JSR @rts14
DEX
BNE @X
PLA
TAX
PLA
Clobbers Z&N; and requires @rts14
17 bytes
PHA
TYA
PHA
LDY #3
@Y:
NOP
NOP
PHP
PLP
PHP
PLP
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N


89 cycles

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


90 cycles

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
11 bytes
PHA
TSX
LDY #6
@Y:
PLA
PLA
DEY
BNE @Y
TXS
PLA
Clobbers X, Y, and Z&N
15 bytes
PHP
PHA
TXA
PHA
LDX #8
@X:
LDA $00
DEX
BNE @X
PLA
TAX
PLA
PLP
Clobbers nothing, requires nothing


91 cycles

5 bytes
LDX #18
@X:
DEX
BNE @X
Clobbers X, and Z&N
LDY #18
@Y:
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $48 ;hides 'PHA'
SBC #1
BMI @A
Clobbers A, S, Z&N, and C; and requires support for unofficial opcodes
8 bytes
SEC
LDA #11
@A:
PHA
SBC #1
BNE @A
Clobbers A, S, Z&N, and C
9 bytes
SEC
LDA #11
@A:
BIT $00
SBC #1
BNE @A
Clobbers A, Z&N, C, and V
SEC
LDA #11
@A:
STA @zptemp
SBC #1
BNE @A
Clobbers A, Z&N, and C; and requires @zptemp
PHP
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
SBC #1
BMI @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
10 bytes
SEC
LDA #11
@A:
JMP *+3
SBC #1
BNE @A
Clobbers A, Z&N, and C
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
13 bytes
PHP
PHA
TXA
PHA
LDX #13
@X:
DEX
BNE @X
PLA
TAX
PLA
PLP
Clobbers nothing, requires nothing


92 cycles

6 bytes
LDX #13
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
LDY #13
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
7 bytes
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
8 bytes
PHP
LDX #12
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #12
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
9 bytes
TYA
PHA
LDY #16
@Y:
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
11 bytes
PHP
PHA
SEC
LDA #15
@A:
SBC #1
BNE @A
PLA
PLP
Clobbers nothing, requires nothing


93 cycles

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
11 bytes
TYA
PHA
LDY #9
@Y:
NOP
NOP
DEY
BNE @Y
PLA
TAY
Clobbers A, and Z&N
14 bytes
PHP
PHA
SEC
LDA #4
@A:
JSR @rts14
SBC #1
BNE @A
PLA
PLP
Requires @rts14
PHP
PHA
CLC
LDA #250
@A = * - 1
; ^ Hides !NOP
NOP
NOP
NOP
ADC #1
BNE @A
PLA
PLP
Requires support for unofficial opcodes


94 cycles

8 bytes
SEC
LDA #13
@A:
NOP
SBC #1
BNE @A
Clobbers A, Z&N, and C
10 bytes
PHP
SEC
LDA #12
@A:
NOP
SBC #1
BNE @A
PLP
Clobbers A
LDY #3
@Y:
LDX #5
@X:
DEX
BNE @X
DEY
BNE @Y
Clobbers X, Y, and Z&N
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

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


97 cycles

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


98 cycles

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
11 bytes
PHP
SEC
LDA #11
@A:
BIT $00
SBC #1
BNE @A
PLP
Clobbers A
PHA
SEC
LDA #11
@A:
BIT $00
SBC #1
BNE @A
PLA
Clobbers Z&N, C, and V
PHA
SEC
LDA #11
@A:
STA @zptemp
SBC #1
BNE @A
PLA
Clobbers Z&N, and C; and requires @zptemp
PHP
PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
SBC #1
BMI @A
PLA
PLP
Requires support for unofficial opcodes
12 bytes
PHA
SEC
LDA #11
@A:
JMP *+3
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
LDY #14
@Y:
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #14
@X:
NOP
DEX
BNE @X
Clobbers X, and Z&N
8 bytes
PHP
LDX #13
@X:
NOP
DEX
BNE @X
PLP
Clobbers X
PHP
LDY #13
@Y:
NOP
DEY
BNE @Y
PLP
Clobbers Y
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
PHP
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A
PLP
Clobbers A; and requires support for unofficial opcodes
PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A
PLA
Clobbers Z&N, and C; and requires support for unofficial opcodes
11 bytes
PHA
TYA
PHA
LDY #16
@Y:
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N
PHP
TYA
PHA
LDY #16
@Y:
DEY
BNE @Y
PLA
TAY
PLP
Clobbers A


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
LDY #11
@Y:
NOP
NOP
DEY
BNE @Y
Clobbers Y, and Z&N
LDX #11
@X:
NOP
NOP
DEX
BNE @X
Clobbers X, and Z&N
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
SBC #1
BMI @A
Clobbers A, Z&N, and C; and requires support for unofficial opcodes
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
13 bytes
PHA
TYA
PHA
LDY #9
@Y:
NOP
NOP
DEY
BNE @Y
PLA
TAY
PLA
Clobbers Z&N

More

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