Jump to content



Photo
* * * * * 4 votes

C.Basic - International Release

Casio Basic C.Basic

  • Please log in to reply
666 replies to this topic

#641 Hlib2

Hlib2

    Casio Addict

  • Members
  • PipPipPip
  • 92 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860gii-2, afx-2.0+
    fx-9750gii, fx-9750g+
    cfx-9850gb+, graph25
    fx-991DE_X, fx-991ES+
    ti-voyage200(emulator)
    ti-83+_SE, ti-85, hp-50g

Posted 06 July 2020 - 09:29 AM

@Sentaro21
A few comments about minor bugs.
1) mode Sci4/E, editing alpha variables Shift F1 (var),
input: 8E-4 EXE
result: 800.0000.....01μ (should be 800μ).
tried to edit: ►, EXE
result: Syntax ERROR
input: 0.06526
result: 65.25999.....9m (should be 65.26m)
tried to edit: ►, EXE
result: 0.000E0
These features sometimes do not allow to use in program an engineering format for displaying results.
2)
Lbl 1
"N="?➝N
Disp RndFix(N,3)
Goto 1
mode Nrm10
2a) If you apply a record like ?➝N, the character ? is not translated on a new line.
2b) input: 7.6575 -> result: 7.657
input: 3.6575 -> result: 3.658
The instability of the rounding rules sometimes leads to the fact that when analyzing the data, they fall into the wrong interval.

#642 siealex

siealex

    Casio Fan

  • Members
  • PipPip
  • 41 posts
  • Gender:Male

  • Calculators:
    570w, 570ms, 83es, 570es, 83gt plus, 991es plus, 991de plus, 570spx ii, 9750gii

Posted 09 July 2020 - 04:29 PM

The instability of the rounding rules sometimes leads to the fact that when analyzing the data, they fall into the wrong interval.

Does it use binary representation for internal calculations?



#643 Hlib2

Hlib2

    Casio Addict

  • Members
  • PipPipPip
  • 92 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860gii-2, afx-2.0+
    fx-9750gii, fx-9750g+
    cfx-9850gb+, graph25
    fx-991DE_X, fx-991ES+
    ti-voyage200(emulator)
    ti-83+_SE, ti-85, hp-50g

Posted 09 July 2020 - 05:27 PM

Does it use binary representation for internal calculations?

It looks like it is. Here are examples of rounding (RndFix(N,2)) results in C.BASIC:
1.155➜1.16__1.325➜1.33__1.875➜1.88
2.155➜2.15__2.325➜1.32__2.875➜2.87
3.155➜3.16__3.325➜3.33__3.875➜3.87
4.155➜4.15__4.325➜4.32__4.875➜4.88

#644 Hlib2

Hlib2

    Casio Addict

  • Members
  • PipPipPip
  • 92 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860gii-2, afx-2.0+
    fx-9750gii, fx-9750g+
    cfx-9850gb+, graph25
    fx-991DE_X, fx-991ES+
    ti-voyage200(emulator)
    ti-83+_SE, ti-85, hp-50g

Posted 10 July 2020 - 07:25 PM

@Sentaro21
1) Debugging one of my programs, I encountered such a problem.
Rad:"5sin X"➝Y1
`#CBINT
0➝B:Y1(B)➝A
`#CBDBL
Disp "A%=",A%
result: A%=5 (incorrect)
The code "sin X" ➝Y1 produces an Syntax ERROR, because the trigonometric functions do not work in `#CBINT mode in entries like this. Adding of 5 removes the error, but runs as "5"➝Y1. With variables like fn, everything works correctly and without errors.
2) List 1+iList 2 - this has stopped working again (`#CBCPLX setting)

Edited by Hlib2, 10 July 2020 - 10:49 PM.


#645 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 361 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 11 July 2020 - 10:47 AM

@Hlib2
Sorry for late replay. :bow:
Thanks for bug report!
The reported bugs have been confirmed.
I'll fix it all together in the next update. ^_^
 

