Ad1) If dynamic stack extension and NSTK is enabled there is a strange display behaviour after CLST.
Ad2) a simple Program to determine Pi by Monte Carlo runs perfectly on free42 Ver. 3.02 (MacOS version) in both configurations 4STK and NSTK
But this program fails with insufficient memory on DM42 with NSTK enabled. In 4STK it is working.
UPDATE: DMCP-3.21 / DM42-3.18 and dynamic stack extension
UPDATE: DMCP-3.21 / DM42-3.18 and dynamic stack extension
- Attachments
-
- PiMCx.txt.zip
- (780 Bytes) Downloaded 123 times
-
- NSTK&CLST.bmp (12.31 KiB) Viewed 2739 times
-
- PiMCx.raw
- (159 Bytes) Downloaded 112 times
-
- Posts: 1102
- Joined: Tue May 02, 2017 5:48 pm
- Location: Netherlands
- Contact:
Re: UPDATE: DMCP-3.21 / DM42-3.18 and dynamic stack extension
With empty stack, the label 1: is shown just so the display isn't completely empty. For RPLishness, I should have made it show 2: and 1:... maybe I'll do that in the next update.
-
- Posts: 1102
- Joined: Tue May 02, 2017 5:48 pm
- Location: Netherlands
- Contact:
Re: UPDATE: DMCP-3.21 / DM42-3.18 and dynamic stack extension
https://thomasokken.com/free42/#big-stack
Big Stack mode is quite powerful, but please be aware that existing programs will typically not work correctly in this mode, since they expect the fixed four-level stack. Use this mode only for programs you have verified to be compatible, or for programs specifically written for Big Stack mode.
Re: UPDATE: DMCP-3.21 / DM42-3.18 and dynamic stack extension
But why the program is running properly on free42 e.g. MacOS version, both in 4STK and NSTK?
Guess DM42 is different here?
Also in free42 (again MacOS version ) after CLST in NSTK mode it shows exactly 1: and 2:
Guess DM42 is different here?
Also in free42 (again MacOS version ) after CLST in NSTK mode it shows exactly 1: and 2:
Re: UPDATE: DMCP-3.21 / DM42-3.18 and dynamic stack extension
On a typical Mac, you can probably use millions of stack levels before running out of memory, whereas on a DM42, that limit is closer to ~1000 levels; the platform simply does not as much RAM as your Mac, which probably has many GBytes of RAM available.
--bob p
DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
DM42: β00071 & 00282, DM41X: β00071 & 00656, DM10L: 071/100
Re: UPDATE: DMCP-3.21 / DM42-3.18 and dynamic stack extension
yup forgot that my Mac is a bit more capable than my DM42
Re: UPDATE: DMCP-3.21 / DM42-3.18 and dynamic stack extension
Yes, the DM42 has a limited memory, so you reach the insufficient memory condition earlier on the DM42 than on a Mac.
Your program is pushing values on the stack at each loop. This is not a problem in 4STK mode because when a value is pushed out of T it just disappears, but in NSTK mode you're filling the stack and at some point the stack is full hence the insufficient memory condition.
So when you're writing a program to be run in NSTK mode you need to ensure it will consume the data put on the stack and not fill it indefinitely. This is a good example of a standard RPN program written for the classic 4-level stack and not compatible with a RPL-like big stack.
Your program is pushing values on the stack at each loop. This is not a problem in 4STK mode because when a value is pushed out of T it just disappears, but in NSTK mode you're filling the stack and at some point the stack is full hence the insufficient memory condition.
So when you're writing a program to be run in NSTK mode you need to ensure it will consume the data put on the stack and not fill it indefinitely. This is a good example of a standard RPN program written for the classic 4-level stack and not compatible with a RPL-like big stack.
DM42: 00425 - DM41X: β00066 - WP43: 00042
Re: UPDATE: DMCP-3.21 / DM42-3.18 and dynamic stack extension
Yes, I probably already became aware of this during the program execution in 4STK mode. Since you can watch how stack contents alternate. I haven't used my HP-50g in a long time because the DM42 is more fascinating ...