6 résultats trouvés

par ynopum
05 mai 2009 22:04
Forum : Tous les Pockets
Sujet : Tableau de comparaison des mots clefs en BASIC
Réponses : 206
Vues : 236938

I asked a colleague to test MODE11 on his fx-730P, and he said no Error was returned by the computer. I assume that it works on the whole fx-730 generation.

_________________________

I am now very curious about MODE22|23|24|25.
par ynopum
05 mai 2009 06:34
Forum : Tous les Pockets
Sujet : Tableau de comparaison des mots clefs en BASIC
Réponses : 206
Vues : 236938

Xerxes a écrit :...
The differences between MODE10/11 are not obvious sometimes:

The evaluation of "1/23" gives 0.04347826087 but "FRAC(1/23*1E3)" gives
MODE10: 0.47826087
MODE11: 0.4782608695

This is the reason for the higher accuracy of the Frolov test using MODE11.
...
I think I got it!
Shortly: MODE11 prevents the CASIO for "cheating" and trying to round-down to display "nice round integers". MODE10 (or switch on/off) resets the unit to "integer cheating".
Don't blame me for using such terminology, here is what I saw yesterday trying to figure out the meaning of these hidden modes:
http://spiderpixel.co.uk/caspro/subhtml/casf1.html

And just for the test as explained on the above page:
123456789 + .008 - 123456789 -> Mode10: 0.008 mode11: 0.008
123456789 + .007 - 123456789 -> Mode10: 0 mode11: 0.007
... ... for .006 to .001 the default MODE 10 truncates attempting to show "nice integer", and the MODE11 gives the fair result.

I will quote John Meyers:
Here's the scoop: Every time this type of Casio calculates a numeric result,
it looks at the last three digits of the internal "mantissa" (the significant
digits of the truncated result); if these digits are anywhere in the range
001 thru 007, your Casio just lops off these digits, presuming that the
"correct" result *should* have ended with 000; similarly, if the last
three mantissa digits of the truncated result are in the range 993-999,
your helpful FUDGING Casio "fixes up" that result for you by
ROUNDING IT UP until its last three digits are 000 !!!
So this is the meaning of MODE10/11: turning of this truncation. That is why it gives better result for Frolov's test, because the truncation is mostly one direction - down. The cumulative error for the default MODE10 can be significant, but the error of the full mantissa of MODE11 may compensate this accumulation, because in is in the both directions.
MODE10: 674475.396
MODE11: 674512.576
Correct : 674530.471

Finally, it is not fair from CASIO not to document this feature and the option to control it. Improperly made algorithm where summation occurs may lead to significant final accumulated error.
par ynopum
03 mai 2009 21:41
Forum : Tous les Pockets
Sujet : Tableau de comparaison des mots clefs en BASIC
Réponses : 206
Vues : 236938

Bien, J'ai ecrit petite histoire des mes calculateurs.

CHR equivalent FUNCTION for FX-795P. The example uses the variable O$ which will contain the result string. The decimal value D must be present in the MODE19 function:

Code : Tout sélectionner

the input is in D
O$="1": MODE 19(16264,D)
the result is in O$
ASC equivalent function.

Code : Tout sélectionner

the input is in O$
MODE 18(16264,O):O$="&H"+O$:D=VAL(O$)
the result is in D
O$ is changed!
You can use another string variable to avoid changing of the source O$.

If O$ is not suitable, here is the list of the addresses of the other variables:

Code : Tout sélectionner

Var	Address
A	16376
B	16368
C	16360
D	16352
E	16344
F	16336
G	16328
H	16320
I	16312
J	16304
K	16296
L	16288
M	16280
N	16272
O	16264
P	16256
Q	16248
R	16240
S	16232
T	16224
U	16216
V	16208
W	16200
X	16192
Y	16184
Z	16176
Those addresses are ONLY FOR FX-795P, they should be different on the older models because the memory size is different
par ynopum
03 mai 2009 21:12
Forum : Présentation
Sujet : Bonsoir a les "retrolateurs"
Réponses : 9
Vues : 5183

Bonsoir a les "retrolateurs"

