ticalc.org
Basics Archives Community Services Programming
Hardware Help About Search Your Account
   Home :: Archives :: News :: Qs Moka 2.11: Java for 68k Calcs

Qs Moka 2.11: Java for 68k Calcs
Posted by Michael on 29 February 2004, 15:20 GMT

Frédéric Brown has released his Moka SDK for the 89, 92+, and Voyage 200. Moka is similar to Java and contains the same object-oriented design. The Moka SDK converts Java classes into a TIGCC C project that is assembled. There's also an introduction to using Moka and the SDK source code.

  Reply to this article


The comments below are written by ticalc.org visitors. Their views are not necessarily those of ticalc.org, and ticalc.org takes no responsibility for their content.


Re: Qs Moka 2.11: Java for 68k Calcs
Michael McElroy Account Info
(Web Page)

Simply astounding. Well done!

Reply to this comment    29 February 2004, 19:10 GMT


BRUN THE DILDO!!!
RCTParRoThEaD  Account Info
(Web Page)

I'm gonna be taking Java next year in highschool, so I'll be able to use this maybe since I'm too lazy to learn C. I don't like java though because it's slow and inefficent like old people making love.

Reply to this comment    1 March 2004, 06:09 GMT


Re: BRUN THE DILDO!!!
Ben Cherry  Account Info
(Web Page)

I have heard a lot of people who are scared of learning C. It really isnt very hard. I learned it very quickly last fall, and all the programming experience i had was a tiny bit of java and some TI-BASIC.

Reply to this comment    2 March 2004, 01:51 GMT

Re: Qs Moka 2.11: Java for 68k Calcs
chemoautotroph Account Info
(Web Page)

Frankly I like writing in C better anyway, I use Java for school and work, but I don't like object-oriented prorgamming, really.

Reply to this comment    29 February 2004, 21:18 GMT


Re: Re: Qs Moka 2.11: Java for 68k Calcs
Chivo  Account Info
(Web Page)

I also don't care much for OOP. Not very many problem types can be best expressed using OO.

Besides, designing programs to be data-centric is probably the best way to write good programs and eliminates much of the advantages of OOP anyway (see URL for "The Art of Unix Programming", which explains data-centric design).

I do like some non-OOP related features of C++ that are not in C, though more recent C standards and compilers support them.

Reply to this comment    1 March 2004, 01:14 GMT

Re: Re: Re: Qs Moka 2.11: Java for 68k Calcs
no_one_2000_  Account Info
(Web Page)

I don't particularly like OOP either, but I can see where it would have some advantages. I still think there isn't anything you can program with OOP that you can't program without OOP.

Reply to this comment    1 March 2004, 04:08 GMT


Re: Re: Re: Re: Qs Moka 2.11: Java for 68k Calcs
tonsofpcs Account Info

You can't, Assembly isn't OO at all, so everything ends up being not OO, the only thing that makes it OO is the way you program it in. Most OOP langauges also alow you to program in !OOP mode (sorta, kinda)

Reply to this comment    13 January 2005, 06:38 GMT

Re: Re: Re: Qs Moka 2.11: Java for 68k Calcs
no_one_2000_  Account Info
(Web Page)

I don't particularly like OOP either, but I can see where it would have some advantages. I still think there isn't anything you can program with OOP that you can't program without it.

Reply to this comment    1 March 2004, 04:08 GMT


Re: Re: Re: Re: Qs Moka 2.11: Java for 68k Calcs
Martin Warmer  Account Info

That's true because you can convert OO code to nonOO code automatically. But using OO has advantages when your programs become really big by making it more structured. But for calculators with relatively small programs using OO doesn't give much of an advantage.

Reply to this comment    1 March 2004, 07:13 GMT


Re: Re: Re: Qs Moka 2.11: Java for 68k Calcs
Quésoft  Account Info
(Web Page)

