The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
WP34s: IDIV and the stack
01-12-2015, 06:58 PM
Post: #1
WP34s: IDIV and the stack
I am currently experimenting with some calendar routines on the 34s where the IDIV command often comes in handy. Since these routines are supposed to work with four as well as eight steck levels I checked them in either mode. 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.

Example:
Fill the stack with eight values...
Code:
88 [ENTER] 77 [ENTER] 66 [ENTER] 55 [ENTER] 44 [ENTER] 33 [ENTER] 22 [ENTER] 11

=>   D: 88
     C: 77
     B: 66
     A: 55
     T: 44
     Z: 33
     Y: 22
     X: 11

...and then do an integer division:
Code:
[IDIV]

=>   D: 88                     D: 88
     C: 77                     C: 88
     B: 66                     B: 77
     A: 55      instead of     A: 66
     T: 44                     T: 55
     Z: 44                     Z: 44
     Y: 33                     Y: 33
     X:  2                     X:  2

In other words: IDIV does not seem to handle the stack correctly in SSIZE 8 mode.
I am using a physical 34s with firmware 3.3 3666 (including printer and timer support).

Dieter
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: 10 Guest(s)