Fixed cycle delay: Difference between revisions

From NESdev Wiki
Jump to navigationJump to search
(update)
(add tesuji)
Line 12: Line 12:
* Alternatively, @rts15 means you know a memory address that contains a harmless 3-cycle instruction that fits your constraints (such as <code>LDA $00</code>), followed by <code>RTS</code>.
* Alternatively, @rts15 means you know a memory address that contains a harmless 3-cycle instruction that fits your constraints (such as <code>LDA $00</code>), followed by <code>RTS</code>.
* @A, @X, @Y are local labels.
* @A, @X, @Y are local labels.


=== 2 cycles ===
=== 2 cycles ===
Line 639: Line 637:
PHP
PHP
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 778: Line 768:
PHP
PHP
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
.byte $0C,$E6,@zptemp ;NOP abs; hides 'INC @zptemp'
SBC #1
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C; and requires @zptemp, and support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 939: Line 921:
PLP
PLP
JSR @rts14</nowiki></pre> || style="padding:2px" | Clobbers S; and requires @rts14
JSR @rts14</nowiki></pre> || style="padding:2px" | Clobbers S; and requires @rts14
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
SBC #1
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 1,015: Line 989:
PLP
PLP
JSR @rts14</nowiki></pre> || style="padding:2px" | Clobbers S; and requires @rts14
JSR @rts14</nowiki></pre> || style="padding:2px" | Clobbers S; and requires @rts14
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #130
@Y = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
DEY
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #130
@X = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
DEX
BMI @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 1,027: Line 1,015:
JSR @rts12
JSR @rts12
JSR @rts12</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N; and requires @rts12
JSR @rts12</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N; and requires @rts12
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 1,036: Line 1,032:
TXS
TXS
PLA</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
PLA</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 1,081: Line 1,069:
JSR @rts12
JSR @rts12
JSR @rts12</nowiki></pre> || style="padding:2px" | Requires @rts12, and support for unofficial opcodes
JSR @rts12</nowiki></pre> || style="padding:2px" | Requires @rts12, and support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
NOP
SBC #1
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
Line 1,293: Line 1,272:
PHP
PHP
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A; and requires support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 1,426: Line 1,385:
{| class="wikitable"
{| class="wikitable"
!colspan="2"|5 bytes
!colspan="2"|5 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #6
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #6
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #6
Line 1,431: Line 1,395:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #6
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
Line 1,494: Line 1,453:
PLA
PLA
PLA</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N
PLA</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDX #4
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 1,502: Line 1,469:
BNE @Y
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDX #4
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
Line 1,516: Line 1,475:
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
LDY #3
@Y:
NOP
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 1,525: Line 1,493:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
LDY #3
@Y:
NOP
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
Line 1,548: Line 1,507:
PHP
PHP
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
.byte $0C,$E6,@zptemp ;NOP abs; hides 'INC @zptemp'
SBC #1
BMI @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A; and requires @zptemp, and support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
.byte $0C,$E6,@zptemp ;NOP abs; hides 'INC @zptemp'
SBC #1
BMI @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C; and requires @zptemp, and support for unofficial opcodes
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 1,586: Line 1,525:
=== 32 cycles ===
=== 32 cycles ===
{| class="wikitable"
{| class="wikitable"
!colspan="2"|6 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #5
@Y = * - 1
; ^ Hides ORA zp
DEY ;first round only
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #5
@X = * - 1
; ^ Hides ORA zp
DEX ;first round only
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
Line 1,610: Line 1,565:
JSR @rts14</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N; and requires @rts14
JSR @rts14</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N; and requires @rts14
|-
|-
!colspan="2"|8 bytes
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #250
@Y = * - 1
; ^ Hides !NOP
NOP
INY
INY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #250
@X = * - 1
; ^ Hides !NOP
NOP
NOP
NOP
INX
LDY #5
INX
@Y:
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
DEY
|-
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
!colspan="2"|8 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 1,627: Line 1,590:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
NOP
LDY #5
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 1,652: Line 1,623:
PLA
PLA
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 1,661: Line 1,641:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #2
@Y:
PHP
PLP
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 1,795: Line 1,766:
PLA
PLA
PLA</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N
PLA</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
SBC #1
BMI @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A; and requires support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
SBC #1
BMI @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 1,832: Line 1,783:
=== 34 cycles ===
=== 34 cycles ===
{| class="wikitable"
{| class="wikitable"
!colspan="2"|5 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
Line 1,839: Line 1,798:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
LDY #6
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
Line 1,853: Line 1,806:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
LDY #6
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
Line 1,865: Line 1,812:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
LDY #6
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, Z&amp;N, and V
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
Line 1,877: Line 1,818:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
LDY #6
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
JSR @rts15
JSR @rts15
JSR @rts15</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N; and requires @rts15
JSR @rts15</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N; and requires @rts15
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
LDY #6
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
Line 1,906: Line 1,835:
JSR @rts15
JSR @rts15
JSR @rts15</nowiki></pre> || style="padding:2px" | Requires @rts15
JSR @rts15</nowiki></pre> || style="padding:2px" | Requires @rts15
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
LDY #6
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
Line 1,947: Line 1,870:
PLA
PLA
PLA</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N
PLA</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHA
PHP
LDY #4
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 1,957: Line 1,889:
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHA
LDY #130
PHP
@Y = * - 1
LDY #4
; ^ Hides !NOP #imm
@Y:
NOP $EA ;hides 'NOP'
DEY
DEY
BNE @Y
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y; and requires support for unofficial opcodes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDA #130
LDX #130
@A = * - 1
@X = * - 1
; ^ Hides !NOP #imm
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
NOP $EA ;hides 'NOP'
PHP
DEX
PLP
BMI @X
SBC #1
PLP</nowiki></pre> || style="padding:2px" | Clobbers X; and requires support for unofficial opcodes
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 2,025: Line 1,956:
PHP
PHP
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
NOP
SBC #1
BMI @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A; and requires support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
NOP
SBC #1
BMI @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|11 bytes
!colspan="2"|11 bytes
Line 2,069: Line 1,978:
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
LDY #6
@Y = * - 1
@Y:
; ^ Hides DEY
DEY
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, S, and Z&amp;N
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #248
@X = * - 1
; ^ Hides SED
INX
INX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and D
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
Line 2,089: Line 2,006:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
LDY #6
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 2,278: Line 2,188:
JSR @rts14
JSR @rts14
JSR @rts14</nowiki></pre> || style="padding:2px" | Requires @rts14
JSR @rts14</nowiki></pre> || style="padding:2px" | Requires @rts14
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
SBC #1
BMI @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A, and S; and requires support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $2808 ;hides 'PHP' and 'PLP'; reads from $2000
SBC #1
BMI @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers S, Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|11 bytes
!colspan="2"|11 bytes
Line 2,325: Line 2,213:
PHP
PHP
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A
PLA
PLP</nowiki></pre> || style="padding:2px" | Requires support for unofficial opcodes
|-
|-
!colspan="2"|12 bytes
!colspan="2"|12 bytes
Line 2,360: Line 2,236:
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #4
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
@Y:
LDY #136
PLA
@Y = * - 1
; ^ Hides DEY
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, S, and Z&amp;N
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #4
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #4
Line 2,601: Line 2,478:
PHP
PHP
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>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</nowiki></pre> || style="padding:2px" | Requires @zptemp, and support for unofficial opcodes
|-
|-
!colspan="2"|12 bytes
!colspan="2"|12 bytes
Line 2,660: Line 2,525:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
LDX #7
@X:
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
Line 2,666: Line 2,537:
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, Z&amp;N, and V
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, Z&amp;N, and V
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
LDX #7
@X:
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
Line 2,700: Line 2,565:
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
LDX #7
LDY #7
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
LDX #7
@X:
@X:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #7
LDY #5
@Y:
@Y = * - 1
; ^ Hides ORA zp
DEY ;first round only
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers A, and Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #5
@X = * - 1
; ^ Hides ORA zp
DEX ;first round only
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers A, and X
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
Line 2,750: Line 2,633:
JSR @rts14
JSR @rts14
JSR @rts14</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N; and requires @rts14
JSR @rts14</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N; and requires @rts14
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #250
@Y = * - 1
; ^ Hides !NOP
NOP
INY
INY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y; and requires support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #250
@X = * - 1
; ^ Hides !NOP
NOP
INX
INX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X; and requires support for unofficial opcodes
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 2,762: Line 2,665:
PLA
PLA
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
NOP
PHP
LDY #5
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 2,772: Line 2,685:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
NOP
PHP
LDY #5
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 2,850: Line 2,753:
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #5
LDX #7
@Y = * - 1
@X:
; ^ Hides ORA zp
NOP
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, S, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
LDY #7
NOP
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
LDY #7
LDY #7
@Y:
@Y:
Line 2,879: Line 2,784:
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
LDX #6
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 2,887: Line 2,800:
BNE @Y
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
LDX #6
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 2,965: Line 2,870:
JSR @rts14
JSR @rts14
JSR @rts14</nowiki></pre> || style="padding:2px" | Requires @rts14
JSR @rts14</nowiki></pre> || style="padding:2px" | Requires @rts14
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>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</nowiki></pre> || style="padding:2px" | Requires support for unofficial opcodes
|-
|-
!colspan="2"|12 bytes
!colspan="2"|12 bytes
Line 3,007: Line 2,900:
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 3,017: Line 2,920:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDY #6
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 3,034: Line 2,929:
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
BIT $00
LDY #6
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 3,140: Line 3,027:
BNE @A
BNE @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers S, Z&amp;N, and C
PLA</nowiki></pre> || style="padding:2px" | Clobbers S, Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
SEC
PLP
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
PHP
PHP
PLP
BIT $00
SBC #1
BMI @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A; and requires support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
PHP
PLP
SBC #1
BMI @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
!colspan="2"|12 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PLP
PHP
BIT $00
PLP
PLP
JSR @rts12
JSR @rts12
Line 3,210: Line 3,073:
PHP
PHP
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
NOP
SBC #1
BMI @A
PLA
PLP</nowiki></pre> || style="padding:2px" | Requires support for unofficial opcodes
|-
|-
!colspan="2"|13 bytes
!colspan="2"|13 bytes
Line 3,246: Line 3,096:
{| class="wikitable"
{| class="wikitable"
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
LDY #5
@Y = * - 1
; ^ Hides ORA zp
NOP
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 3,263: Line 3,129:
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
NOP
LDY #136
NOP
@Y = * - 1
LDX #7
; ^ Hides DEY
@X:
DEY
DEX
DEY
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
NOP
LDX #248
NOP
@X = * - 1
LDY #7
; ^ Hides SED
@Y:
INX
DEY
INX
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
Line 3,301: Line 3,169:
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JSR @rts14
NOP
JSR @rts14
PHP
LDX #6
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
PHP
LDY #6
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JSR @rts14
JSR @rts14
JSR @rts14</nowiki></pre> || style="padding:2px" | Requires @rts14
JSR @rts14</nowiki></pre> || style="padding:2px" | Requires @rts14
|-
|-
Line 3,387: Line 3,237:
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #7
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 3,394: Line 3,251:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #7
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
Line 3,415: Line 3,265:
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>TXA
PHA
LDX #5
@X = * - 1
; ^ Hides ORA zp
DEX ;first round only
DEX
BNE @X
PLA
TAX</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 3,498: Line 3,359:
JSR @rts14
JSR @rts14
JSR @rts14</nowiki></pre> || style="padding:2px" | Requires @rts14
JSR @rts14</nowiki></pre> || style="padding:2px" | Requires @rts14
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
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</nowiki></pre> || style="padding:2px" | Clobbers S; and requires support for unofficial opcodes
|-
|-
!colspan="2"|13 bytes
!colspan="2"|13 bytes
Line 3,540: Line 3,388:
PHP
PHP
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PLP
PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A
PLA
PLP</nowiki></pre> || style="padding:2px" | Requires support for unofficial opcodes
|-
|-
!colspan="2"|14 bytes
!colspan="2"|14 bytes
Line 3,579: Line 3,413:
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
LDY #8
@Y = * - 1
@Y:
; ^ Hides DEY
NOP
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, Z&amp;N, and C
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 3,592: Line 3,434:
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
LDY #8
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
Line 3,604: Line 3,440:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
LDY #8
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, Z&amp;N, and V
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
Line 3,616: Line 3,446:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
LDY #8
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
Line 3,628: Line 3,452:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
LDY #8
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
Line 3,642: Line 3,460:
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
LDY #8
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
Line 3,654: Line 3,466:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
Line 3,890: Line 3,711:
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 3,898: Line 3,727:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDY #7
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 3,941: Line 3,762:
!colspan="2"|10 bytes
!colspan="2"|10 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>TYA
JSR @rts14
PHA
JSR @rts15
LDY #136
JSR @rts15</nowiki></pre> || style="padding:2px" | Requires @rts14, and @rts15
@Y = * - 1
|-
; ^ Hides DEY
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
DEY
TYA
PHA
LDY #6
@Y:
DEY
DEY
BNE @Y
BMI @Y
PLA
PLA
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
JSR @rts14
JSR @rts15
JSR @rts15</nowiki></pre> || style="padding:2px" | Requires @rts14, and @rts15
|-
|-
!colspan="2"|11 bytes
!colspan="2"|11 bytes
Line 4,033: Line 3,855:
{| class="wikitable"
{| class="wikitable"
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHA
LDY #8
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 4,040: Line 3,869:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHA
LDY #8
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 4,065: Line 3,887:
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #5
@Y = * - 1
; ^ Hides ORA zp
NOP
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers A, and Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers A, and X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
Line 4,297: Line 4,137:
PLA
PLA
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHA
SEC
LDA #130
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA ;hides 'NOP'
PHP
PLP
SBC #1
BMI @A
PLA
PLP</nowiki></pre> || style="padding:2px" | Requires support for unofficial opcodes
|-
|-
!colspan="2"|14 bytes
!colspan="2"|14 bytes
Line 4,332: Line 4,158:
=== 49 cycles ===
=== 49 cycles ===
{| class="wikitable"
{| class="wikitable"
!colspan="2"|4 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #6
@Y:
PHA
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #6
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #6
Line 4,347: Line 4,174:
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #4
@Y:
PHP
PLP
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #4
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #4
Line 4,363: Line 4,183:
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers A, and X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
LDY #5
@Y = * - 1
; ^ Hides ORA zp
NOP
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers A, and Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 4,476: Line 4,316:
{| class="wikitable"
{| class="wikitable"
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #7
@Y:
NOP
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #7
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #7
Line 4,483: Line 4,329:
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #7
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #6
@Y:
@Y:
NOP
NOP
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
BNE @Y
|-
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
!colspan="2"|8 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 4,498: Line 4,346:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #6
@Y:
NOP
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 4,548: Line 4,388:
!colspan="2"|12 bytes
!colspan="2"|12 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
BIT $00
TXA
JSR @rts15
PHA
JSR @rts15
LDX #5
JSR @rts15</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and V; and requires @rts15
@X = * - 1
; ^ Hides ORA zp
DEX ;first round only
DEX
BNE @X
PLA
TAX
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JSR @rts12
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JSR @rts12
Line 4,602: Line 4,449:
!colspan="2"|5 bytes
!colspan="2"|5 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #10
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #10
@Y:
@X:
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #10
@Y:
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #10
!colspan="2"|8 bytes
@X:
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
DEY
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X
|-
PLP</nowiki></pre> || style="padding:2px" | Clobbers A, and X
!colspan="2"|8 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 4,621: Line 4,486:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDY #8
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
Line 4,638: Line 4,495:
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
BIT $00
LDY #8
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 4,665: Line 4,514:
!colspan="2"|10 bytes
!colspan="2"|10 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>TXA
TYA
PHA
PHA
LDY #7
LDX #5
@Y:
@X = * - 1
DEY
; ^ Hides ORA zp
BNE @Y
NOP
DEX
BNE @X
PLA
PLA
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N
TAX</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
|-
!colspan="2"|11 bytes
!colspan="2"|11 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
TYA
PHA
LDY #7
@Y:
DEY
BNE @Y
PLA
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 4,778: Line 4,617:
=== 52 cycles ===
=== 52 cycles ===
{| class="wikitable"
{| class="wikitable"
!colspan="2"|5 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, Z&amp;N, and V
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires @zptemp
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
LDX #7
@X:
NOP
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 4,786: Line 4,666:
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
LDX #7
@X:
NOP
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 4,869: Line 4,742:
=== 53 cycles ===
=== 53 cycles ===
{| class="wikitable"
{| class="wikitable"
!colspan="2"|5 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
Line 4,884: Line 4,765:
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #9
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 4,891: Line 4,779:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #9
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
Line 4,946: Line 4,827:
|-
|-
!colspan="2"|12 bytes
!colspan="2"|12 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
DEY
DEY
BMI @Y
PLA
TAY
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 4,983: Line 4,877:
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
LDX #10
LDY #10
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
LDX #10
@X:
@X:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
!colspan="2"|7 bytes
LDY #10
|-
@Y:
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
NOP
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
Line 5,001: Line 4,903:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
LDY #10
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
Line 5,013: Line 4,909:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
LDY #10
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, Z&amp;N, and V
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
Line 5,025: Line 4,915:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
LDY #10
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
Line 5,037: Line 4,921:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
LDY #10
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
LDY #10
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
Line 5,067: Line 4,939:
SBC #1
SBC #1
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHA
PHP
LDX #8
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 5,076: Line 4,957:
BNE @Y
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHA
PHP
LDX #8
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 5,159: Line 5,031:
=== 55 cycles ===
=== 55 cycles ===
{| class="wikitable"
{| class="wikitable"
!colspan="2"|5 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #248
@Y = * - 1
; ^ Hides SED
INY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, Z&amp;N, and D
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #248
@X = * - 1
; ^ Hides SED
INX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and D
|-
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #6
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
@Y:
PHA
PLA
LDY #136
DEY
@Y = * - 1
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, S, and Z&amp;N
; ^ Hides DEY
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #6
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #6
Line 5,279: Line 5,166:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
!colspan="2"|6 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDY #9
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 5,315: Line 5,203:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #4
@Y:
PHP
PLP
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
Line 5,442: Line 5,321:
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>CLC
LDA #136
LDA #248
@A = * - 1
@A = * - 1
; ^ Hides DEY
; ^ Hides SED
SBC #1
ADC #1
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, C, and D
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #7
@X:
NOP
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 5,459: Line 5,346:
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
LDX #7
SEC
@X:
LDA #10
NOP
@A:
DEX
SBC #1
BNE @X
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, S, Z&amp;N, and C
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
Line 5,595: Line 5,481:
!colspan="2"|12 bytes
!colspan="2"|12 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JSR @rts14
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
JSR @rts14
TXA
PHA
LDX #5
@X = * - 1
; ^ Hides ORA zp
NOP
DEX
BNE @X
PLA
TAX
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JSR @rts14
JSR @rts14
JSR @rts15
JSR @rts15
JSR @rts15</nowiki></pre> || style="padding:2px" | Requires @rts14, and @rts15
JSR @rts15</nowiki></pre> || style="padding:2px" | Requires @rts14, and @rts15
|-
|-
!colspan="2"|13 bytes
!colspan="2"|13 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
PHA
TYA
PHA
LDY #7
@Y:
DEY
BNE @Y
PLA
TAY
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 5,682: Line 5,568:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
BIT $00
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
Line 5,693: Line 5,595:
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
LDY #7
@Y:
NOP
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 5,794: Line 5,687:
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 5,810: Line 5,712:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
SEC
LDA #11
@A:
SBC #1
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
Line 5,910: Line 5,805:
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
BIT $00
LDY #10
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 5,926: Line 5,813:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
NOP
DEY
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 5,937: Line 5,834:
!colspan="2"|10 bytes
!colspan="2"|10 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>TXA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>TYA
PHA
PHA
LDX #7
LDY #7
@X:
@Y:
NOP
NOP
DEX
DEY
BNE @X
BNE @Y
PLA
PLA
TAX</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
|-
!colspan="2"|11 bytes
!colspan="2"|11 bytes
Line 6,002: Line 5,899:
=== 62 cycles ===
=== 62 cycles ===
{| class="wikitable"
{| class="wikitable"
!colspan="2"|5 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #136
@X = * - 1
; ^ Hides DEY
DEX
BMI @X</nowiki></pre> || style="padding:2px" | Clobbers X, Y, and Z&amp;N
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHA
LDX #248
LDY #11
@X = * - 1
@Y:
; ^ Hides SED
DEY
INX
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHA
LDY #248
LDX #11
@Y = * - 1
@X:
; ^ Hides SED
DEX
INY
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
NOP
LDX #11
@X:
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
NOP
LDY #11
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
Line 6,045: Line 5,936:
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>TXA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>TYA
PHA
PHA
LDX #10
LDY #10
@X:
@Y:
DEX
DEY
BNE @X
BNE @Y
PLA
PLA
TAX</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #6
@X:
NOP
NOP
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #6
@Y:
NOP
NOP
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 6,144: Line 6,017:
SBC #1
SBC #1
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 6,267: Line 6,162:
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
SEC
CLC
LDA #136
LDA #248
@A = * - 1
@A = * - 1
; ^ Hides DEY
; ^ Hides SED
SBC #1
ADC #1
BMI @A
BNE @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
SEC
CLC
LDA #136
LDA #248
@A = * - 1
@A = * - 1
; ^ Hides DEY
; ^ Hides SED
SBC #1
ADC #1
BMI @A
BNE @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, C, and D
|-
|-
!colspan="2"|11 bytes
!colspan="2"|11 bytes
Line 6,431: Line 6,326:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 6,486: Line 6,371:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>TYA
PHA
LDY #248
@Y = * - 1
; ^ Hides SED
INY
BNE @Y
PLA
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and D
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 6,597: Line 6,492:
!colspan="2"|10 bytes
!colspan="2"|10 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
PHP
SEC
SEC
Line 6,605: Line 6,511:
BNE @A
BNE @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHA
SEC
LDA #11
@A:
SBC #1
BNE @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C
|-
|-
!colspan="2"|11 bytes
!colspan="2"|11 bytes
Line 6,647: Line 6,544:
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #12
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 6,654: Line 6,558:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #12
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
Line 6,723: Line 6,620:
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
TXA
TYA
PHA
PHA
LDX #7
LDY #7
@X:
@Y:
NOP
NOP
DEX
DEY
BNE @X
BNE @Y
PLA
PLA
TAX
TAY
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N
|-
|-
Line 6,753: Line 6,650:
=== 69 cycles ===
=== 69 cycles ===
{| class="wikitable"
{| class="wikitable"
!colspan="2"|5 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, Z&amp;N, and C
|-
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
Line 6,760: Line 6,671:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
LDY #13
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
Line 6,775: Line 6,680:
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #13
LDX #136
@Y:
@X = * - 1
DEY
; ^ Hides DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
DEX
BMI @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
Line 6,786: Line 6,693:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
LDY #13
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, Z&amp;N, and V
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
Line 6,798: Line 6,699:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
LDY #13
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires @zptemp
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
LDY #13
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
Line 6,824: Line 6,713:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
LDY #13
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, S, Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHA
PLP
PHP
PHP
LDX #11
LDY #248
@X:
@Y = * - 1
DEX
; ^ Hides SED
BNE @X
INY
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHA
PLP
PHP
PHP
LDY #11
LDX #248
@Y:
@X = * - 1
DEY
; ^ Hides SED
BNE @Y
INX
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
Line 6,867: Line 6,743:
SBC #1
SBC #1
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, S, Z&amp;N, and C
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, S, Z&amp;N, and C
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 6,889: Line 6,756:
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
!colspan="2"|11 bytes
NOP
|-
NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
TYA
LDY #11
PHA
LDY #10
@Y:
@Y:
DEY
DEY
BNE @Y
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
NOP
PHP
LDX #11
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
!colspan="2"|11 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
TXA
PHA
LDX #10
@X:
DEX
BNE @X
PLA
PLA
TAX
TAY
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N
|-
|-
Line 6,981: Line 6,828:
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
LDX #12
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 6,989: Line 6,844:
BNE @Y
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
LDX #12
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 7,023: Line 6,870:
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C
|-
|-
!colspan="2"|12 bytes
!colspan="2"|11 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
PHA
PHA
SEC
TYA
LDA #10
PHA
@A:
LDY #136
SBC #1
@Y = * - 1
BNE @A
; ^ Hides DEY
BMI @Y
PLA
PLA
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
TAY
PLA</nowiki></pre> || style="padding:2px" | Clobbers S, and Z&amp;N
|-
|-
!colspan="2"|13 bytes
!colspan="2"|12 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHA
LDA $00
TYA
PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
BMI @Y
PLA
TAY
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
PHA
SEC
LDA #10
@A:
SBC #1
BNE @A
PLA
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
|-
!colspan="2"|13 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHA
LDA $00
LDA $00
SEC
SEC
Line 7,116: Line 6,989:
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHA
PHA
SEC
CLC
LDA #136
LDA #248
@A = * - 1
@A = * - 1
; ^ Hides DEY
; ^ Hides SED
SBC #1
ADC #1
BMI @A
BNE @A
PLA
PLA
PLP</nowiki></pre> || style="padding:2px" | Clobbers nothing, requires nothing
PLP</nowiki></pre> || style="padding:2px" | Clobbers nothing, requires nothing
Line 7,130: Line 7,003:
=== 72 cycles ===
=== 72 cycles ===
{| class="wikitable"
{| class="wikitable"
!colspan="2"|6 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, S, Z&amp;N, and C
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, Z&amp;N, and C
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, Z&amp;N, and V
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 7,139: Line 7,056:
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
PHA
LDY #136
LDY #13
@Y = * - 1
@Y:
; ^ Hides DEY
DEY
NOP
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 7,164: Line 7,081:
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDX #136
@X = * - 1
; ^ Hides DEY
DEX
BMI @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, Y, and S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
SEC
SEC
LDA #13
LDA #13
Line 7,270: Line 7,196:
SBC #1
SBC #1
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C
|-
!colspan="2"|9 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A; and requires support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 7,312: Line 7,216:
BNE @A
BNE @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
TYA
PHA
LDY #248
@Y = * - 1
; ^ Hides SED
INY
BNE @Y
PLA
TAY
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and D
|-
|-
!colspan="2"|12 bytes
!colspan="2"|12 bytes
Line 7,332: Line 7,250:
{| class="wikitable"
{| class="wikitable"
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
LDX #14
@X:
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 7,339: Line 7,263:
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
LDX #14
LDX #14
@X:
@X:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
Line 7,352: Line 7,276:
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
LDX #14
@X:
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
Line 7,370: Line 7,288:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
LDX #14
@X:
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
Line 7,376: Line 7,300:
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires @zptemp
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires @zptemp
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
LDX #14
@X:
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
Line 7,413: Line 7,331:
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
PHP
LDY #9
LDX #9
@X:
NOP
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDY #9
@Y:
@Y:
NOP
NOP
Line 7,419: Line 7,346:
BNE @Y
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDX #9
@X:
NOP
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 7,628: Line 7,546:
{| class="wikitable"
{| class="wikitable"
!colspan="2"|5 bytes
!colspan="2"|5 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #15
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #15
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #15
Line 7,634: Line 7,557:
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #15
!colspan="2"|7 bytes
@Y:
|-
DEY
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers A, and X
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 7,648: Line 7,584:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDY #13
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 7,665: Line 7,593:
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
BIT $00
LDY #13
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 7,701: Line 7,621:
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, S, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
!colspan="2"|11 bytes
PHP
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A, and S; and requires support for unofficial opcodes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>TYA
PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers S, Z&amp;N, and C; and requires support for unofficial opcodes
|-
!colspan="2"|11 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>TYA
PHA
PHA
LDY #8
LDY #8
Line 7,754: Line 7,652:
BNE @A
BNE @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers S, Z&amp;N, and C
PLA</nowiki></pre> || style="padding:2px" | Clobbers S, Z&amp;N, and C
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
PHP
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A; and requires support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|12 bytes
!colspan="2"|12 bytes
Line 7,872: Line 7,748:
PLA
PLA
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
PHP
LDX #13
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 7,881: Line 7,766:
BNE @Y
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
PHP
LDX #13
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 7,943: Line 7,819:
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #14
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 7,950: Line 7,833:
BNE @Y
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #14
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
Line 8,010: Line 7,886:
PHP
PHP
PHA
PHA
SEC
CLC
LDA #136
LDA #248
@A = * - 1
@A = * - 1
; ^ Hides DEY
; ^ Hides SED
SBC #1
ADC #1
BMI @A
BNE @A
PLA
PLA
PLP</nowiki></pre> || style="padding:2px" | Clobbers nothing, requires nothing
PLP</nowiki></pre> || style="padding:2px" | Clobbers nothing, requires nothing
Line 8,024: Line 7,900:
=== 79 cycles ===
=== 79 cycles ===
{| class="wikitable"
{| class="wikitable"
!colspan="2"|5 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
@Y = * - 1
; ^ Hides DEY
PHA
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
LDY #15
@Y = * - 1
@Y:
; ^ Hides DEY
DEY
LDA $00
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
@Y = * - 1
; ^ Hides DEY
BIT $00
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, Z&amp;N, and V
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
@Y = * - 1
; ^ Hides DEY
STA @zptemp
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 8,037: Line 7,933:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
@Y = * - 1
; ^ Hides DEY
NOP $00
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
LDY #15
@Y = * - 1
@Y:
; ^ Hides DEY
DEY
JMP *+3
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
Line 8,051: Line 7,953:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
LDY #15
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, Z&amp;N, and V
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>BIT $00
Line 8,063: Line 7,959:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
LDY #15
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>STA @zptemp
Line 8,075: Line 7,965:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
LDY #15
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
Line 8,089: Line 7,973:
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
LDY #15
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
Line 8,102: Line 7,980:
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
|-
!colspan="2"|9 bytes
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHA
PHP
PHP
LDX #13
LDX #10
@X:
@X = * - 1
; ^ Hides ASL A
DEX
DEX
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
PLP</nowiki></pre> || style="padding:2px" | Clobbers A, X, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
!colspan="2"|9 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
BIT $00
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDA $00
LDX #10
@X = * - 1
; ^ Hides ASL A
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers A, and X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHA
PHA
PHP
PHP
LDY #13
LDX #13
@Y:
@X:
DEY
DEX
BNE @Y
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and S
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 8,141: Line 8,046:
PLA
PLA
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
NOP
NOP
PHP
LDY #13
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 8,205: Line 8,100:
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #136
LDY #15
@X = * - 1
@Y:
; ^ Hides DEY
DEY
NOP
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, S, and Z&amp;N
DEX
BMI @X</nowiki></pre> || style="padding:2px" | Clobbers X, Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
Line 8,216: Line 8,112:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, S, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, S, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PLA
LDY #15
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, S, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
Line 8,275: Line 8,177:
BNE @A
BNE @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C
|-
!colspan="2"|11 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A
PLA
PLP</nowiki></pre> || style="padding:2px" | Requires support for unofficial opcodes
|-
|-
!colspan="2"|12 bytes
!colspan="2"|12 bytes
Line 8,349: Line 8,237:
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
BIT $00
BIT $00
LDY #14
LDX #14
@Y:
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
BIT $00
LDY #14
@Y:
DEY
DEY
BNE @Y
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
BIT $00
LDX #14
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
Line 8,461: Line 8,349:
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #9
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
@Y:
LDY #136
PLA
@Y = * - 1
DEY
; ^ Hides DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, S, and Z&amp;N
PHA
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #9
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #9
Line 8,639: Line 8,528:
BNE @A
BNE @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C
|-
!colspan="2"|12 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
PHP
PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A
PLA
PLP</nowiki></pre> || style="padding:2px" | Clobbers S; and requires support for unofficial opcodes
|-
|-
!colspan="2"|13 bytes
!colspan="2"|13 bytes
Line 8,680: Line 8,554:
PLA
PLA
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
PHP
PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP
SBC #1
BMI @A
PLA
PLP</nowiki></pre> || style="padding:2px" | Requires support for unofficial opcodes
|-
|-
!colspan="2"|14 bytes
!colspan="2"|14 bytes
Line 8,765: Line 8,626:
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires @zptemp
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires @zptemp
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
LDY #16
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
Line 8,778: Line 8,633:
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP $00
LDA #137
LDY #16
@A = * - 1
@Y:
; ^ Hides !NOP #imm
DEY
NOP $EA,X ;hides 'NOP'
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
SBC #1
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
LDX #16
LDY #16
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
LDX #16
@X:
@X:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>JMP *+3
LDY #16
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
Line 9,003: Line 8,856:
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHP
LDY #136
LDY #15
@Y = * - 1
@Y:
; ^ Hides DEY
DEY
BIT $00
BNE @Y
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 9,025: Line 8,878:
SBC #1
SBC #1
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, S, Z&amp;N, and C
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, S, Z&amp;N, and C
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
SBC #1
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
Line 9,044: Line 8,888:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
BIT $00
LDY #15
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
Line 9,149: Line 8,985:
=== 87 cycles ===
=== 87 cycles ===
{| class="wikitable"
{| class="wikitable"
!colspan="2"|6 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #248
@X = * - 1
; ^ Hides SED
PLA
INX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, S, Z&amp;N, and D
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #248
@Y = * - 1
; ^ Hides SED
PLA
INY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, S, Z&amp;N, and D
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
|-
Line 9,166: Line 9,018:
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #136
@X = * - 1
; ^ Hides DEY
NOP
DEX
BMI @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X, and Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
Line 9,184: Line 9,045:
PLA
PLA
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
TAY</nowiki></pre> || style="padding:2px" | Clobbers A, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
LDX #11
@X:
NOP
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 9,193: Line 9,063:
BNE @Y
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
LDX #11
@X:
NOP
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 9,363: Line 9,224:
=== 89 cycles ===
=== 89 cycles ===
{| class="wikitable"
{| class="wikitable"
!colspan="2"|5 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
@Y = * - 1
; ^ Hides DEY
PLA
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, S, and Z&amp;N
|-
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
NOP
BMI @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #10
@X = * - 1
; ^ Hides ASL A
NOP
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, Z&amp;N, and C
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #11
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #11
Line 9,370: Line 9,253:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, S, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #11
@Y:
PHA
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, S, and Z&amp;N
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
Line 9,384: Line 9,261:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers A, X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #11
@Y:
LDA $00
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers A, Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #11
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #11
Line 9,396: Line 9,267:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, Z&amp;N, and V
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #11
@Y:
BIT $00
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, Z&amp;N, and V
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #11
@Y:
STA @zptemp
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires @zptemp
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #11
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #11
Line 9,414: Line 9,273:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N; and requires @zptemp
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #11
@Y:
NOP $00
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N; and requires support for unofficial opcodes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #11
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #11
Line 9,435: Line 9,288:
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #11
!colspan="2"|9 bytes
@Y:
JMP *+3
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
!colspan="2"|9 bytes
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #9
@X:
NOP
NOP
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 9,451: Line 9,307:
BNE @Y
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #9
@X:
NOP
NOP
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 9,637: Line 9,484:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $48 ;hides 'PHA'
SBC #1
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, S, Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 9,674: Line 9,511:
|-
|-
!colspan="2"|9 bytes
!colspan="2"|9 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
BIT $00
LDY #16
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 9,682: Line 9,527:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
BIT $00
LDY #16
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDA $00
Line 9,697: Line 9,534:
SBC #1
SBC #1
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
SBC #1
BMI @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A; and requires support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
SBC #1
BMI @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 9,798: Line 9,615:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 9,897: Line 9,704:
|-
|-
!colspan="2"|7 bytes
!colspan="2"|7 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #17
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 9,904: Line 9,718:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #17
@Y:
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
Line 9,937: Line 9,744:
BNE @A
BNE @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers S, Z&amp;N, and C
PLA</nowiki></pre> || style="padding:2px" | Clobbers S, Z&amp;N, and C
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
!colspan="2"|11 bytes
PHP
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
SBC #1
BMI @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A; and requires support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
SBC #1
BMI @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
!colspan="2"|11 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 10,168: Line 9,953:
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
LDX #17
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 10,176: Line 9,969:
BNE @Y
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
LDX #17
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 10,242: Line 10,027:
{| class="wikitable"
{| class="wikitable"
!colspan="2"|5 bytes
!colspan="2"|5 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #19
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #19
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #19
Line 10,248: Line 10,038:
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #19
!colspan="2"|8 bytes
@Y:
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
!colspan="2"|8 bytes
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #136
@Y = * - 1
; ^ Hides DEY
NOP
NOP
BMI @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHP
LDX #10
LDY #17
@X = * - 1
@Y:
; ^ Hides ASL A
DEY
NOP
BNE @Y
DEX
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y, and S
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers A, and X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
Line 10,281: Line 10,076:
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #11
LDX #11
@Y:
@X:
BIT $00
BIT $00
DEY
DEX
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #11
@X:
BIT $00
DEX
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
Line 10,477: Line 10,264:
{| class="wikitable"
{| class="wikitable"
!colspan="2"|6 bytes
!colspan="2"|6 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
LDX #19
@X:
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
Line 10,484: Line 10,277:
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
!colspan="2"|7 bytes
LDX #19
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #18
@X:
@X:
DEX
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
BNE @X
|-
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
!colspan="2"|7 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 10,498: Line 10,292:
BNE @Y
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDX #18
@X:
DEX
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
Line 10,551: Line 10,338:
BNE @A
BNE @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C
|-
!colspan="2"|13 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHA
PHA
SEC
SEC
LDA #137
LDA #9
@A = * - 1
@A:
; ^ Hides !NOP #imm
NOP
NOP $EA,X ;hides 'NOP'
NOP
SBC #1
SBC #1
BMI @A
BNE @A
PLA
PLA
PLP</nowiki></pre> || style="padding:2px" | Requires support for unofficial opcodes
PLP</nowiki></pre> || style="padding:2px" | Clobbers nothing, requires nothing
|-
|}
 
 
=== 99 cycles ===
{| class="wikitable"
!colspan="2"|6 bytes
|-
|-
!colspan="2"|13 bytes
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #14
@X:
NOP
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #14
@Y:
NOP
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
PHA
LDY #13
SEC
@Y:
LDA #9
NOP
@A:
DEY
NOP
BNE @Y
NOP
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
SBC #1
BNE @A
PLA
PLP</nowiki></pre> || style="padding:2px" | Clobbers nothing, requires nothing
|-
|}
 
 
=== 99 cycles ===
{| class="wikitable"
!colspan="2"|6 bytes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDY #14
@Y:
NOP
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>LDX #14
@X:
NOP
DEX
BNE @X</nowiki></pre> || style="padding:2px" | Clobbers X, and Z&amp;N
|-
!colspan="2"|8 bytes
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
Line 10,606: Line 10,389:
BNE @X
BNE @X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
PLP</nowiki></pre> || style="padding:2px" | Clobbers X
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
LDY #13
@Y:
NOP
DEY
BNE @Y
PLP</nowiki></pre> || style="padding:2px" | Clobbers Y
|-
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
Line 10,631: Line 10,406:
SBC #1
SBC #1
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C
BNE @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHP
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A
PLP</nowiki></pre> || style="padding:2px" | Clobbers A; and requires support for unofficial opcodes
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA44 ;hides 'NOP zp'
SBC #1
BMI @A
PLA</nowiki></pre> || style="padding:2px" | Clobbers Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|10 bytes
!colspan="2"|10 bytes
Line 10,734: Line 10,489:
DEY
DEY
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
BNE @Y</nowiki></pre> || style="padding:2px" | Clobbers Y, and Z&amp;N
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EAEA ;hides two 'NOP's
SBC #1
BMI @A</nowiki></pre> || style="padding:2px" | Clobbers A, Z&amp;N, and C; and requires support for unofficial opcodes
|-
|-
!colspan="2"|8 bytes
!colspan="2"|8 bytes
Line 10,798: Line 10,545:
PLA
PLA
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
PLP</nowiki></pre> || style="padding:2px" | Clobbers S
|-
| style="padding:2px" |<pre style="margin:2px;padding:3px"><nowiki>NOP
PHP
PHA
SEC
LDA #137
@A = * - 1
; ^ Hides !NOP #imm
NOP $EA,X ;hides 'NOP'
SBC #1
BMI @A
PLA
PLP</nowiki></pre> || style="padding:2px" | Requires support for unofficial opcodes
|-
|-
!colspan="2"|13 bytes
!colspan="2"|13 bytes

Revision as of 01:57, 14 March 2016

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