Post Reply 
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
WP34s: IDIV and the stack - Dieter - 01-12-2015, 06:58 PM
RE: WP34s: IDIV and the stack - Bit - 01-12-2015 11:42 PM
RE: WP34s: IDIV and the stack - Paul Dale - 01-13-2015, 12:00 AM
RE: WP34s: IDIV and the stack - Bit - 01-13-2015, 01:19 AM
RE: WP34s: IDIV and the stack - walter b - 01-13-2015, 01:04 PM
RE: WP34s: IDIV and the stack - Bit - 01-14-2015, 02:38 AM
RE: WP34s: IDIV and the stack - Bit - 01-17-2015, 02:12 AM
RE: WP34s: IDIV and the stack - BarryMead - 01-17-2015, 04:40 AM
RE: WP34s: IDIV and the stack - walter b - 01-17-2015, 04:44 AM
RE: WP34s: IDIV and the stack - BarryMead - 01-17-2015, 04:53 AM
RE: WP34s: IDIV and the stack - Bit - 01-17-2015, 05:08 AM
RE: WP34s: IDIV and the stack - BarryMead - 01-17-2015, 03:19 PM
RE: WP34s: IDIV and the stack - Bit - 01-17-2015, 03:54 PM
RE: WP34s: IDIV and the stack - BarryMead - 01-17-2015, 04:09 PM



User(s) browsing this thread: 1 Guest(s)