Users browsing this thread: 1 Guest(s)
JSR Returning to wrong place in code
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
Edit: Adding a PHP at beginning of your custom code should work too.
This clear all flags
Code:
LDA #$00
PHA
PLP
Edit: Adding a PHP at beginning of your custom code should work too.
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)