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 
(12C) Does a STO pop the stack or not?
06-19-2019, 12:00 PM
Post: #1
(12C) Does a STO pop the stack or not?
I was wondering if someone could answer the following question for me. I understood that 12C and its platinum version were completely compatible except for the line address (extra 0 in platinum) and the LSTx command is in a different location on Platinum plus it has one or tow additional commands such as x^2 etc.

A program I have written on 12C won't run on the Platinum and I have found it is for the following reason:

Take stack to be: 1, 2, 3, 4 (for X, Y, Z, T)

01 STO FV
02 0
03 STO PV
04 Rv

Now, according to my understanding of how the stack works it should be after these: 1, 2, 3, 0

But I ran into problems debugging the software on the 12C. I thought I had misunderstood how the stack operates as the 12C stack after the operations above is: 2, 3, 4, 0. I have confirmed this by running it a number of times.

I now find that on the Platinum that it does in fact follow how I understood it works and the stack is 1, 2, 3, 0.

I have narrowed this down to the first two lines above. A STO FV followed by the 0 entry pops the stack and pushes 0 onto it so it is: 0, 2, 3, 4.

Which model is correctly performing these operations and why have they introduced a very subtle but awkward incompatibility between the models?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C) Does a STO pop the stack or not? - Joe_H - 06-19-2019 12:00 PM



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