J'ai suis de Bulgarie. Maintenant dans le pays ouest de l'Indie pour quelques semaines (don't want to mention its name - Ракistаn).

Je compris le Francais mais l'ecriture en Anglais e plus facile de moi (il n-ya pas de regles dans ce lange - ce magnifique!)

So as I am here in Ракistаn, I found by accident a non-working CASIO fx-795P in one stationary shop. The man sold it to me for 5 EU. It just needed battery change. Why I am saying that: this was my calculator since 1993. I spent so many months (it total) with eyes stick in to the small display (it was huge at that time). Actually it helped me so much, that I am keeping it as a relic from a previous life. Now I have second one! I still keep my Soviet MK71 - solar, which cost was half a salary in the late 80's. It still works with its original solar panel.

I was impressed of the HP48G but the price was shocking. I think I had a memory overflow by the big figure and don;t remember anything about it. Well, later I got TI-92 from France in 1997, and it is like a car compared to a bicycle. (this one is THE MACHINE - who doesn't have such brick: try to get one before they get so rare like the CASIO-BASIC computers). Well, I still prefer crunching the numbers on the FX-795P, because it has more direct buttons to the functions, and it fits in my pocket. Also there is no need the whole office to come to you and ask you about this "black computer". When I was using in on some small meetings - half of the time the people are playing with it. Maybe I will take one Voyage200, because it is smaller. I expected HP50G to be much smaller but it is huge piece - it will enter only in the pockets of topcoat.

So that's about me and the Pocket computers. I have also a WinMobile PocketPC's and this was my last pest. MathTablet, PocketCAS, SMATH, BASIC4PPC and some not so convenient programs are good arsenal to substitute an old pocket-computer/calculator.

I am searching of a way to exchange programs with my FX-795P and a computer (via sound-card?). I think finding of the FA-cassette interface will be one of the miracles of the world, so if there is an easy way - let me know.
par ynopum
03 mai 2009 20:36
Forum : Tous les Pockets
Sujet : Tableau de comparaison des mots clefs en BASIC
Réponses : 206
Vues : 236938

Thanks! I didn't try square roots.

I did a small proggy for testing of MODE10 & MODE11:

Code : Tout sélectionner

10 INPUT "Expression: ",$
20 MODE 10: MODE 20,V: PRINT "M10: ";V
30 MODE 11: MODE 20,V: PRINT "M11: ";V
99 GOTO 10
The result for the expression ASN ACS ATN TAN COS SIN 9 doesn't change. Also some other expressions with trigonometric functions only.

The most interesting is that the test of Sergey Frolov gives better result on MODE 11, compared with the real answer 1.0000001^(2^27)

Code : Tout sélectionner

A=1.0000001
FOR I=1 TO 27:A=A*A:NEXT I
par ynopum
03 mai 2009 13:36
Forum : Tous les Pockets
Sujet : Tableau de comparaison des mots clefs en BASIC
Réponses : 206
Vues : 236938

Xerxes a écrit :
Marcus von Cube a écrit :Sera-t-il possible d'analyser le logiciel préprogrammé d'un FX-795P ? Peut-on faire une liste?
Usually the 4-bit CASIO pockets have no external ROM. The complete firmware is
hidden in the internal CPU ROM but the FX-795P seems to be the exception.
Due to the limited internal ROM, an external ROM was added to hold a part of
the math library. In contrast to the FX-880P some math routines are coded in
assembly and not in BASIC only. This external ROM can be accessed by MODE18
(=PEEK).

Thanks to Piotr, the complete BASIC part of the FX-795P math library:

Code : Tout sélectionner

........
........
........
........
The used MODE commands are: 18,20,21,26,27,28,29,90,91,92,93,94,95,96,97,99
Excuse moi pour l'anglais!

After examining of the quoted program library, and also reading of the forum, and playing with my Casio, I tried to make a list of the undocumented MODE commands. Most of them were already known, but some are not.

My tests showed that the matrices sizes are not limited to 9x9 as in the FXLibrary. Successful operations were done with 15x15 size for matrix inversion. We should take in mind that for not well defined matrices the inversion can give unreliable results.

Also I did some speed tests for the matrix operations. The "internal" matrix commands work roughly 5~6 times faster than BASIC written routines doing the same job (of course a difference of the algorithm plays a major role maybe). This was tested with random filled matrices 5x5.
Also I tested the calculator fx-5500LA with such 5x5 random matrices. It seems it is about twice faster than fx-795P. It is pity it is not programmable, and the fx-4500PA is obviously much slower than 5500LA - I decided not to make tests on it.

So, here is the list for now:

MODE 10
Standard truncation of the last digits after calculation. This mode is reset after turn-off/on of the device. Produces round results for integers. (thanks to Xerxes)

MODE 11
No truncation of the last digits. This mode is canceled after turn-off/on of the device. Should be used if we suspect error accumulation in default mode. (more explanation on Page11 of the thread)

MODE18(A,B)
Gets from address A the HEX value as B$. The syntax is with brackets!

MODE19(A,B)
Puts in address A the value B. The syntax is with brackets!

MODE 20,A
Evaluates as expression the variable $ and puts the result in variable A

MODE 21,A,B
Waits for keypress and returns its character in A$ and its DEC code in B

MODE 22 unknown
MODE 23 unknown
MODE 24 unknown
MODE 25 unknown

MODE 26,A
Converts the value of $ variable (assumed to be a BIN number) to DEC variable A

MODE 27,A
Converts the value of $ variable (assumed to be a HEX number) to DEC variable A

MODE 28,A
Converts the value of variable A (DEC number) to LONG BIN string in variable $

MODE 29,A
Converts the value of variable A (DEC number) to SHORT BIN string in variable $

MODE 90,A,B,F
Matrix operation: inverse of matrix A goes to matrix B. Return code F is for success. If the value of F = 0 then the inversion operation was unsuccessful.

MODE 91,A,,D
Matrix operation: determinant of matrix A goes to variable D. Note the double comma! I tried to put variable there but an Error occurs.

MODE 92,A,B
Matrix operation: contents of matrix A goes to matrix B

MODE 93,A
Matrix operation: contents of matrix A is transposed

MODE 94,A,B,C
Matrix operation: matrix A multiplied by matrix B goes to C. C variable should not be an array. The command will create it as an array.

MODE 95,A
Equal to INPUT,A (used in the FXLibrary with error code reading from the memory)

MODE 96,Oper,A,B,C
Boolean operation. Oper has the following options
0 is Twos complement,
1 is NOR,
2 is AND,
3 is OR,
4 is XOR

MODE 97,A,X,Y
Matrix operation: dimensions of matrix A go to X an Y

MODE 99,0 Breaks on Error (default behavior)
MODE 99,1 Continues execution on Error


I tried to find the address of the special $ variable. It seems to start from address 400.
The last entry line is at address 528. The FXLibrary is at address about 16400.
I also tried the "password erase" offered by Xerxes - it works. The password string is located at address 308.
The variables A-Z are stored backwards from the end of the memory: variable A is at address 16376. Variable B is 8 bits before at 16368 etc. Variable Z is at 16176.
The MEMO-databank seems to be at address 588.
The IN-OUT-CALC string seems to be after the program area - not at fixed address.

Well, another curious thing is that I managed to use 6 more characters from the code table (small D, small L, -1 index, thick /, b/, /c). I did this with using MODE19 to the address of a string variable. Maybe one day somebody will need to use those special chars. Functions like CHR$ and ASC can be substituted by short (1-row) programs, using MODE18 & MODE19.

Also the scan-codes of the special buttons for MODE21 are:


128 - SIN
129 - COS
130 - TAN
134 - LOG
135 - LN
136 - EXP
137 - SQR (square root sign)
152 - DEG(
182 - &H
183 - CUR (cubic root sign)
185 - HYP
205 - X^2
206 - X^3
207 - 10^x
219 - CLS
220 - ENG
222 - STAT
234 - MEMO
235 - EXT
239 - EXE
240 - INS
241 ->
242 <-
244 - STOP
245 - MODE
246 - ^R (return of the last entered line)
247 - Shift
251 - IN
252 - OUT
253 - CALC

The rest of the codes correspond to the letter or sign of the button depending on the char-code table.
I.e. for the key "G" we have 38, and of we are in EXT-mode the code will be 70 (for "g"). For the key "+" the code is 1.

Button BRK doesn't give code as the program execution breaks when it is pressed.

Aller à la recherche avancée