2) List 1+iList 2 - this has stopped working again (`#CBCPLX setting)

What kind of data is contained in List 1 and List 2?
 
 
@siealex

Does it use binary representation for internal calculations?

Yes.
It uses the SDK's floating point library. :)
 

 



#646 Hlib2

Hlib2

    Casio Addict

  • Members
  • PipPipPip
  • 92 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860gii-2, afx-2.0+
    fx-9750gii, fx-9750g+
    cfx-9850gb+, graph25
    fx-991DE_X, fx-991ES+
    ti-voyage200(emulator)
    ti-83+_SE, ti-85, hp-50g

Posted 11 July 2020 - 12:17 PM

@Sentaro21
Thank You for your concernment!

What kind of data is contained in List 1 and List 2?

 
`#CBDBL
Seq(√x,x,1,5,1)➝List 1.F
Seq(e^x,x,1,5,1)➝List 2.F
`#CBCPLX
5➝Dim List 3.C // **
List 1+iList 2➝List 3
After point // ** program changes the List type from C to F. Also, please check, if possible, fn with trigonometric functions in `#CBINT mode. In my "Bench C.BASIC" prog they sometimes have incorrect results in speed and in calculations. I would like to publish this program as soon as possible. But if I`ll add "Try~Except~TryEnd" blocks to it, it will take a long time again to finish.

Edited by Hlib2, 11 July 2020 - 12:21 PM.


#647 sentaro21

sentaro21

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 361 posts
  • Gender:Male
  • Location:JAPAN

  • Calculators:
    FX-603P fx-4800P fx-5800P
    CFX-9850GC PLUS
    fx-9860G
    fx-9860GII
    fx-9860GII-2
    fx-9860GII-2 SD
    fx-CG10
    fx-CG20
    fx-CG50
    HP-Prime
    HP 50G
    TI-Nspire CX CAS
    TI-84+CE

Posted 12 July 2020 - 12:20 PM

@Hlib2
Thanks!!
Both confirmed the bug. :)
 
As for the try command, please don't use it if you have a problem because it is not fully implemented. :bow:


#648 CalcLoverHK

CalcLoverHK

    Casio Freak

  • Members
  • PipPipPipPip
  • 246 posts
  • Gender:Male
  • Location:Hong Kong
  • Interests:Playing video games (Minecraft, krunker.io), calculators, programming in Casio Basic/C.Basic, Scratch (formal), IT research (sometimes)

  • Calculators:
    fx-50FHII (2019/1/30)
    fx-9750GIII (2020/6/13)

Posted 07 August 2020 - 08:06 AM

