WP34s: IDIV and the stack
|
01-12-2015, 11:42 PM
Post: #2
|
|||
|
|||
RE: WP34s: IDIV and the stack
(01-12-2015 06:58 PM)Dieter Wrote: This is where I discovered an unexpected behaviour of the IDIV command. With SSIZE 8 set, register T seems to get copied down to Z as the stack drops while the higher levels A to D do not change at all – just as it would happen in SSIZE 4. Confirmed, and it affects other commands, too. It's related to forcing a four-level stack for XROM code outside of xIN: cmdxout() resets XromFlags.xIN before calling lower() or lift() and stack_size() pretends the stack has only four levels because the PC is still in XROM at that point. The fix is probably not as simple as delaying the reset of XromFlags.xIN because that flag also affects reg_address(). Temporarily zeroing out the PC would probably do the trick but it isn't a very elegant solution. It's up to Pauli and Marcus to decide how they'd like to resolve the problem. Personally I'd reexamine whether forcing a four-level stack for XROM code is really necessary. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 7 Guest(s)