Users browsing this thread: 2 Guest(s)
Reverse actors HP MP progression
06-15-2014, 09:49 AM
JSR and JMP are identical instructions, except JSR allows you to easily return to the point you jumped from (with an RTS instruction). Since you're interrupting an existing routine for a bit of custom code (and not writing a brand new, custom subroutine), you'll definitely want to RTS afterward.
For example, here's a section of the block the Edrin pasted above:
Wherever you interrupt this routine, you're going to want to finish executing it after your custom subroutine has run, which is where the RTS instruction would come into play.
For example, here's a section of the block the Edrin pasted above:
Code:
C0/A286: 8D0342 STA $4203 (save as a multiplier)
C0/A289: B90816 LDA $1608,Y (character level)
C0/A28C: 851B STA $1B (save it for now)
C0/A28E: 641F STZ $1F (zero out upper HP byte)
C0/A290: AE1642 LDX $4216
C0/A293: BFA07CED LDA $ED7CA0,X (Initial HP)
C0/A297: 851E STA $1E (save initial HP)
C0/A299: A600 LDX $00 (X = #$0000)
Wherever you interrupt this routine, you're going to want to finish executing it after your custom subroutine has run, which is where the RTS instruction would come into play.
« Next Oldest | Next Newest »
Users browsing this thread: 2 Guest(s)