Bigger ALPHA register

Discussion around the SwissMicros DM42 calculator
toml_12953
Posts: 795
Joined: Wed May 03, 2017 7:46 pm
Location: Malone, NY USA

Re: Bigger ALPHA register

Post by toml_12953 »

grsbanks wrote:
Wed Jan 10, 2018 9:40 am
toml_12953 wrote:
Wed Jan 10, 2018 7:44 am
The problem with that is that the HP 42S (and Free 42) use the absolute value of flag numbers and some people have taken advantage of that in their programs. To maintain compatibility, negative numbers can't be used.
The same applies to register numbers, which is why virtual variables were introduced.
OK, how about "virtual flags" I see a slippery slope ahead! :o
Tom L

Some people call me inept but I'm as ept as anybody!
DM10L SN: 059/100
DM41X SN: 00023 (Beta)
DM41X SN: 00506 (Shipping)
DM42 SN: 00025 (Beta)
DM42 SN: 00221 (Shipping)
WP43 SN: 00025 (Prototype)
mcc
Posts: 277
Joined: Fri Jun 23, 2017 5:10 am

Re: Bigger ALPHA register

Post by mcc »

Hi,

and back to my initial posting:

We have GrMod=<n> for the graphics mode. Even for later extension we only need to extend the range of the values.
What about AlphaMod=<n> for an extended size of the AlphaReg? Same advantages as above apply here also.
The idea of Virtual Variables was choosen to cope with compatibility issues which ariise from using flags - a well considered
decision y SwissMicros (and Thomas, I think. Why not to respect this way of implemeting for further extensions?

Only my two cents...your input system may vary... ;)

Cheers
Meino
DM 42 - SN: 00373, Firmware release v.:3.22. / DMCP 3.24. as compiled by SwissMicros
Dave Britten
Posts: 137
Joined: Wed Jun 14, 2017 9:27 pm

Re: Bigger ALPHA register

Post by Dave Britten »

grsbanks wrote:
Wed Jan 10, 2018 9:40 am
toml_12953 wrote:
Wed Jan 10, 2018 7:44 am
The problem with that is that the HP 42S (and Free 42) use the absolute value of flag numbers and some people have taken advantage of that in their programs. To maintain compatibility, negative numbers can't be used.
The same applies to register numbers, which is why virtual variables were introduced.
Extend to 3-digit flag numbers. Skip flag 100 so that "SF IND ..." with a value of 100 still causes an error, in case any programs rely on that (with flag 25 set, for example). And then maybe have another 3-digit flag that enables the use of flag 100.
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: Bigger ALPHA register

Post by dlachieze »

mcc wrote:
Mon Jan 08, 2018 5:24 am
I want to suggest to increase the capacity of the ALPHA-register in a way that is can hold enough text to fill the whole
screen with the smallest font setting -- we have plenty of RAM!

Another idea would be to incorporate (or implement it back), what Thomas did with his Free42: Printing onto a grafik.
In case of the DM42 it would be: Printing onto the full screen. A virtual variable could handle the switch between IR-based
printing and onto-the-screen printing.

What do you think?
Hi Meino,

I can see the benefit of printing on the full screen to have a kind of terminal output without a printer, but can you provide some use cases for the extended ALPHA-register filling the whole screen with the smallest font setting?
DM42: 00425 - DM41X: β00066 - WP43: 00042
mcc
Posts: 277
Joined: Fri Jun 23, 2017 5:10 am

Re: Bigger ALPHA register

Post by mcc »

Hi dlachieze,

Sorry ... my posting was unclear ...

Currently we ar able to put 44 character of any size onto the screen via the Alpha register (and I think it is only possible,
if not in graphics mode - that is with the stack displayed also).

One way to enhance capability of the DM42 to display results of programs would be the "Thomas way": To do a kind of I/O redirection and
print onto the screen instead via IR. But since this is also the "Free42 way" (THIS IS BY NO MEANS ANY KIND OF CRITISM, THOMAS! :) ) we will
only get HP42s-compatible things printed...including the more than neccessary complicated way to copy the two-line contents of the HP42s compatible part of the LCD ... to the LCD. Especially when plotting more than one function onto the screen this, everything becomes even more complicated.

BUT: For debugging (that is: pure textual ouput) purposes this may become handy.

