Post Reply 
WP34s: IDIV and the stack
01-13-2015, 01:19 AM
Post: #4
RE: WP34s: IDIV and the stack
(01-13-2015 12:00 AM)Paul Dale Wrote:  Looks like a bug again, I thought we'd handle this case or at least did.

(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.


(01-12-2015 11:42 PM)Bit Wrote:  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.

The four level forced stack was done to save having to special case the solve and integrate code when we introduced variable stack sizes. Most of XROM came a lot later, so it was easier to remain stuck with this decision than to rework solve and integrate to be more stack friendly -- they can't call XIN, so have to do everything themselves and they are not an easy piece of coding.


To me, the fix would be doing the correct stack operations in XOUT, Marcus?


Pauli

Another possibility is to have solve and integrate adjust the stack size explicitly. It'd mean a few additional XROM instructions but simplified C code.
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)