Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Generic-swap/6502-Assembly/generic-swap-1.6502
Normal file
11
Task/Generic-swap/6502-Assembly/generic-swap-1.6502
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
;swap X with Y
|
||||
pha ;push accumulator
|
||||
txa
|
||||
pha ;push x
|
||||
tya
|
||||
pha ;push y
|
||||
pla
|
||||
tax ;pop y into x
|
||||
pla
|
||||
tay ;pop x into y
|
||||
pla ;pop accumulator
|
||||
5
Task/Generic-swap/6502-Assembly/generic-swap-2.6502
Normal file
5
Task/Generic-swap/6502-Assembly/generic-swap-2.6502
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
sta temp ;a label representing a zero page memory address
|
||||
txa
|
||||
pha ;push x
|
||||
ldx temp
|
||||
pla ;pop x into accumulator
|
||||
12
Task/Generic-swap/6502-Assembly/generic-swap-3.6502
Normal file
12
Task/Generic-swap/6502-Assembly/generic-swap-3.6502
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
temp equ $00
|
||||
temp2 equ $01 ;these values don't matter.
|
||||
|
||||
lda temp
|
||||
pha ;push temp
|
||||
lda temp2
|
||||
pha ;push temp2
|
||||
|
||||
pla
|
||||
sta temp ;pop temp2 into temp
|
||||
pla
|
||||
sta temp2 ;pop temp into temp2
|
||||
11
Task/Generic-swap/6502-Assembly/generic-swap-4.6502
Normal file
11
Task/Generic-swap/6502-Assembly/generic-swap-4.6502
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
lda #$33
|
||||
ldx #$44
|
||||
ldy #$55
|
||||
|
||||
pha
|
||||
phx
|
||||
phy
|
||||
|
||||
pla ;a=#$55
|
||||
ply ;y=#$44
|
||||
plx ;x=#$33
|
||||
Loading…
Add table
Add a link
Reference in a new issue