The main advantage over imperative language is that OO supports a higher level of abstraction through mechanism such as polymorphism.
Any way, Moka offers complete interoperability with C (C statements can be included in native { } blocks). Moka being a ‘translator’, these statements are simply exported to the final TIGCC project. Moka is a port of the Java programming language, not a port of the Java Virtual Machine. This means that Moka, although many effort has been done to preserve an API similar to the Java API, is adapted to the TI-68K developing realities such as optimization of size and speed.

Reply to this comment    1 March 2004, 13:50 GMT

Re: Re: Re: Re: Qs Moka 2.11: Java for 68k Calcs
chemoautotroph Account Info
(Web Page)

Anything like & pass by reference in functions? That would be cool. Of course, that's not native Java, that's C++, but I wish it was everywhere.

Reply to this comment    1 March 2004, 20:14 GMT

Re: Re: Re: Re: Re: Qs Moka 2.11: Java for 68k Calcs
Quésoft  Account Info
(Web Page)

That can be done using 2 way in Moka : the 'right' thing to do is to define classes and use objects (which are passed by reference), the 'bad' thing is to use C interoperability and proceed just as in C (that's the good thing in C++ I think :D).
Note that OO language, through polymorphism, has a more ‘friendly’ way to pass function by reference than the pointers to functions in C.

Reply to this comment    1 March 2004, 22:36 GMT

Re: Re: Re: Re: Re: Re: Qs Moka 2.11: Java for 68k Calcs
Quésoft  Account Info
(Web Page)

I forgot to mention that special classes exist in Java (Boolean, Integer, Long, Double, …) that wrap primitive values so they can be used to pass by reference those primitive type.

Reply to this comment    1 March 2004, 22:39 GMT


Re: Re: Re: Re: Re: Re: Qs Moka 2.11: Java for 68k Calcs
Kevin Kofler Account Info
(Web Page)

What you didn't mention is that the "right" thing is horribly inefficient compared to the "wrong" thing!

Reply to this comment    4 March 2004, 01:48 GMT


Re: Re: Re: Re: Re: Qs Moka 2.11: Java for 68k Calcs
Chivo  Account Info

Using & to pass variables/objects by reference is purely syntactic sugar. It's identical in every other way (AFAIK) to passing a pointer to the variable to a function.

Reply to this comment    2 March 2004, 20:57 GMT


Re: Re: Re: Re: Qs Moka 2.11: Java for 68k Calcs
Gergely Patai  Account Info
(Web Page)

OO and imperativeness are two independent concepts. Java is an imperative OO language...

Reply to this comment    3 March 2004, 09:29 GMT


Re: Re: Re: Re: Re: Qs Moka 2.11: Java for 68k Calcs
Quésoft  Account Info
(Web Page)

It's true, even SmalkTalk, in which everything is an object, even structures (loop, conditional, name it), is also an imperative language. I misused the term. I wanted to talk about 'traditional procedural imperative languages'.

Reply to this comment    3 March 2004, 13:32 GMT

Index
ti_is_good_++  Account Info

Here's my question: Will there be new Moka directories, or is there any way to tell/any performance difference?

This probably would only be necessary if a different oncalc compiler was used (i.e. MCL programs wouldn't work in the same way as BASIC ones, and definitely would require a different directory).

Reply to this comment    1 March 2004, 18:46 GMT


Re: Index
Quésoft  Account Info
(Web Page)

Moka generate nostub programs. Once compiled, they are similar to any other asm prog.

Reply to this comment    1 March 2004, 22:26 GMT


Re: Re: Index
Joe Pinsonault  Account Info

Hi Mr. Quésoft, i have a question.
when i try to run some of the examples, it says 'ASAP or Exec string too long'. i'm running them on VTI, with AMS 2.08. its usually the ones that use the mouse, but some of those do work.
does anyone know what s wrong?

Reply to this comment    2 March 2004, 01:58 GMT


Re: Re: Re: Index
Quésoft  Account Info
(Web Page)

I think the AMS version 2.08 prevents programs larger than 8K (or is it 16K) to run. As the graphic environment induce a big overhead, it is logical that the windowed application are the ones that don't work.

I beleived that the EXECUTE_IN_GHOST_SPACE directive (which is enabled by default in Moka programs) prevents this, but maybe I was wrong. You may need a launcher to run larger programs :(

I'll work this out and post it back ...

Reply to this comment    2 March 2004, 02:49 GMT

Re: Re: Re: Re: Index
Quésoft  Account Info
(Web Page)

I did find an utility called hw2patch developped by Julien Muchembled on ticalc.org and it should work. Whoever, i tried it with AMS 2.09 and it is incompatible (the only version supported are earlier than AMS 2.05). I hope someone know a fix that work for the newer AMS version ...

Reply to this comment    2 March 2004, 03:13 GMT

Re: Re: Re: Re: Re: Index
Joe Pinsonault  Account Info

hmmm, is there a way i can get AMS 2.05? or does TI keep the old ones in a inpenetrable fortress on an unknown island in the pacific ocean...

Reply to this comment    2 March 2004, 04:14 GMT


Re: Re: Re: Re: Re: Re: Index
Konrad Meyer  Account Info
(Web Page)

Master Chief _is_ real. He's owned by TI and they keep him on their unpenatrible fortress island to guard the old AMS versions.

Reply to this comment    2 March 2004, 05:23 GMT


Re: Re: Re: Re: Re: Re: Re: Index
Joe Pinsonault  Account Info

yeah, haha. ti is making their own secret government and military.

oh, i got the files to work by using tict explorer

Reply to this comment    2 March 2004, 06:35 GMT


Re: Re: Re: Re: Re: Index
Kevin Kofler Account Info
(Web Page)

HW2Patch is NOT the solution to your problem.

Reply to this comment    4 March 2004, 01:49 GMT


Re: Re: Re: Re: Index
Kevin Kofler Account Info
(Web Page)

EXECUTE_IN_GHOST_SPACE is NOT a solution to your problem. What you need to do is to generate a launcher. The easiest way is to just ExePack the program. Use the -pack switch. See http://tigcc.ticalc.org/ doc/comopts.html#SEC3 .

Reply to this comment    4 March 2004, 01:51 GMT

Re: Re: Re: Re: Re: Index
amateur Account Info

Hey this is a bit off topic, but anyway

I got a broken TI-83+. It actually works perfectly (I can send and receive files to the calculator from the computer or another calc), except for the screen is bust. Nothing shows up on the screen. I opened it up, and the thin plastic tape-like wires going to the screen was cracked (it was folded inside the case, like usual). Anybody know how I could fix this?? (ie, where I can buy another set of wires?)

Reply to this comment    4 March 2004, 02:29 GMT

Re: Re: Re: Re: Re: Index
Quésoft  Account Info
(Web Page)

It works ! Great ! It is a very useful thing to know... Smaller programs, which runs :D

I think the next release of Moka will offer support for ExePack. But for now, developpers can modify the options of TIGCC before compiling of the default TIGCC option in config file tigcc\conf\tigcc_project.default of the mdk directory, adding the lines
Pack=1
Packed Variable=test
at the end of the file.

Thank you for posting.

Reply to this comment    4 March 2004, 03:37 GMT


Re: Re: Re: Re: Re: Re: Index
Quésoft  Account Info
(Web Page)

NB : copy paste error, 'test' can be replace by any variable name that fits your needs :D

Reply to this comment    4 March 2004, 03:45 GMT


Re: Re: Re: Re: Re: Index
ti_is_good_++  Account Info

BTW, I had always wondered how to exepack programs. Thanks.

Reply to this comment    5 March 2004, 22:33 GMT

1  2  3  

You can change the number of comments per page in Account Preferences.

  Copyright © 1996-2012, the ticalc.org project. All rights reserved. | Contact Us | Disclaimer