Posté le 30/04/2017 11:08
Planète Casio v4.3 © créé par Neuronix et Muelsaco 2004 - 2024 | Il y a 71 connectés | Nous contacter | Qui sommes-nous ? | Licences et remerciements
Planète Casio est un site communautaire non affilié à Casio. Toute reproduction de Planète Casio, même partielle, est interdite.
Les programmes et autres publications présentes sur Planète Casio restent la propriété de leurs auteurs et peuvent être soumis à des licences ou copyrights.
CASIO est une marque déposée par CASIO Computer Co., Ltd
Citer : Posté le 02/07/2017 13:12 | #
I don't know of the obscure details of Basic's exotic opcodes and syntax, but I am fairly sure that a properly-implemented typical LR(1) parser for the following kind of grammar could work very well on most (if not all) kinds of expressions.
<expr> -> ( <expr> )
<expr> -> <unary> <expr>
<expr> -> <expr> <binary> <expr>
<unary> -> (-) | Not | etc.
<binary> -> + | - | × | ÷ | And | Or | etc.
<value> -> <integer> | <literal-string> | /[A-Zθr]/ | etc.
/* and so on */
Think about how opcodes are operators, and most often right-to-left unary operators followed by the operand. Is there anything this method would miss?
Edit : It seems that @Zezombye has implemented quite the naive parser. No wonder you'd find it difficult.
Citer : Posté le 02/07/2017 16:59 | #
If I understand correctly you are doing binary operations instead of decimal operations? This is very dangerous, because it means that 0.1+0.2 != 0.3 (see http://0.30000000000000004.com/). This could lead to bugs from big programs.
Yes, C.Basic use the library of SDK/C, as for all the operation parts,
and so, the risk is the same as SDK/C.
All the code you need is here: http://git.planet-casio.com/Zezombye/B2C/blob/master/B2C/src/B2CFunctions.c
The rest of B2C is just compiling basic to C, it's the parser.
I suggest you put your code on our gitlab : git.planet-casio.com that way I could have a look at it and suggest optimisations.
Thanks!
I failed at gitlab registration.
An email does not come from gitlab.
Please wait a little while more.
Indeed it is, and there are a lot of weird opcodes (see http://www.planet-casio.com/Fr/programmes/programme1984-last-clonelab-ne0tux-a3.html which pushes basic to its limits).
This program has not yet worked normally in C.Basic.
It wants to work with rewriting program for current C.Basic.
From what I've seen you also want to do a compiler? I think it should be some kind of both (pre-compiling basic programs), doing both an interpreter and a compiler would cost too much time.
Optimisations could be like storing the lines of conditions/loops and gotos/lbls, that way when the interpreter encounters "goto 10" it knows where the lbl 10 is and jumps to it immediately. I think that's why the for loops are so slow.
Because the interpreter system is main,I think that the compiler in C:Basic becomes restrictive.
The optimization of the Goto command implements in C.Basic,
but,Goto is special operation in Casio Basic.(rebuilding of the loop structure stack..)
it is not compatible now.
I don't know of the obscure details of Basic's exotic opcodes and syntax,
There is new discovery whenever I watch a program uploaded in CasioPlanet.
How to use DrawStat,
like this "c1","anStart" etc, not normal variable,
How to use Ans and List 1[0] etc.
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Citer : Posté le 02/07/2017 17:04 | #
I confirm your GitLab account manually, so you can connect with the username and password you chose at registration
Citer : Posté le 02/07/2017 17:16 | #
There is new discovery whenever I watch a program uploaded in CasioPlanet.
These are of course new functionalities, but not exotic nor even a disturbance for a parser. I was focusing on syntax specifics, eg. an operator placed after its operand.
Now that I think about it, I may have misunderstood you :
If you meant evaluating an expression once you have the tree structure of the operation, then it's not really about parsing. But since you're using the native numerical data types, that shouldn't be too much of a burden. So what did you mean exactly?
Citer : Posté le 03/07/2017 04:15 | #
These are of course new functionalities, but not exotic nor even a disturbance for a parser. I was focusing on syntax specifics, eg. an operator placed after its operand.
Now that I think about it, I may have misunderstood you :
I'm sorry, there may be my misunderstanding.
I agree with you about the parser.
Because I was weak in a recursive thought, I felt evaluating an expression was most difficult at first.
However it is understood now.
Ajouté le 03/07/2017 à 04:36 :
I confirm your GitLab account manually, so you can connect with the username and password you chose at registration
Thank you for your kindness.
I'm sorry, I cannot yet login and the email does not arrive, too
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Citer : Posté le 03/07/2017 09:58 | #
Make sure you log in using your username, sentaro21. If you type in the right password, you'll be able to log in right away and won't need any email.
Citer : Posté le 03/07/2017 14:12 | #
Make sure you log in using your username, sentaro21. If you type in the right password, you'll be able to log in right away and won't need any email.
Though I did not know whether a password was wrong, I was not able to log in today either.
I registered again and an email came,and able to log in now.
I am sorry to have caused trouble.
Thanks very much!
Ajouté le 13/08/2017 à 10:26 :
Hi Lephenixnoir
The top page of C.Basic(by Krtyski) was updated.
Krtyski of my friend can not login to Planet-Casio for some kind of causes.
I express his gratitude to you.
------------------------------------------
Dear Lephenixnoir
I do appreciate for your help on my translation. I have been extremely busy, so it took long time to come back to C.Basic project. I'm currently changing almost all sentences based on your advise.
------------------------------------------
Thank you always for everything.
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Citer : Posté le 13/08/2017 22:45 | #
I'm glad to be of some help!
Translating isn't very hard for me, so if there's anything I can help with, feel free to ask. This project deserves great visibility!
Citer : Posté le 17/06/2018 15:10 | #
Bonjour
I apologize for the long silence.
I'm glad that Python is equipped with this year by GRAPH90+E calculator.
The times are not BASIC, however I'm glad that a newer Casio Basic program is announced.
I think BIDE by Zezombye to be very splendid application.
I continued developing C.Basic.
I added C.Basic newly with complex number and MCS direct access mode.
Therefore it became easier to try application of genuine Casio Basic in C.Basic.
Here is latest updated FX version.
http://pm.matrix.jp/CB/CBASIC180beta.zip
C.Basic for GRAPH+90E/CG50/CG20/CG10 is under development.
I have not yet got the operation check in GRAPH+90E.
If there is a person trying this, I will be glad.
Here is latest updated CG version.
http://pm.matrix.jp/CB/CBASICCG054.zip
I apologize in the manual being still imperfect.
Thanks in advance.
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Citer : Posté le 17/06/2018 17:19 | #
Hey, it's nice to hear some new stuff from you !
I have just checked on a Graph90+E and everything looks to be working fine so far ! (The test was not very extensive though, but I think that if the main stuff works, there's no reason for the rest not to work, especially if you already know it works well on a CG50, which is very close to the G90+: I'm not aware of any difference other than the name actually… ))
I'm actually wondering whether you think C.Basic's core could be used (and could be worth to be used) to get a Casio Basic's interpreter running on a PC as well… I think that having such a thing together with BIDE could ease Casio Basic dev to a great extent!
I also gave a look to the manual of the CG version, and i'm especially interested in this line :
( to use hedden memory by setup )
I'm not sure what I should understand in «hedden memory by setup» actually… ^^'
I'm also interested in how easy it is to access and use those 6MB of RAM, which is quite a big amount! Moreover, LePhenixNoir recently had access and had been able to run some tests on units that were loaded with a newer (and not publicly avalaible yet) version of the OS, that seemed to unlock some megabytes of RAM: the heap looked significantly bigger than on the current versions. Maybe the incomming OS update will interfere with how you are using those extra megs of RAM…
Anyway, this definitely looks worth spending some time playing with it…
Citer : Posté le 17/06/2018 20:16 | #
Hi Sentaro! Hope you're doing well.
We have a habit of reporting news about member projects in a weekly article on Planète Casio's front page. Just as Nemhardy I think C.Basic (and C:Basic in general) deserves more visibility. Would you mind if we present your project in the next publication? If so, then would the link to your website (this one) be a suitable reference?
I have also tested your application on a Graph 90+E. I had a lot of these errors when browsing the storage memory :
code:48
Press:[EXIT]
It dit not prevent me from using the file manager but I guess I should be reporting it. If you need a dump of my storage memory (for possible weird file/directory names or whatever), I can do one for you.
The presence of additional RAM is very interesting. Currently the heap holds 128k of memory, but the factory test menu of a Graph 90+E equipped with Python revealed that the new heap holds 3M of memory. Which is pretty natural because I doubt Python would run on 128k anyway.
I'm still dabbling in with the Prizm as well, writing some drivers, investigating the memory and the platform, so if you have any reference for this RAM area I'd be interested as well.
Good luck o/
Citer : Posté le 18/06/2018 11:26 | #
Hi Nemhardy
Thanks very much for checking operation in Graph+90E.
I'm glad to understand that C.Basic works well in Graph90+E.
There was a powerful Prizm users in Japan too.
The recent update has many things by his support.
I'm actually wondering whether you think C.Basic's core could be used (and could be worth to be used) to get a Casio Basic's interpreter running on a PC as well… I think that having such a thing together with BIDE could ease Casio Basic dev to a great extent!
Yes, I think so, too, but do not lead to realization by my inadequacy.
I'm not sure what I should understand in «hedden memory by setup» actually… ^^'
I'm also interested in how easy it is to access and use those 6MB of RAM, which is quite a big amount! Moreover, LePhenixNoir recently had access and had been able to run some tests on units that were loaded with a newer (and not publicly avalaible yet) version of the OS, that seemed to unlock some megabytes of RAM: the heap looked significantly bigger than on the current versions. Maybe the incomming OS update will interfere with how you are using those extra megs of RAM…
Anyway, this definitely looks worth spending some time playing with it…
If it is out of OS management,it is easy to access it directly.
However,
If it is managed by the OS, it will be changed to using SysCALL.
Hi Lephenixnoir
I'm always grateful to your comment.
We have a habit of reporting news about member projects in a weekly article on Planète Casio's front page. Just as Nemhardy I think C.Basic (and C:Basic in general) deserves more visibility. Would you mind if we present your project in the next publication? If so, then would the link to your website (this one) be a suitable reference?
Yes, it is all right.
Thank you very much for your help.
I have also tested your application on a Graph 90+E. I had a lot of these errors when browsing the storage memory :
code:48
Press:[EXIT]
Because C.Basic use the main memory of 1832B, C.Basic comes to lack of the main memory.
Please enlarge the free area of the main memory.
The presence of additional RAM is very interesting. Currently the heap holds 128k of memory, but the factory test menu of a Graph 90+E equipped with Python revealed that the new heap holds 3M of memory. Which is pretty natural because I doubt Python would run on 128k anyway.
I'm still dabbling in with the Prizm as well, writing some drivers, investigating the memory and the platform, so if you have any reference for this RAM area I'd be interested as well.
Good luck o/
It is nice news that a heap became 3MB !
However it is strange that it is not 6MB.
If the OS manages all of deployment memory, C.Basic will become necessary to change hidden memory managiment.
Because I do not know whether Python appears in CG50,
I'm looking forward to your continued a help.
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Citer : Posté le 18/06/2018 12:28 | #
It is nice news that a heap became 3MB !
However it is strange that it is not 6MB.
Yes, I found this quite strange, because on the factory menu the total amount of RAM available was around 4 Mio, but physically the chip contains 8 Mio.
Anyway, if it's easy to use the 4 Mio that are not used by the system, that's not a problem
Citer : Posté le 18/06/2018 13:13 | #
Oh, yes, it's a problem :
- Is this area really unused?
- Is this method future-proof? What if a future OS version starts using the area?
Citer : Posté le 18/06/2018 13:47 | #
Yes, I found this quite strange, because on the factory menu the total amount of RAM available was around 4 Mio, but physically the chip contains 8 Mio.
Anyway, if it's easy to use the 4 Mio that are not used by the system, that's not a problem
Thanks!
If the free area is 4MB, it is enough quantity for C.Basic
Oh, yes, it's a problem :
- Is this area really unused?
- Is this method future-proof? What if a future OS version starts using the area?
I think the OS not to use 4MB or more.
If it all becomes the OS management I think about it again at the time.
BTW,
The contents of the SDRAM of Graph90+E/CG50 become extinct after Power Off in one hour.
What did you think about this?
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Citer : Posté le 18/06/2018 13:52 | #
What did you think about this?
I would not expect RAM storage to be reliable at all. There is a reason why the OS saves the contents of the main memory to the Flash before powering off.
The fact that some RAM persists after a reboot has been of some help to me in the past, to debug add-in crashes by writing logs to the RAM and inspecting them after the crash.
Then if you need to store data you definitely need to either:
- Store it in main memory (but small space)
- Store it in storage memory (but slow syscalls)
- Heed for calculator shutdowns (but they're invisibly handled inside GetKey())
I think the relevant point is what you are trying to store and what for.
Citer : Posté le 19/06/2018 11:17 | #
I would not expect RAM storage to be reliable at all. There is a reason why the OS saves the contents of the main memory to the Flash before powering off.
The fact that some RAM persists after a reboot has been of some help to me in the past, to debug add-in crashes by writing logs to the RAM and inspecting them after the crash.
Then if you need to store data you definitely need to either:
- Store it in main memory (but small space)
- Store it in storage memory (but slow syscalls)
- Heed for calculator shutdowns (but they're invisibly handled inside GetKey())
I think the relevant point is what you are trying to store and what for.
Thanks!
I pretty much agree.
I think that the backup system of fx series is very excellent.
However,C.Basic of CG50 is rebooted by daily.
Setting and the variable of C.Basic back up in main memory,
but it is so difficult to back up full 6MB to the storage.
I think that there should be the more power-saving mode.
Here is new updated. (re-uploaded)
http://pm.matrix.jp/CB/CBASIC180beta.zip
http://pm.matrix.jp/CB/CBASICCG054.zip
-Fixed Argument( bug that it become "Memory Error".
-Changed specification when a0,a1,a2,anStart,b0,b1,b2,bnStart,c0,c1,c2,cnStart was used,it becomes the extended variable automaticaly.
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Citer : Posté le 19/06/2018 15:25 | #
Do you really need 6 MB of memory to be saved between two full sessions of C.Basic ?
Citer : Posté le 19/06/2018 16:19 | #
.
Do you really need 6 MB of memory to be saved between two full sessions of C.Basic ?
I don't think it's necessary to go that far with that.
But I think that it is more convenient if it does not disappear.
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Citer : Posté le 19/06/2018 18:25 | #
I tried your last version with more free space in my Main Memory: it worked a lot better.
Your bitmap example also runs very nicely. Good job!
Citer : Posté le 21/06/2018 08:51 | #
Thanks very much for trying
The FX version is near to the last for the interpreter version.
However,
If the Prizm version is developing still more,
I would appreciate it very much if you could point out anything to me.
Here is new updated. (re-uploaded 21/6/2018)
http://pm.matrix.jp/CB/CBASIC180beta.zip
http://pm.matrix.jp/CB/CBASICCG054.zip
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.