Guide/Hints for potential new developer?

General discussion about calculators, SwissMicros or otherwise
Post Reply
chris185
Posts: 33
Joined: Tue May 23, 2023 11:59 am

Guide/Hints for potential new developer?

Post by chris185 »

This may be an unusual question, but is there a sort of short guide to how WP43 (and hence C47 etc.) works?

Something like:

app_main() sets up the hardware and then goes into a loop which sleeps, waiting for keypresses. When a key is pressed, its binding is looked up by ... and then execution is passed to ...

The calculator can be in one of several states: ...

When number keys are pressed, digits are added to a string buffer. When ENTER (or an operator) is pressed, the string is converted to a DECNUM/DECQUAD (see IBM decNumber library) and placed in the stack register X. The Intel Decimal Floating Point library is used for ...

When an operator function is called, it gets the required number of arguments from the stack registers, checks them for ..., converts them to ... and ...



Obviously, the above is completely wrong, me only having glanced at the code so far.

So is there a quick overview? That would really speed things up :-)

I know I can peruse the code, (and ctags is really useful : -), but I'm lazy. At least to start with. When I get obsessed then I stop being lazy...
dlachieze
Posts: 614
Joined: Thu May 04, 2017 12:20 pm
Location: France

Re: Guide/Hints for potential new developer?

Post by dlachieze »

chris185 wrote:
Sat Jun 10, 2023 2:33 pm
This may be an unusual question, but is there a sort of short guide to how WP43 (and hence C47 etc.) works?
No, I was looking for the same thing when I started as a WP43 developer in February (being the lucky owner of a WP43 prototype I didn’t want it to stay a half baked calculator) but there is no such document.

So I took the plunge by looking into the code details. I started with some very small, easy and contained changes that helped me to familiarize with the development flow and to gradually acquire some knowledge of the software architecture, but I must admit that there are still a lot of grey areas for me, specially in the WP43 UI (the C47 UI is another beast that I’ve carefully avoided so far).
DM42: 00425 - DM41X: β00066 - WP43: 00042
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: Guide/Hints for potential new developer?

Post by Walter »

Some parts of the WP43 manuals, although written from a user's point of view, may be helpful. E.g. what's stated in the OM about context-sensitive keys. Or App. B of the ReM.

The fundamental loop of WP43 waiting for keystroke interrupt, however, is not documented AFAIK. This is since I didn't dig into SW and our SW department didn't document separately so far. C47 is an offspring of WP43, thus I guess the situation there is alike.
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
chris185
Posts: 33
Joined: Tue May 23, 2023 11:59 am

Re: Guide/Hints for potential new developer?

Post by chris185 »

Thanks.

Maybe I'll make some notes as I go along...
User avatar
Walter
Posts: 3070
Joined: Tue May 02, 2017 11:13 am
Location: On a mission close to DRS, Germany

Re: Guide/Hints for potential new developer?

Post by Walter »

How are you doing? Learning? Progressing?
WP43 SN00000, 34S, and 31S for obvious reasons; HP-35, 45, ..., 35S, 15CE, DM16L S/N# 00093, DM42β SN:00041
Post Reply