@Sentaro21 @Krtyski
Just a reminder of my messages in e-Gadget C.Basic CG development thread. (^^;

#649 CalcLoverHK

CalcLoverHK

    Casio Freak

  • Members
  • PipPipPipPip
  • 246 posts
  • Gender:Male
  • Location:Hong Kong
  • Interests:Playing video games (Minecraft, krunker.io), calculators, programming in Casio Basic/C.Basic, Scratch (formal), IT research (sometimes)

  • Calculators:
    fx-50FHII (2019/1/30)
    fx-9750GIII (2020/6/13)

Posted 10 August 2020 - 08:07 AM

Hi Sentaro21 and Krtyski

Suggestion 1

It seems like the Beep command is forked from the Send38k/Send command with specific values. And the latter command has interrupt option which can forcibly stop sending by pressing EXIT key. Can you also add an interrupt option to Beep command?

Syntax: Beep [<Frequency (Hz)>,<Duration (ms)>,<interruption (Getkey value/0)>]

New addition:<interruption (Getkey value/0)>
Stop outputting sound forcibly by pressing certain key.
If the value is 0, all keys can interrupt sound outputting.

Example 1: Beep 440,1000,31
Output 440Hz sound for 1 second, can be interrupted by EXE key.

Example 2: Beep 100,500,0
Output 100Hz sound for 0.5 second, can be interrupted by any key.

Suggestion 2

The ? command in C.Basic FX does not support Text coordinate even if @ is added in front of the xy.

Cheers
CalcLoverHK

Edited by CalcLoverHK, 14 August 2020 - 08:01 PM.


#650 Hlib2

Hlib2

    Casio Addict

  • Members
  • PipPipPip
  • 92 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860gii-2, afx-2.0+
    fx-9750gii, fx-9750g+
    cfx-9850gb+, graph25
    fx-991DE_X, fx-991ES+
    ti-voyage200(emulator)
    ti-83+_SE, ti-85, hp-50g

Posted 30 October 2020 - 01:43 PM

It is very strange that when playing the BEEP sound effect, the SH4 processor in CASIO calculators interrupts the execution of the main calculation program. This looks perfectly normal for a $5 Tetris-type pocket toy. But for the SH4 processor in such a complex device as a graphical calculator, there is no justification for this in dynamic programs. I made a board of six medium-integration CMOS chips (late-1970s technology from TI), which partially solves this problem at the hardware level. The BEEP(M, N) signal at the output is interpreted as a sound effect code if M=1000 and N≤8. If M=1000 and N=1...8, the sound effect is played according to the code N with a delay for the time of the BEEP(1000,N) command t<0.01_sec without the interruption of a program for BEEP effect. If N>8 or M≠1000 - the signal from the program is played back with a delay for the duration of the BEEP command. The circuit consumption in sleep mode is not more than 5_µa. Making a block that fits in the calculator case exceeds the cost of $200. In my first attempt, an error occurred with the size of the capacitor. This resulted in the board being deformed, the conductive layer being destroyed, and the calculator being thrown into the trash:
32130391_m.jpg
The next attempt was successful, but now it exceeds the cost of the calculator by 5...10 times, as new options have been introduced: sound volume and the "key press sound" function.
If I were a programmer, this solution would be more efficient :-)

Edited by Hlib2, 30 October 2020 - 04:22 PM.


#651 HappyCalc

HappyCalc

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, On-Calc Programming(C.Basic), Gaming, Origami, Eating Chocolate

  • Calculators:
    fx-9860GII-2

Posted 31 October 2020 - 12:32 PM

Hello! I'm new in this forum, but I have already read this topic as a guest.
@sentaro21
I really like this Addin, because you can program things oncalc.
So, I have some ideas:

1)
I have made a Program to set the Background Light level on an fx-9860GII-2 calculator (using PWM):
'Name: PWM
Local a,b
Ticks+a->a
While a-Ticks>0
b>0=>BackLight 1
Ticks%Wait b
b<100=>BackLight 0
Ticks%Wait 100-b
WhileEnd
Variable a are how many Ticks, PWM will run.
Variable b is the Backlight level (0-100)
The Problem of this solution is that if you use heavy calculations between calling "PWM", the Backlight starts to flicker.
My question is, could you enhance "BackLight" to allow inputting a BackLigt level?

2)
Could you enhance Gosub/Label, so you can pass also List/Mat/String like this:
GoFunc,_TEST,10,Mat A,Str 5
Stop
Func _TEST,a,Mat x,Str 1
Locate 1,1,Str 1
Mat x×a->Mat x
FuncEnd,Mat x
Thanks! :D
(Edit: BB-Code working)

Edited by HappyCalc, 16 December 2020 - 07:03 PM.


#652 HappyCalc

HappyCalc

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, On-Calc Programming(C.Basic), Gaming, Origami, Eating Chocolate

  • Calculators:
    fx-9860GII-2

Posted 31 October 2020 - 12:50 PM

Oh, does anyone now, how to make line breaks inside BBCode "code"-Tag? In my post, a normal line break doesn't work.
(Edit: Problem solved. The preview mode removes line breaks in code)

Edited by HappyCalc, 16 December 2020 - 07:07 PM.


