Post Reply 
Clearing Return Stack on HP-15C
10-07-2024, 07:37 AM
Post: #8
RE: Clearing Return Stack on HP-15C
(10-07-2024 03:22 AM)brouhaha Wrote:  Executing a GSB doesn't "stop" when the return stack is full. It just loses the oldest entry.

If the return stack is full, the program is stopped and Error 5 is displayed.
This can be tested with the following program:
Code:
   001 { 42 21 11 } f LBL A
   002 {    43 35 } g CLx
   003 { 42 21  0 } f LBL 0
   004 {       31 } R/S
   005 {        1 } 1
   006 {       40 } +
   007 {    32  0 } GSB 0

f A
0.0000

R/S
1.0000

R/S
2.0000

R/S
3.0000

R/S
4.0000

R/S
5.0000

R/S
6.0000

R/S
7.0000

R/S
Error 5

On the other hand, if you run GSB 0 after the 7th run, the return stack gets cleared:

(...)

R/S
7.0000

GSB 0
7.0000

R/S
8.0000

R/S
9.0000

R/S
10.0000

R/S
11.0000

R/S
12.0000

R/S
13.0000

R/S
14.0000

R/S
Error 5
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Clearing Return Stack on HP-15C - Pekis - 10-06-2024, 12:58 PM
RE: Clearing Return Stack on HP-15C - Thomas Klemm - 10-07-2024 07:37 AM



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