RTS the game genre
RTS games such as
Warcraft II,
Starcraft,
Command and Conquer,
Total Annihilation,
Dungeon Keeper II, and the like tend to emphasize
tactics (individual battles) over
strategy (long-term goals). For this reason, I propose an
alternate expansion for the initials:
Realtime Tactics Simulation
RTS the instruction
A 6502 instruction that pulls a 16-bit number from the stack and loads it into the program counter. Stands for "Return To Saved." Commonly used to ReTurn from a Subroutine or to implement a jump table.
- Function: (Pull Stack) + 1 => PC
- Updates flags: none
- Opcode numbers:
impl $60 (6 cycles)
To implement a jump table with RTS, make sure your table contains addresses minus 1, as RTS increments the address before jumping to it.
lda jumptable+1,x
pha
lda jumptable,x
pha
rts
jumptable:
.dcw sub0-1, sub2-1, sub4-1, sub6-1
RTS takes six CPU cycles to complete (one to fetch the opcode, two to fetch the next two bytes because JSR and RTS use similar control, two to pull the program counter, and one to advance the program counter and commit the stack register).