#653 HappyCalc

HappyCalc

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, On-Calc Programming(C.Basic), Gaming, Origami, Eating Chocolate

  • Calculators:
    fx-9860GII-2

Posted 14 November 2020 - 09:34 AM

Hello Sentaro21 and Krtyski
I found a bug:
1. Write some numbers to a List
2. Set display mode to x,y
3. Copy List Shift8
-> Only One item was copied
Another Bug:
1. Create a Program that returns a value
2.
If Prog "xyz"
Then "Yes"
Else "No"
IfEnd
Results in Syntax Eroor at line 1

Edited by HappyCalc, 14 November 2020 - 09:35 AM.


#654 Hlib2

Hlib2

    Casio Addict

  • Members
  • PipPipPip
  • 92 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860gii-2, afx-2.0+
    fx-9750gii, fx-9750g+
    cfx-9850gb+, graph25
    fx-991DE_X, fx-991ES+
    ti-voyage200(emulator)
    ti-83+_SE, ti-85, hp-50g

Posted 14 November 2020 - 04:19 PM

@ HappyCalc
Why make it so difficult?
Prog "xyz":If Ans:Then "Yes":Else "No":IfEnd
But if you really want the program to act as a variable,
then this is also possible:
Prog "xyz"➝_xyz:If _xyz:Then "Yes":Else "No":IfEnd

I have made a Program to set the Background Light level on an fx-9860GII-2 calculator

The 9860gii uses an Electro Luminescent backlight with a separate driver. The calculator software does not have access to smooth control the parameters of this driver, except for turning it on and off. I`m afraid that adjusting the backlight in your way may eventually lead the DC/AC converter to malfunction before the intended service life.

Edited by Hlib2, 15 November 2020 - 02:51 PM.


#655 HappyCalc

HappyCalc

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, On-Calc Programming(C.Basic), Gaming, Origami, Eating Chocolate

  • Calculators:
    fx-9860GII-2

Posted 25 November 2020 - 02:18 PM

@Hlib2
Thanks, I just forgot the use of Ans Variable
The Background was the use of a Program similar to IsKeyDown()
I used it in my games to detect multi keypress eg. Left and Up -> diagonal up
--
Does anyone know, how to use StrSplit()?
StrSplit("hello world it's an example", " ")->Str 1
Returns the first element "hello"
Otherwise I would use StrSrc() and StrMid()
Thanks!
:D

#656 piu58

piu58

    Casio Freak

  • Members
  • PipPipPipPip
  • 129 posts
  • Gender:Male

  • Calculators:
    Casio fx-9860G, Casio fx-CG20

Posted 26 February 2021 - 04:26 PM

Dear Sentaro, maybe I found another mistake.

 

I need that what in Python or C++ is the atan2 function. This is Pol(x,y) in fx Basic. The result is a list. I need the angle form that list.

I may use

Pol(x,y)-> List 1
List 1[1]->A

This works, if I use the standard setting, which is Matrix base 1. I prefer to use Matrix base 0, because this is what I have in my C based programming languages. With that setting, the results in List 1 are zero.

Of course, I can work with '#Mat1 to make a lokal setting of index 1 for a particular program. But then I have to use all indices from 1 in that prog.

I know that lists are not supported to the same degree matrices are. But I did not find a way to put the Pol()-result in a matrix.

 

May be, there is another function in C.Basic which calculated the angle correctly. Atan does not, the result is only in two of the four quadrants.

 

I tried this at my cg20 and used the version v1.45ß . This should be the newest one.


Edited by piu58, 26 February 2021 - 04:48 PM.


#657 Hlib2

Hlib2

    Casio Addict

  • Members
  • PipPipPip
  • 92 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860gii-2, afx-2.0+
    fx-9750gii, fx-9750g+
    cfx-9850gb+, graph25
    fx-991DE_X, fx-991ES+
    ti-voyage200(emulator)
    ti-83+_SE, ti-85, hp-50g

Posted 26 February 2021 - 06:13 PM

@ piu58

This works, if I use the standard setting, which is Matrix base 1. I prefer to use Matrix base 0, because this is what I have in my C based programming languages

In fact, it looks like a mockery of the creators of C.BASIC. If you program in C, you can easily fix this problem using the programming language. Haven`t you noticed much worse bugs in C.BASIC? However, they are fixed by the means of C.BASIC itself and allow you to continue working.

