News for hackers. Stuff that matters.
Re:How we built JSR by hagbard_c on Friday April 12, 2024 @12:08PM (#40014469)
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

There are no comments on this comment yet.