Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
5
Task/Gotchas/6502-Assembly/gotchas-1.6502
Normal file
5
Task/Gotchas/6502-Assembly/gotchas-1.6502
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
LDA 'J' ;load the 8-bit value stored at memory address 0x004A into the accumulator.
|
||||
OR 3 ;bitwise OR the accumulator with the 8-bit value stored at memory address 0x0003
|
||||
|
||||
|
||||
LDA #'7' ;load the ASCII code for the numeral 7 (which is 0x37) into the accumulator.
|
||||
5
Task/Gotchas/6502-Assembly/gotchas-10.6502
Normal file
5
Task/Gotchas/6502-Assembly/gotchas-10.6502
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
LDA #$20
|
||||
STA $30FF
|
||||
LDA #$40
|
||||
STA $3100
|
||||
JMP ($30FF) ;rather than take the high byte from $3100, the high byte is taken from $3000 instead.
|
||||
1
Task/Gotchas/6502-Assembly/gotchas-2.6502
Normal file
1
Task/Gotchas/6502-Assembly/gotchas-2.6502
Normal file
|
|
@ -0,0 +1 @@
|
|||
byte $45 ;this is the literal constant value $45, not "the value stored at memory address 0x0045"
|
||||
2
Task/Gotchas/6502-Assembly/gotchas-3.6502
Normal file
2
Task/Gotchas/6502-Assembly/gotchas-3.6502
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
INC $2005 ;the intent was to scroll the NES's screen to the right one pixel. That's not gonna happen.
|
||||
;What actually happens? Who knows! (I made this mistake once long ago.)
|
||||
3
Task/Gotchas/6502-Assembly/gotchas-4.6502
Normal file
3
Task/Gotchas/6502-Assembly/gotchas-4.6502
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
LDA #$20
|
||||
CMP #$19
|
||||
BCS foo ;this branch is always taken, since #$20 >= #$19. If this were any other CPU this branch would never be taken!
|
||||
3
Task/Gotchas/6502-Assembly/gotchas-5.6502
Normal file
3
Task/Gotchas/6502-Assembly/gotchas-5.6502
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
LDA #8
|
||||
SEC
|
||||
SBC #4 ;eight minus four
|
||||
2
Task/Gotchas/6502-Assembly/gotchas-6.6502
Normal file
2
Task/Gotchas/6502-Assembly/gotchas-6.6502
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
CLC
|
||||
ADC ___ ;your operand/addressing mode of choice goes here
|
||||
2
Task/Gotchas/6502-Assembly/gotchas-7.6502
Normal file
2
Task/Gotchas/6502-Assembly/gotchas-7.6502
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
LDX #$FF
|
||||
LDA $80,X ;loads from address $007F, not $017F
|
||||
1
Task/Gotchas/6502-Assembly/gotchas-8.6502
Normal file
1
Task/Gotchas/6502-Assembly/gotchas-8.6502
Normal file
|
|
@ -0,0 +1 @@
|
|||
LDA $2080,X ;loads from the correct address regardless of the value of X.
|
||||
5
Task/Gotchas/6502-Assembly/gotchas-9.6502
Normal file
5
Task/Gotchas/6502-Assembly/gotchas-9.6502
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
LDA #$20
|
||||
STA $3000
|
||||
LDA #$40
|
||||
STA $3001
|
||||
JMP ($3000) ;evaluates to JMP $4020
|
||||
Loading…
Add table
Add a link
Reference in a new issue