Edited by Hlib2, 26 February 2021 - 06:46 PM.


#658 Hlib2

Hlib2

    Casio Addict

  • Members
  • PipPipPip
  • 92 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860gii-2, afx-2.0+
    fx-9750gii, fx-9750g+
    cfx-9850gb+, graph25
    fx-991DE_X, fx-991ES+
    ti-voyage200(emulator)
    ti-83+_SE, ti-85, hp-50g

Posted 26 February 2021 - 07:11 PM

@Sentaro21
What happened to the updates for C.BASIC? I worry more about Sentaro than about this CASIO calculator app.
In general, C.BASIC doesn`t need to be complicated. I would remove from this application about 40% of the unnecessary code that takes up the memory of the calculator and creates an extra load on the CPU, and would stop there. Functions like Graph, Table, for example, are absolutely unnecessary, since they are perfectly implemented in CASIO-BASIC. I would leave only the graphical routines associated with the Plot and Pxl operators. It is desirable to organize the compatibility of results with variables in CASIO-BASIC. You should add a quick navigation for a list of the "function" type and make a list of variables of the Yn type at least for viewing.
Of course, it would be better to leave the latest version v2. 45. 20 as it is. It is easier to adapt to bugs and limitations than to constantly adjust yourself to various changes, which, in fact, only complicate the use of calculators in the C BASIC application.
I finally gave up on the new versions of the wonderful application "free_DM-42", because a constant study of new implementations of old ideas (which have long been implemented on other platforms) my employer doesn`t pay.

#659 piu58

piu58

    Casio Freak

  • Members
  • PipPipPipPip
  • 129 posts
  • Gender:Male

  • Calculators:
    Casio fx-9860G, Casio fx-CG20

Posted 27 February 2021 - 09:27 AM

Sentara was last seen here in September.

For all others: I found a solution.

Pol(x,y) 

stores the result in Mat Ans. You may separate

Mat Ans [1] -> R
Mat Ans [2]-> A (ngle)

The indices 1 and 2 do not depend on the setting for matrices with  '#Mat or the setup, it remains always the same.


Edited by piu58, 27 February 2021 - 09:27 AM.


#660 r0773n

r0773n

    Newbie

  • Members
  • Pip
  • 6 posts
  • Gender:Male

  • Calculators:
    Hacked fx-9750GII-2 (9860GII OS)

Posted 04 March 2021 - 09:18 AM

hi,

how do you use the SysCall and call functions? the manual isnt too clear here 

i cant get anything other than an error or restart the calc. Is this for starting .g1m programs, or add-ins, or what?

Ive tryed the manual's examples but no luck :/



#661 CalcLoverHK

CalcLoverHK

    Casio Freak

  • Members
  • PipPipPipPip
  • 246 posts
  • Gender:Male
  • Location:Hong Kong
  • Interests:Playing video games (Minecraft, krunker.io), calculators, programming in Casio Basic/C.Basic, Scratch (formal), IT research (sometimes)

  • Calculators:
    fx-50FHII (2019/1/30)
    fx-9750GIII (2020/6/13)

Posted 04 March 2021 - 09:35 AM

Jeez, three months since my last message here. I am busy working on my youtube channel (gaming btw) so I put down all the calc things for a long while.

 

What happened to the updates for C.BASIC? I worry more about Sentaro than about this CASIO calculator app.

 

