Bigger ALPHA register

Discussion around the Swiss Micros DM42 calculator.
toml_12953
Posts: 437
Joined: Wed May 03, 2017 5:46 pm
Location: Malone, NY USA

Re: Bigger ALPHA register

Post by toml_12953 » Wed Jan 10, 2018 1:06 pm

grsbanks wrote:
Wed Jan 10, 2018 8:40 am
toml_12953 wrote:
Wed Jan 10, 2018 6: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

Dyslexia and dieting don't mix. I went on a low-crab diet and didn't lose an ounce.
DM42 SN: 00025 (Beta)
SN: 00221 (Shipping)

mcc
Posts: 168
Joined: Fri Jun 23, 2017 3:10 am

Re: Bigger ALPHA register

Post by mcc » Wed Jan 10, 2018 1:24 pm

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 v.:3.9.1 / 3.9.1 as compiled by SwissMicros

Dave Britten
Posts: 37
Joined: Wed Jun 14, 2017 7:27 pm

Re: Bigger ALPHA register

Post by Dave Britten » Wed Jan 10, 2018 3:30 pm

grsbanks wrote:
Wed Jan 10, 2018 8:40 am
toml_12953 wrote:
Wed Jan 10, 2018 6: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: 132
Joined: Thu May 04, 2017 10:20 am
Location: France

Re: Bigger ALPHA register

Post by dlachieze » Wed Jan 10, 2018 3:44 pm

mcc wrote:
Mon Jan 08, 2018 4: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 SN: 00425

mcc
Posts: 168
Joined: Fri Jun 23, 2017 3:10 am

Re: Bigger ALPHA register

Post by mcc » Wed Jan 10, 2018 5:20 pm

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 v.:3.9.1 / 3.9.1 as compiled by SwissMicros

cappy
Posts: 56
Joined: Sun Jul 30, 2017 5:30 pm

Re: Bigger ALPHA register

Post by cappy » Tue Feb 06, 2018 7:50 am

Thomas Okken wrote:
Mon Jan 08, 2018 4: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: 132
Joined: Thu May 04, 2017 10:20 am
Location: France

Re: Bigger ALPHA register

Post by dlachieze » Tue Feb 06, 2018 8:39 am

cappy wrote:
Tue Feb 06, 2018 7: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 SN: 00425

eulerfan
Posts: 6
Joined: Fri Aug 24, 2018 10:19 pm

Re: Bigger ALPHA register

Post by eulerfan » Wed Sep 19, 2018 1:22 pm

Thomas Okken wrote:
Mon Jan 08, 2018 4: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: 467
Joined: Tue May 02, 2017 3:48 pm
Location: New Jersey, USA
Contact:

Re: Bigger ALPHA register

Post by Thomas Okken » Thu Sep 20, 2018 12:47 am

eulerfan wrote:
Wed Sep 19, 2018 1: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: 6
Joined: Fri Aug 24, 2018 10:19 pm

Re: Bigger ALPHA register

Post by eulerfan » Thu Sep 20, 2018 3:00 am

Thomas Okken wrote:
Thu Sep 20, 2018 12: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