# Introduction - C.Basic, a component of the C:Basic project --- **If you feel your Casio Basic programs are not running fast enough, C.Basic can free you of that frustration!** Get started with genuine Casio Basic programs, then enjoy extended commands that Casio Basic alone cannot perform. - Currently **C.Basic** (Basic interpreter) runs on fx-9860G and fx-9860G II, but support for Prizm fx-CG10 and fx-CG20 is planned. [17th Jan, 2017] - **C.Basic** will evolve into a Casio Basic compiler "**C:Basic**", which will run programs much faster than C.Basic (10 times from the looks of it). [17th Jan, 2017] All the instructions supported by C.Basic are listed in the `"README_J.txt"` and `"Manual_L.txt"` files included in the distribution package. However, both of these are in Japanese. **Thus this English site. Please be patient until translation work is completed.** [17th Jan, 2017] --- **C.Basic is part of the C:Basic project.** C:Basic will provide add-ins to interpret and compile Casio Basic programs. At this time, **C.Basic** (single dot), a Basic interpreter, has been released. C.Basic is provided as an add-in application for fx-9860G and fx-9860G II. Support for fx-CG 10/20 is planned. In the future, **C:Basic** (doubles dots, colon) will include a compiler application. ## What is C.Basic ? **C.Basic** is designed for *fast*, *Casio Basic-compatible* interpretation and brings in some of the *good features of fx-5800P*. C.Basic runs program files (`*.g1m`) from the storage memory. The original interpreter also uses `g1m` files, but reads from the main memory. A program source that only contains [compatible commands](http://egadget2.web.fc2.com/CBasic/Interpreter/Reference.html#CasioBasicCommands) can be run in both C.Basic and the usual interpreter. *Add-in Casio Basic Interpreter (and Compiler)* Copyright(C) 2015 by sentaro21 Email to author: `sentaro21 (at) pm.matrix.jp` Email to this site's webmaster: `Krtyski (at) gmail.com` ## Pros - C.Basic is mostly compatible with genuine Casio Basic. - Programs run at least 10 times faster in C.Basic. - C.Basic's List and File editors are easier to use than the usual ones. - Can execute programs from storage memory, and supports sub-folder structures. - Some Casio Basic commands are extended for more features. - Newly-implemented commands for more powerful and flexible programming. ## Cons - C.Basic does not cover all of the original Basic commands. - Calculations don't yield the same results as the usual interpreter because C.Basic use double-precision floating point instead of fixed-point BCD. - C.Basic stores PICT files in storage memory, hence using them is slower (at least until version 0.87 which uses the heap area from the main memory). - There must be some bugs, unfortunately ^^ Please provide us with a bug report if you find any. ## Almost compatible with vanilla Casio Basic Flawless compatibility is our goal, but some differences are intentional: - `?` and `?→` input commands are displayed on a single line. Displaying a string longer than 21 characters will result in horizontal scroll instead of line wrap. - When a graphing sketch commands is followed by the multi-statement command `:`, the screen is not refreshed. - Program running time is displayed when the program ends. This function can be triggered in the setup page. - Comment delimiters `'` are allowed before carriage returns and ◢ (output), and `:` can be included in the comment string. C.Basic also takes in user-friendly features of fx-5800P: - C.Basic supports a `"?A"` command as fx-5800P, as opposed to fx-9860G / fx-9860G II which only support `"?→A"`. - String output command `" "` is fully compatible with fx-5800P thus a but different from fx-9860G / fx-9860G II. See [Topic](http://egadget.blog.fc2.com/blog-entry-520.html) for details. ## Caution! We don't believe that C.Basic could damage your calculator, but the main memory could still be unexpectedly damaged or destroyed, which would require a whole memory reset. Hence it is strongly recommended that you backup your main and storage memory data. Please be aware that you should only use C.Basic at your sole risk. ## Disclaimer of Warranty Use of C.Basic and C:Basic (hereinafter SOFTWARE) is at user’s sole risk. All materials, information, products, software, programs and service provided “as is”, with no warranties or guarantees whatsoever. Creators of SOFTWARE and support team who provide support documents, support web site, information and sample programs (hereinafter DEVELOPMENT TEAM) expressly disclaim to the fullest extent permitted by law, all express, implied, statutory, and other warranties, guarantees, or representations, including, without limitation, the warranties of merchantability, fitness for a particular purpose, and non-infringement of proprietary and intellectual property rights. Without limitation, DEVELOPMENT TEAM makes no warranty or guarantee that development of SOFTWARE will be uninterrupted, timely, secure, or error-free. # Installing C.Basic --- 1. Download the **C.Basic package** on the ["Get newest version"](http://egadget2.web.fc2.com/CBasic/archives/programs/CBasic/CBasic_versions.html) page and [see this important note](http://egadget2.web.fc2.com/CBasic/Interpreter/Note/AppNote.html#01). 2. Transfer the **`CBasic.g1a`** file (add-in application file) to the storage memory of your fx-9860G II calculator (use PC link software FA-124A). 3. Start up C.Basic by pressing the `[MENU]` key and selecting the C.Basic icon. 4. To check which version of C.Basic you are using, press `[SHIFT][MENU][F6](Ver.)`, which will show the version number. 5. If the version number matches the C.Basic version you wanted to install, then installation has been completed. 6. To return back to the file list, press `[EXIT]` then `[EXIT]` again. 7. `CBasic.g1a` is a rather large file, thus optimizing storage memory is recommended. Press `[MENU]`, select the `MEMORY` icon, then press `[EXE]` followed by `[F5]`. # Starting up C.Basic To start up **C.Basic**, press `[MENU]`, select the C.Basic icon, then press `[EXE]`. There are two ways for copying a program file (`g1m` file) developed for the original Casio Basic interpreter into the File List in C.Basic: ## Using the pre-installed memory manager - To start up the memory manager, press `[MENU]`, select the memory manager icon and press `[EXE]`. - Press `[F1]` to display the contents of the main memory. - Move the cursor down to `` and press `[EXE]`. You should now be seeing the list of all Basic Casio programs currently installed for the usual interpreter. - Select the program file that you want to copy. - Press `[F1](SEL)` then `[F2](COPY)`. - Select `"ROOT"`, press `[EXE]`; the calculator will ask you for a file name. - Enter an appropriate file name or just `"A"`, then press `[EXE]`. - Press the `[MENU]` key to go back to the main menu. - Start C.Basic. - In the File List select the name you just entered, press `[F6]` and then `[F2](REN)`. - You will be prompted with `[Rename file Name?]`, and the original file name will be displayed (even though you typed in `"A"`). Press `[EXE]`. - Now the file name has been corrected. ## Using the PC link software (FA-124) FA-124 is a PC link software which is included in the packages of fx-9860G and fx-9860G II. For detailed instructions, please refer to its manual. Once you have downloaded a program's source file (`g1m` file), you can use the PC link software to copy it into C.Basic's File List. # Acknowledgements "[SuperH-based fx calculators (version 20)](https://bible.planet-casio.com/simlo/chm/v20/start.htm)" provided useful information for investigating and implementing internal specification. Regarding file handling in C.Basic, "[Wsc & Fvm V1.2 - Casio Fx-9860 Series On-calc C Compiler](http://community.casiocalc.org/topic/6836-wsc-fvm-v12-casio-fx-9860-series-on-calc-c-compiler/Wsc%20&%20Fvm%20V1.2%20-%20Casio%20Fx-9860%20Series%20On-calc%20C%20Compiler)" provided useful information. "[何かの足跡](http://www.d-b.ne.jp/~k-kita/index.html)" for providing Japanese Kana font data and its associated output routine. Detailed function and features of the original Casio Basic are referenced by "[e-Gadget - Programming Calculator (プログラム関数電卓)](http://egadget.blog.fc2.com/)" by Krtyski (contents are mainly Japanese). Many thanks to my friends. by sentaro21