Hmm, the last time I saw him was on August last year in e-Gadget blog. He said he was super busy and couldn't work on C.Basic for now. (https://egadget.blog...tml#comment5476)

 

hi, got some questions about the execute funtions (SysCall, Call) - i cannot get these to do anything than an error or restart the calc. Are these for running programs, add-ins or what? I have read the manual, and i tried the examples but they dont work.

can anyone explain what they do and how to use them?

(im using the latest version)

 

SysCall calls the internal commands of SuperH (SH3/SH4A) architecture that are only useful under very specific circumstances and could damage your calculator if improperly handled. You should probably read the whole SuperH manual which is included in fx-9860G SDK package before playing around with Syscall.


Edited by CalcLoverHK, 04 March 2021 - 04:41 PM.


#662 r0773n

r0773n

    Newbie

  • Members
  • Pip
  • 6 posts
  • Gender:Male

  • Calculators:
    Hacked fx-9750GII-2 (9860GII OS)

Posted 04 March 2021 - 12:47 PM

@CalcLoverHK

ahh ok, thanks. ill probably stay away from that then lol. does Call( do a similar thing?


Edited by r0773n, 04 March 2021 - 12:50 PM.


#663 CalcLoverHK

CalcLoverHK

    Casio Freak

  • Members
  • PipPipPipPip
  • 246 posts
  • Gender:Male
  • Location:Hong Kong
  • Interests:Playing video games (Minecraft, krunker.io), calculators, programming in Casio Basic/C.Basic, Scratch (formal), IT research (sometimes)

  • Calculators:
    fx-50FHII (2019/1/30)
    fx-9750GIII (2020/6/13)

Posted 04 March 2021 - 04:40 PM

@CalcLoverHK

ahh ok, thanks. ill probably stay away from that then lol. does Call( do a similar thing?

 

Yes, probably. ;)



#664 Hlib2

Hlib2

    Casio Addict

  • Members
  • PipPipPip
  • 92 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860gii-2, afx-2.0+
    fx-9750gii, fx-9750g+
    cfx-9850gb+, graph25
    fx-991DE_X, fx-991ES+
    ti-voyage200(emulator)
    ti-83+_SE, ti-85, hp-50g

Posted 06 March 2021 - 04:34 PM

CalcLoverHK wrote on 04 March 2021 - 12:35 PM:

Hmm, the last time I saw him was on August last year in e-Gadget blog. He said he was super busy and couldn`t work on C.Basic for now.

Thank you for the information. Sometimes I have to go back to work at my old program after a break of several months. I look through my old code and ask myself: I have written such complex things, and how could I understand all this codes now? :-)
It seems to me that we will not see the new versions anymore. IMO, even at this stage, this is the best emulation of the BASIC calculator for the entire existence of minicomputers with the CASIO-BASIC programming language.

Edited by Hlib2, 06 March 2021 - 04:54 PM.

  • piu58 likes this

#665 MJim

MJim

    Casio Fan

  • Members
  • PipPip
  • 43 posts
  • Gender:Male

  • Calculators:
    Casio ClassPad 300 Plus
    Casio fx-CG50
    Casio fx-9750GII SH4
    Casio fx-9750GA Plus
    Casio fx-7000G
    Casio fx-3650PII
    Casio fx-3650P
    Casio fx-3600PV
    Casio fx-50F
    Casio fx-991EX
    Casio fx-991MS 2nd Edition
    Casio fx-95MS
    Casio fx-82MS
    Casio fx-100D
    Casio fx-550S
    Casio fx-82AU Plus II
    Casio fx-82(original version),82SX,82LB
    HP-49G+
    Sharp El-W516X
    Sharp EL-506P (+1 clone)

Posted 24 March 2021 - 12:47 AM

It seems to me that we will not see the new versions anymore. IMO, even at this stage, this is the best emulation of the BASIC calculator for the entire existence of minicomputers with the CASIO-BASIC programming language.

Hopefully this isn't forever, but in addition to his excellent CBasic his overclocking tools are very well made.  CBasic & Ftune have added much value to my Casio calculators over the years!

 

The implementation of the Seq function seems so much better to use in CBasic then RUN-MATRIX mode.  For example to calculate the earths diminishing gravity over roughly a light second using 3km intervals:

6.6743x10^-11*5.972x10^24*Seq(1/X^2, X, 6.371x10^6, 306,371,000 3x10^3)

On the fx-CG50 at stock speeds it takes 13.3 seconds to generate a massive 100k value table.  That is ~7.3k calculations per second, which can be further improved using his overclocking tools to reduce this to 7.68 seconds or 13k calculations per second.  These table sizes are only possible due to the addtional memory that CBasic gives access to (~1.7MB of RAM on the CG50, ~250KB on the fx-9750GII). 

 

I look through my old code and ask myself: I have written such complex things, and how could I understand all this codes now? :-)

While I don't consider myself a programmer, I have done a couple of introductory computer science courses which focused primarily on Python.  When I do look back at my old programs I wonder the very same thing, how on earth did I manage to write something like that!
 



#666 Hlib2

Hlib2

    Casio Addict

  • Members
  • PipPipPip
  • 92 posts
  • Gender:Male
  • Location:Ukraine
  • Interests:industrial electronics,
    graphing calculators

  • Calculators:
    fx-9860gii-2, afx-2.0+
    fx-9750gii, fx-9750g+
    cfx-9850gb+, graph25
    fx-991DE_X, fx-991ES+
    ti-voyage200(emulator)
    ti-83+_SE, ti-85, hp-50g

Posted 27 March 2021 - 07:22 PM

@MJim

C.Basic & Ftune have added much
value to my Casio calculators over the years!

HP tried to make a quick calculator in 2012 (hp-39gii), but they didn`t succeed. Sentaro21 was the first to do this in the best possible way. I now always use C.BASIC, even when creating programs for Graph25 or for fx-9750g+. It seems to me that several programmers participated in the creation of C.BASIC, since the source code is written in different styles.

#667 HappyCalc

HappyCalc

    Newbie

  • Members
  • Pip
  • 10 posts
  • Gender:Male
  • Location:Germany
  • Interests:Programming, On-Calc Programming(C.Basic), Gaming, Origami, Eating Chocolate

  • Calculators:
    fx-9860GII-2

Posted 07 April 2021 - 06:00 PM

hi,

how do you use the SysCall and call functions?

I found a list of SysSalls by SimLo here: https://bible.planet...cy_syscalls.htm

And here some documentation about them: https://bible.planet.../simlo/chm/v20/

SysCalls are not dangerous as lang as you don't try random Syscalls.

 

Hope it helps,

HappyCalc

 

EDIT:

SysCalls CAN be dangerous if you use them wrong. Some SysCalls may delete some Data. But rather your Calc will crash and restart if you used them wrong.

In C.Basic you can use them like this:

(I used Date Dialog for example -> see https://bible.planet..._legacy_AUX.htm for information)

'Set List Index to 0
'#Mat 0

'Initialize Int/Long (32-Bit) List for Output
3->Dim List 1.L

'Initialize Int/Long (32-Bit) List for Input Arguments
'It needs to contain 0 and 0x7545, otherwise it may crash
{0, 0x7545}->List 2.L

'Run SysCall and passing Pointers as Arguments
SysCall(0xD64,&List 1[0],&List 1[1],&List 1[2],&List 2)

'Show result
"Day"
Disp List 1[0]
"Month"
Disp List 1[1]
"Year"
Disp List 1[2]

You need to use the specific Type for the Syscall. I prefer List or Mat, since you can set their Element Size.

You need Long List for int, Byte List for char and Double List for double variable types.

HappyCalc  :D


Edited by HappyCalc, 07 April 2021 - 07:48 PM.






Also tagged with one or more of these keywords: Casio Basic C.Basic

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users