A way to mix multiple plots AND textual output in sequence onto the screen would be:
1) Allow to OR pixels into the screen for text as for the PIXEL command
2) Dont surround text with a white border (or even better: Make that configurable via a Virtual Variable).
3) For horizontal positioning of text use LF and for the horizontal offset use <space>.
4) To prepare text to be put onto the screen use the alpha register.
5) Use the usual alpha-register related commands to print text to the screen instead onto the printer via IR.

Since the maximum count of characters of text one would want to print onto the screen would be:
Only characters and spaces for the whole screen in the smallest available size ... this would be the
maximum number of characters the alpha register should be able to store.

I think we need the following "items":
Redirectable family of print commands: Output via IR or to the screen.
To switch that, we need a Virtual Variable...say "PrintDev" 0: printer (default) 1: screen
Resizable Alpha register.
To configure that, we need a Virtual Variable...say "ARegSiz" 0: 44 char (default) <num>: size of the register

I am sure, I forgot something...if I will be sure, what it is, I will post again... :)

Cheers
Meino
DM 42 - SN: 00373, Firmware release v.:3.22. / DMCP 3.24. as compiled by SwissMicros
cappy
Posts: 93
Joined: Sun Jul 30, 2017 7:30 pm

Re: Bigger ALPHA register

Post by cappy »

Thomas Okken wrote:
Mon Jan 08, 2018 5:55 am

I was debugging some code in Free42 today, and at one point it did occur to me that having "step over" and "step out" would be nice. SST is really "step into" and that's not always what you want.
Those wouldn't be hard to implement. But where to put on the keyboard?
You could still use the SST and BST keys, but in a shifted mode.
I don’t believe those keys have a shifted mode function- do They?
One could also set a flag which shows an annunciator, to indicate the new functionality for those keys.
DM42 SN: 0612
dlachieze
Posts: 613
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: Bigger ALPHA register

Post by dlachieze »

cappy wrote:
Tue Feb 06, 2018 8:50 am
You could still use the SST and BST keys, but in a shifted mode.
I don’t believe those keys have a shifted mode function- do They?
They do, it’s even the standard way of single stepping forward and backward as explained in the 42S manual p.111, and this is reflected by the key legends.

Next program line: [Shift] [SST]
Previous program line: [Shift] [BST]

You can also use the unshifted arrow keys IF there is no menu displayed, but if there is a menu displayed you have to use the shifted keys.
For example, if you single step over the AON instruction, then you're in Alpha entry mode and you cannot use anymore the unshifted arrow keys for single stepping.
DM42: 00425 - DM41X: β00066 - WP43: 00042
eulerfan
Posts: 20
Joined: Sat Aug 25, 2018 12:19 am

Re: Bigger ALPHA register

Post by eulerfan »

Thomas Okken wrote:
Mon Jan 08, 2018 5:55 am
I was debugging some code in Free42 today, and at one point it did occur to me that having "step over" and "step out" would be nice. SST is really "step into" and that's not always what you want.
Those wouldn't be hard to implement. But where to put on the keyboard? :D
How about two consecutive XEQ keys? Mnemonic: step-over is for XEQ instructions.

The following new feature would be nice too: display the program+line+instruction to be executed if you press SST. Perhaps this "instructino preview" could be turned on/off by Shift MODES PREVW. Enabling this mode would make it very clear that SST is different from XEQ XEQ.
Thomas Okken
Posts: 1098
Joined: Tue May 02, 2017 5:48 pm
Location: Netherlands
Contact:

Re: Bigger ALPHA register

Post by Thomas Okken »

eulerfan wrote:
Wed Sep 19, 2018 3:22 pm
The following new feature would be nice too: display the program+line+instruction to be executed if you press SST.
It already does that. Press and hold SST and it will show you the line that's about to be executed.

Programmable HP calculators have done that at least since the HP-25!
eulerfan
Posts: 20
Joined: Sat Aug 25, 2018 12:19 am

Re: Bigger ALPHA register

Post by eulerfan »

Thomas Okken wrote:
Thu Sep 20, 2018 2:47 am
It already does that. Press and hold SST and it will show you the line that's about to be executed.
I just tried this on my brand new DM42 (Free42 2.0.21), and it works! Thanks.
Programmable HP calculators have done that at least since the HP-25!
I actually owned an HP-25 and never noticed the feature. :lol:
Post Reply