Post Reply 
Casio fx-50F/fx-50FH programming
09-08-2019, 03:16 AM
Post: #1
Casio fx-50F/fx-50FH programming
I scored a dirt cheap Casio fx-50FH to play around with, and I've been seeing what I can do with its very limited programming capabilities. Here's some of the more noteworthy features (or lack thereof):

- Can store four programs, 680 bytes total
- NO subroutines; you can't call one program from inside another
- Has labels and goto, but also some structured programming: While and For loops with Break, and If/Then/Else, though you can't seem to nest loops
- Only 7 variables (A, B, C, D, X, Y, M), with no indirect addressing; can use M+ and M- to directly increment/decrement M
- No prompt messages; when getting user input, it displays a simple prompt like "X?"

I won't describe all its math capabilities - it's a pretty typical solar-powered Casio, with complex math, 1 and 2 variable stats, etc. - but it's worth mentioning that it has NO integer/fractional part functions. It does at least have a rounding function, which gave me enough to write a simple prime factor finder (trial division by 2 and sequential odd numbers, no mod-30 sieve here):

Code:
3→M
?→X
Fix 0
While X÷2=Rnd(X÷2)
X÷2→X
2◢
WhileEnd
Lbl 1
X=1⇒Goto 9
M²≥X⇒X→M
While X÷M=Rnd(X÷M)
X÷M→X
M◢
WhileEnd
2M+
Goto 1
Lbl 9
Norm 1

Replace the "Norm 1" at the end with your choice of display mode to return to after running the program.

This is definitely one of the least capable programmables I've seen from Casio; you're better off buying just about any other programmable model they've ever made. Smile
Visit this user's website Find all posts by this user
Quote this message in a reply
09-08-2019, 10:24 AM
Post: #2
RE: Casio fx-50F/fx-50FH programming
(09-08-2019 03:16 AM)Dave Britten Wrote:  IThis is definitely one of the least capable programmables I've seen from Casio; you're better off buying just about any other programmable model they've ever made. Smile

Still, it's better than the original, wallet-cased fx-50F, which only had 29 steps!

The Casio programmables (the traditional calculators, not the BASIC portables) went seriously downhill after the FX-602P for a few years. The wallet-cased programmables didn't catch up with the 602P until the fx-4000p.

I think of the fx-50F Plus as more like a souped-up fx-115ms, but with added formula library and programming capability inspired by the older fx-50F.

— Ian Abbott
Find all posts by this user
Quote this message in a reply
09-10-2019, 09:38 PM
Post: #3
RE: Casio fx-50F/fx-50FH programming
Here is my IRR program for fx-50FH. Try figure out how can I use ALL variables without change them and the program do loops, counts and do iterations for calculating IRR. This machine has hidden capabilities Wink





