Omnimaga

Calculator Community => Casio Calculators => Topic started by: flyingfisch on August 30, 2011, 08:55:36 pm

Title: On-calc C compiler for 9860
Post by: flyingfisch on August 30, 2011, 08:55:36 pm
Does anyone know of a way to compile c on a calc?
Title: Re: On-calc C compiler for 9860
Post by: DJ Omnimaga on August 30, 2011, 08:56:28 pm
Hmm good question, I do not remember seeing one, but a while ago somebody talked about a tool that let people program some sort of language on-calc. I think it was a derivative of BASIC, though.
Title: Re: On-calc C compiler for 9860
Post by: flyingfisch on August 30, 2011, 08:58:02 pm
I remember seeing that on CK.

BTW: does text in mlc work on your hacked calc?
Title: Re: On-calc C compiler for 9860
Post by: z80man on August 30, 2011, 09:27:00 pm
Now that there is the gcc SDK for the prizm someone should port it over to the fx-98 series first off. Then secondly the compiler can be slightly modified and recompiled for the the fx-98. i believe the only thing that needs to be done to have gcc for the fx-98 is write a new linker script and crt.s file which should be rather simple. Then for the on calc version the modifications are a little more intense. the linker script and crt.s file will stay the same but the compiler itself will require a partial STL library to be ported for file io and the console to work properly. it will also require that a new main function is created that allows the user to select the proper file and then calls the original main. I was going to attempt this on the Prizm soon but i could also make an fx-98 version too with only minor modifications
Title: Re: On-calc C compiler for 9860
Post by: flyingfisch on August 30, 2011, 09:34:41 pm
Thats cool. one prob, i cant do c (yet)
Title: Re: On-calc C compiler for 9860
Post by: z80man on August 31, 2011, 02:35:38 am
no probl
Thats cool. one prob, i cant do c (yet)
No problem. I'll check Simon Lothar's documentation on the fx-98 series so I can modify the proper files to work correctly. I will also rewrite mkg3a into a new mkg1a unless such an app already exists. Basically I will turn this Prizm exclusive project into a Casio calc harmony one instead :)
Title: Re: On-calc C compiler for 9860
Post by: Horrowind on August 31, 2011, 03:34:27 am
I will also rewrite mkg3a into a new mkg1a unless such an app already exists. Basically I will turn this Prizm exclusive project into a Casio calc harmony one instead :)

I think this has already been done. If you take a look here, there is a link for using gcc to compile c programs instead of casios sdk. also g1a wrapper should be the analogon to mkg3a...

I should add some userbar/avatar flavor... my post always seem so short :)
Title: Re: On-calc C compiler for 9860
Post by: flyingfisch on September 03, 2011, 10:22:47 am
This is cool! I would be more interested in c if I could do it on my calc since it would be portable and I just find programming on my calc more comfortable.
Title: Re: On-calc C compiler for 9860
Post by: flyingfisch on September 13, 2011, 12:49:31 pm
Hey, z80man, are you currently working on this project or are you going to. (not trying to nag you or anything LOL)
Title: Re: On-calc C compiler for 9860
Post by: z80man on September 13, 2011, 07:29:38 pm
I'm going to later on but right now it is a fairly low priority. There is still plenty of documentation to be done and I have a shell to write also.
Title: Re: On-calc C compiler for 9860
Post by: flyingfisch on September 13, 2011, 11:54:10 pm
OK, cool! Be sure to let me know when you start on it!