Hacker News new | ask | show | jobs
by hagbard_c 798 days 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