Check my chanel, you can find the program list, and if you check my 82ARX video about IRR you can find the math behind (better than the Wikipedia's iterative process Smile Wink )

My videos

Csaba
Find all posts by this user
Quote this message in a reply
09-10-2019, 10:03 PM
Post: #4
RE: Casio fx-50F/fx-50FH programming
It was earlier in one topic, but again: 13 steps secant method on CASIO fx-50F attached! I hope you enjoy it!

Csaba

Attachment - 13 steps secant method on CASIO fx-50F
Find all posts by this user
Quote this message in a reply
09-15-2019, 01:14 PM
Post: #5
RE: Casio fx-50F/fx-50FH programming
(09-08-2019 03:16 AM)Dave Britten Wrote:  This is definitely one of the least capable programmables I've seen from Casio; you're better off buying just about any other programmable model they've ever made.

This is true, but as I know, no other company which manufacture programmable scientific model. Many schools there is only one limitation for the applicable calculators: text storage capability not allowed. That is why all the graphing calculators are banned from the exams (in Hungary) and scientific models are accepted. In this case the best is a programmable CASIO. Eg. a 3650P(II) or 50FH. HP35S is also looks good, but that calculator out of the market, but CASIOs are available.

Csaba
Find all posts by this user
Quote this message in a reply
09-25-2019, 04:22 PM (This post was last modified: 09-25-2019 06:35 PM by Csaba Tizedes.)
Post: #6
RE: Casio fx-50F/fx-50FH programming
SIGN(var) on CASIO: (var>0)-(var<0)
I really like how CASIOs are evaluates logical expressions.

Csaba
Find all posts by this user
Quote this message in a reply
09-25-2019, 07:28 PM
Post: #7
RE: Casio fx-50F/fx-50FH programming
(09-25-2019 04:22 PM)Csaba Tizedes Wrote:  SIGN(var) on CASIO: (var>0)-(var<0)
I really like how CASIOs are evaluates logical expressions.

Csaba

Yeah, I think Casios started treating (in)equalities as mathematical operators rather than special conditional constructs somewhere around the 9750 and 7400. Since there were also no logical operators before then, you had to chain conditions to do an "and": X>0=>X<10=>Goto 3

It's also a useful technique for graphing stepwise functions.

I believe TIs have done the same since at least the 82. I don't think the 81, 82, or 80 have any logical operators, so you have to do addition on the comparison results to get the same effect: If (X>0)*(X<10):Goto 3
Visit this user's website Find all posts by this user
Quote this message in a reply
09-26-2019, 07:34 AM (This post was last modified: 09-26-2019 07:36 AM by ijabbott.)
Post: #8
RE: Casio fx-50F/fx-50FH programming
(09-25-2019 04:22 PM)Csaba Tizedes Wrote:  SIGN(var) on CASIO: (var>0)-(var<0)
I really like how CASIOs are evaluates logical expressions.

Csaba

A similar trick can be used to determine the ordering of two numbers:

\( (a > b) - (a < b) \)

That yields -1, 0 or 1 depending on the ordering.

That's what I usually do to calculate the return value for comparison functions for use with the qsort() (quicksort) function in the C programming language standard library. In that case, the comparison function is allowed to return any integer because only the sign is used to determine the sort order of its two parameters. But using the above trick avoids arithmetic overflow and works for both signed and unsigned numbers. It is easy enough to modify the expression to reverse the ordering.

It doesn't necessarily generate the tightest binary code, but is pretty close to generating the tightest code, and it looks pretty.

— Ian Abbott
Find all posts by this user
Quote this message in a reply
09-30-2019, 05:58 AM
Post: #9
RE: Casio fx-50F/fx-50FH programming
(09-15-2019 01:14 PM)Csaba Tizedes Wrote:  
(09-08-2019 03:16 AM)Dave Britten Wrote:  This is definitely one of the least capable programmables I've seen from Casio; you're better off buying just about any other programmable model they've ever made.

This is true, but as I know, no other company which manufacture programmable scientific model. Many schools there is only one limitation for the applicable calculators: text storage capability not allowed. That is why all the graphing calculators are banned from the exams (in Hungary) and scientific models are accepted. In this case the best is a programmable CASIO. Eg. a 3650P(II) or 50FH. HP35S is also looks good, but that calculator out of the market, but CASIOs are available.

Csaba

Here in Hong Kong we have a restriction where dot-matrix displays are forbidden... The fx-50FH (II) is pretty much the best approved calculator here. It is the only calculator sold here in Hong Kong with programming capabilities and no dot matrix display. Oh and no graphing calculators, of course. Even the Casio fx-MS models are banned for some reason.

By the way, the H in fx-50FH stands with for "Hong Kong", because the exam board here, the HKEAA (who sticks "approved" labels on calculators they approve... Does any other exam board do that?) didn't like the 50F plus' ability to show built-in formulas.

Also, Casio makes another non-graphing programmable calculator, the fx-5800P, which is pretty nice. The programming is certainly better than it is on the fx-50FH though, but not by much.

By the way, how common are fx-50F(H)/fx-3650P IIs outside Hong Kong? Pretty much everyone has one here but I don't see that much demand for a calculator like this other than exam requirements.
Find all posts by this user
Quote this message in a reply
10-03-2019, 02:06 PM
Post: #10
RE: Casio fx-50F/fx-50FH programming
(09-30-2019 05:58 AM)ddd Wrote:  Here in Hong Kong we have a restriction where dot-matrix displays are forbidden... The fx-50FH (II) is pretty much the best approved calculator here. It is the only calculator sold here in Hong Kong with programming capabilities and no dot matrix display. Oh and no graphing calculators, of course. Even the Casio fx-MS models are banned for some reason.

By the way, the H in fx-50FH stands with for "Hong Kong", because the exam board here, the HKEAA (who sticks "approved" labels on calculators they approve... Does any other exam board do that?) didn't like the 50F plus' ability to show built-in formulas.

Also, Casio makes another non-graphing programmable calculator, the fx-5800P, which is pretty nice. The programming is certainly better than it is on the fx-50FH though, but not by much.

By the way, how common are fx-50F(H)/fx-3650P IIs outside Hong Kong? Pretty much everyone has one here but I don't see that much demand for a calculator like this other than exam requirements.

The fx-5800P is actually quite a bit more programmable than the fx-50F, and very close to what the graphing models are capable of (without the graphing). It's not nearly as fast as they are, though. Plus you can save user-defined formulas, and you can feed them into the solver if you only use single-letter variable names.

The fx-50F and fx-3650P/fx-3950P are pretty much non-existent in North America, since Casio doesn't release any of their non-graphing programmable models here. They're pretty easy to find on ebay, though.
Visit this user's website Find all posts by this user
Quote this message in a reply
10-06-2019, 12:33 AM
Post: #11
RE: Casio fx-50F/fx-50FH programming
I don't know why Casio doesn't sell the fx-50FH or the fx-3650P in the United States, they should consider it.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-07-2020, 05:15 AM
Post: #12
RE: Casio fx-50F/fx-50FH programming
(09-30-2019 05:58 AM)ddd Wrote:  Here in Hong Kong we have a restriction where dot-matrix displays are forbidden... The fx-50FH (II) is pretty much the best approved calculator here. It is the only calculator sold here in Hong Kong with programming capabilities and no dot matrix display. Oh and no graphing calculators, of course. Even the Casio fx-MS models are banned for some reason.

Really this fx-50FH has dot matrix display: more or less half display is dot matrix display. Of course lower part is 7-segement numbers display. But the problem I am thinking about is this calculator could be internally modified to show information (text) on upper dot matrix display. It can be modified and store tons of info in a small actual memory. Even it could connect by wireless and send/receive information.

If you want to be sure no cheating is possible, the only allowable calculator would be all 7-segment display (plus annunciators. i.e. fixed elements showing for example "RAD"/"DEG"/etc), and no matrix/text capability on display.

And it is easy to check if an LCD display is only 7-segments or not.

I think there is no problem with programmability but with text/cheating/mods.

Actually Casio makes 7-segments display scientific calculators, some they draw so little power they can be solar without back-up battery, because they can work with very low ambient light, where more power solar calculators can't operate without back-up battery (more circuits plus dot-matrix displays draw more power).

And of course, you can make very good programmable calculators with only 7-segments displays: for example Casio fx-501P/502P (much better than a lot of posterior Casio programmable calculators), and for example HP Voyager series, specially HP-15C, which is an extraordinary example of that. Obviously no 7-segement programmable calculator is on market today.

(09-30-2019 05:58 AM)ddd Wrote:  By the way, how common are fx-50F(H)/fx-3650P IIs outside Hong Kong? Pretty much everyone has one here but I don't see that much demand for a calculator like this other than exam requirements.

I live in Spain/EU, and I bought one by Ebay, because I wanted to play with it and specially because it is the only SOLAR powered programmable calculator, and a cheap calculator. Being programmable and SOLAR makes me hot. I know program model/capabilities are really poor, and program introduction is even worse (you must move with cursor key by slow menus to introduce some programming commands) but it is the best SOLAR programmable calculator I know about.
Find all posts by this user
Quote this message in a reply
08-07-2020, 04:09 PM
Post: #13
RE: Casio fx-50F/fx-50FH programming
(08-07-2020 05:15 AM)David22 Wrote:  program model/capabilities are really poor

Not the best, but 680 steps, 4 program area but no subroutines, 10 labels in each, Goto is available, 7 variables, common scientific functions + MODEs. The code is readable and input asks with the name of the variable, output also shows the variable name or the formula. You can use Ans as a variable in some cases and in SD or REG mode you can use statistics registers as variables also, eg. easily build a counter with 'n' and 'DT'. If/Then/Else, While/Break/EndWhile, For/To/Step/Next.

I think this is far better than some in the 80's and 90's.
And, frankly speaking, no other non-graphing programmable on the market.

Csaba
Find all posts by this user
Quote this message in a reply
08-07-2020, 05:41 PM
Post: #14
RE: Casio fx-50F/fx-50FH programming
(08-07-2020 04:09 PM)Csaba Tizedes Wrote:  I think this is far better than some in the 80's and 90's.
And, frankly speaking, no other non-graphing programmable on the market.

Csaba

Don't forget the Casio fx-5800P! It's considerably more powerful than the fx-50FH, but the fx-50FH is probably the top solar-powered programmable.
Visit this user's website Find all posts by this user
Quote this message in a reply
08-07-2020, 07:04 PM
Post: #15
RE: Casio fx-50F/fx-50FH programming
(08-07-2020 05:41 PM)Dave Britten Wrote:  Don't forget the Casio fx-5800P!

Yes, but it looks like a graphics model, therefore on an exam spotted easily.
Find all posts by this user
Quote this message in a reply
08-16-2020, 06:59 PM
Post: #16
RE: Casio fx-50F/fx-50FH programming
(08-07-2020 04:09 PM)Csaba Tizedes Wrote:  
(08-07-2020 05:15 AM)David22 Wrote:  program model/capabilities are really poor

Not the best, but 680 steps, 4 program area but no subroutines, 10 labels in each, Goto is available, 7 variables, common scientific functions + MODEs. The code is readable and input asks with the name of the variable, output also shows the variable name or the formula. You can use Ans as a variable in some cases and in SD or REG mode you can use statistics registers as variables also, eg. easily build a counter with 'n' and 'DT'. If/Then/Else, While/Break/EndWhile, For/To/Step/Next.

I think this is far better than some in the 80's and 90's.
And, frankly speaking, no other non-graphing programmable on the market.

Csaba

You are totally right if we compare fx-50F(H)/fx-3650P with a lot of Casio scientific programmable models from 80's and 90's where only jump to first program step was available, limiting possibilities (even some times you had to use a program area to initialize program and other to repetitive process, consuming 2 area programs in machines where you had only those 2 areas or at best 4 areas), and in some of those models you programmed in the blind: for example Casio fx-180P (my first scientific and first "programmable" calculator). In some later Casio calculators with same programming model at least you can see what you where programming and you can revise and edit programs: for example Casio fx-180P Plus or Casio fx-3600P (those have an small 4 chars area in upper right corner, where you see introduced commands).

I think in those horrible Casio programming model with only jump instruction to 1st step, "programming" capability was there mostly for defined integral calculus and repetitive calculus (for example to sample a function in a lot of points). Although some of those calculators, for example Casio fx-3800P, lost integral calculus to include Base-n (hex/dec/octal/bin) conversion/operation (this model even lost fractions).

About fx-50F/fx-50FH programming I think the use of long menus (only accessible with repetitive cursor key press) to introduce programming commands get more annoyed than limited programming model itself.

Casio fx-5800P is the only other non-graphic programmable cal available today, but it seems graphic without being. I see no value on it: its programming model is much better than fx-50F/fx-50FH but it isn't solar and for "no solar" calcs there are much older and much better programmable calculators.
Find all posts by this user
Quote this message in a reply
08-16-2020, 10:39 PM
Post: #17
RE: Casio fx-50F/fx-50FH programming
(08-16-2020 06:59 PM)David22 Wrote:  Casio fx-5800P is the only other non-graphic programmable cal available today, but it seems graphic without being. I see no value on it: its programming model is much better than fx-50F/fx-50FH but it isn't solar and for "no solar" calcs there are much older and much better programmable calculators.

The one thing I really like about the fx-5800P is a really small detail that makes a big difference: using ?X without the STO arrow in between to prompt for a value and present the current value as default. It's similar to how INPUT works on the 32S and 42S. It's great for running a program multiple times when you only want to change some of its inputs.

Back on the subject of the fx-50FH and fx-3600P, I worked out a reasonably efficient way to replicate the Int function to get the integer part of a number. You can omit the 0>X term if you know you won't be dealing with negative values.


fx-50FH:

Fix 0:Rnd(X+.5(0>X)-.5(X>0))


fx-3600P:

Fix 0:X+.5(0>X)-.5(X>0):Rnd
Visit this user's website Find all posts by this user
Quote this message in a reply
08-17-2020, 09:10 AM (This post was last modified: 08-20-2020 07:30 AM by David22.)
Post: #18
RE: Casio fx-50F/fx-50FH programming
(08-16-2020 10:39 PM)Dave Britten Wrote:  I worked out a reasonably efficient way to replicate the Int function to get the integer part of a number. You can omit the 0>X term if you know you won't be dealing with negative values.


fx-50FH:

Fix 0:Rnd(X+.5(0>X)-.5(X>0))


fx-3600P:

Fix 0:X+.5(0>X)-.5(X>0):Rnd

A good solution, but lack of INT/FRAC functions (nor function call/return) only shows how bad are those calcs for porgramming.

If you look at VERY VERY OLD fx-501P Casio calculator from 1978 (or fx-502P with more memory), a calculator with only 7-segments display, you will see on its keyboard it have INT and FRAC functions, and you can enter those command directly with 2 keystrokes. 32 years later Casio makes worst rudimentary programming calculator.

Your good solution takes 22 steps on my fx-50FH. On Casio fx-501P/fx-502P, or later fx-601P/fx-602P with alphanumeric/dot-matrix display, it takes only 1 step. Obviously you solution is good, the fault is on Casio.

Casio, instead of going to better, went to worse, much worse Smile some times and during long time.

PD: But those solar programmable (although very limited) calculators have their charm.
Find all posts by this user
Quote this message in a reply
08-19-2020, 08:11 PM
Post: #19
RE: Casio fx-50F/fx-50FH programming
(08-16-2020 06:59 PM)David22 Wrote:  Casio fx-5800P is the only other non-graphic programmable cal available today,
From a reader on this forum I had expected you to know of the DM1x series. While they use a dot matrix LCD they are non-graphic. If you allow alphanumeric the DM41 also counts.

Further the HP12C is still in production. While quite limited it is programmable.
Find all posts by this user
Quote this message in a reply
08-20-2020, 08:10 AM (This post was last modified: 08-20-2020 10:10 AM by David22.)
Post: #20
RE: Casio fx-50F/fx-50FH programming
(08-19-2020 08:11 PM)johanw Wrote:  
(08-16-2020 06:59 PM)David22 Wrote:  Casio fx-5800P is the only other non-graphic programmable cal available today,
From a reader on this forum I had expected you to know of the DM1x series. While they use a dot matrix LCD they are non-graphic. If you allow alphanumeric the DM41 also counts.

johanw: Casio fx-5800P is non-graphic programmable calculator but it seems graphic. On other side it can store a lot of alphanumeric information even without being hacked: it has 28 KB user memory and dot-matrix display.

DM41 is a modern "clone" of HP-41, so it has alphanumeric capabilities implied in that cloning/emulation as HP-41 was 1st pocket alphanumeric calculator (and a lovely one), and worse: HP-41 has a limited 14-segment LCD chars (it is hard to differentiate some symbols or even impossible to do others) while DM41 has DOT-MATRIX (although as it emulates a HP-41 I suppose it has same limitations on characters, but you can differentiate them much better), but MUCH WORSE: DM41, like all SwissMicros not only has dot-matrix display, but also programmable firmware, so you can change it and create a cheat tool, even without changing calculator hardware.

In a Casio fx-50H, to cheat, it is needed to change internal hardware, because with included one it is impossible. With SiwssMicros it is easier: only firmware/software change is needed.

About "real" HP-41, its display is alphanumeric but limited to cheat (it doesn't show all usual characters a dot-matrix display can show, and some are not easily to differentiate. For example a 14-segments display can show:
[Image: 14_Segment_LCD_characters.jpg]
but even HP-41 doesn't implement all the symbols you see in this image). If you limit to 7-sgment displays, HP-41 is out of course, but If I made norms it may be I would let using original HP-41 too.

Of course 14-sgemet display is alphanumeric while 7-segment isn't, but it is in some sense in middle way between 7-segmet display and dot-matrix character display (where you can show all letters, lowercase, uppercase, and all symbols easily). But of course, if you want to ban all alphanumeric displays, HP-41 and all 14-segments display calcs are out. But if you ban only all dot-matrix displays, HP-41 is allowed.

«All alphanumeric displays calcs banned»: HP-41 is banned.

«All dot-matrix display calcs banned»: HP-41 is allowed (original HP-41, not SwissMicros, as SwissMicros have dot-matrix display).

(08-19-2020 08:11 PM)johanw Wrote:  Further the HP12C is still in production. While quite limited it is programmable.

It is programmable, but it has 7-segment display, so you can't cheat with it, even if you hack it, as the limitation factor is its screen (7-segments).
Find all posts by this user
Quote this message in a reply
Post Reply 




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