3 ms·
Jump to New Location Saving Return Address: JSR [1] Jumps to a subroutine The address before the next instruction (PC - 1) is pushed onto the stack: first the
by hagbard_c 3y ago
Jump to New Location Saving Return Address: JSR [1]
Jumps to a subroutine
The address before the next instruction (PC - 1) is pushed onto the stack: first the upper byte followed by the lower byte. As the stack grows backwards, the return address is therefore stored as a little-endian number in memory.
PC is set to the target address.
Flags: none
Addressing Mode: absolute
Opcode: 20
[1] https://en.wikibooks.org/wiki/6502_Assembly