Users browsing this thread: 1 Guest(s)
JSR Returning to wrong place in code

#6
Posts: 3,971
Threads: 279
Thanks Received: 237
Thanks Given: 58
Joined: Oct 2011
Reputation: 65
Status
Tissue-aware
From a first quick look you're doing a PHA for "save spell ID". The NotSummon branch is ok (one PHX, one PLX). However the IsSummon has zero push two pull (PLA, PLP) at the end and NotSummon eventually end there too to at CharNextSpell. What you do in fact is restoring the flags according to the stack value preceding your initial PHA. Is the PLP really neccesary? If you really need to restore the flags or clear them do something like the following:

This clear all flags
Code:
LDA #$00
PHA
PLP

Edit: Adding a PHP at beginning of your custom code should work too.
  Find
Quote  



Messages In This Thread
RE: JSR Returning to wrong place in code - by madsiur - 12-01-2016, 01:23 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite