Bananattack edited this page Mar 5, 2011
·
6 revisions
The Language Reference - Instructions - put
The command this: put src
, copies the contents of the this into the destination dest. If destination is a register, then the zero
and negative
flags in p
are modified. Otherwise, no p-flags change.
Usage | Compatible Receiver (and Opcode, 6502 mnemonic) |
---|---|
this: put a |
x (0x8A, txa ), y (0x98, tya ), M * |
this: put x |
a (0xAA, tax ), s (0xBA, tsx ), M * |
this: put y |
a (0xA8, tay ), M * |
this: put s |
x (0x9A, txs ) |
this: put @direct |
a (0x8D, sta ), x (0x8E, stx ), y (0x8C, sty ) |
this: put @direct[x] |
a (0x9D, sta ) |
this: put @direct[y] |
a (0x99, sta ) |
this: put @zp |
a (0x85, sta ), x (0x86, stx ), y (0x84, sty ) |
this: put @zp[x] |
a (0x95, sta ), y (0x94, sty ) |
this: put @zp[y] |
x (0x96, stx ) |
this: put @[zp[x]] |
a (0x81, sta ) |
this: put @[zp][y] |
a (0x91, sta ) |
\* The code
M: put register
is just an alias for register: get M
, and as a result, the zero
and negative
p-flags will be modified. The documentation for get should be consulted for further info.
See also: get