CALL WC, WZ
Seairth
Posts: 2,474
in Propeller 2
The latest instructions.txt indicate that the WC and WZ effects are available for CALL. However, PNUT disallows their use. Should they be allowed? And, if so, what do they do in the context of a CALL?
Also, to verify, if you include WC and/or WZ on RET, does that restore C and/or Z from the value popped off the stack?
Also, to verify, if you include WC and/or WZ on RET, does that restore C and/or Z from the value popped off the stack?
Comments
The returned flags appear to be transposed.
...works, because the register can supply C and Z, but this is not the case in the 20-bit constant version.
That might have been it! I had actually modified your test snippet to print C and Z after Val. I was relying on RET WC,WZ to restore the C/Z values from before CALL. In a later version, I ended up just storing C and Z separately, then restoring it explicitly with SETCZ.
I did verify that the C and Z fields are being set in the binary, so it appears there is something else going on...
Oh. Good point. I wasn't using the CALL D form. :P