I'm just wondering, but I realize now that there is little point of making a Java VM for one platform -- the garbage collecting and other things just take away space and speed -- why not have the Java compile on comp, then have some sort of a transfer program to simplify it before sending? Because I feel as if the extra stuff just really isn't needed. To tell the truth, I think it would be better to just make a Java-like language from scratch that has everything in Java-syntax and OOP but has direct control over objects like C++.

If you are porting Java though anyways, I do hope you're porting something like Java ME Razz. It still has all that inflated crap in the header and GC, but at least it's meant for smaller size constraints.
It sounds like you're just advocating C++, then, which I am perfectly happy supporting. Very Happy Once Jonimus and company get gcc all happily generating .g3a files, then we can compile C++ programs for the Prizm to our hearts' content.
KermMartian wrote:
Yeah, but the downside of writing a new JVM by hand is that it's really, really hard, as Kllrnohj pointed out. And why can't you maintain C code? We can easily teach you C if you'd like; it's quite straightforward.


It's also quite fun to write a new JVM and it makes for an interesting learning project. Plus, the code is extremely recyclable. I have a few more uses planned for it than just a JVM Wink

In any case, I doubt I'll ever be able to learn C or especially C++. I'm absolutely horrible with that level of abstraction.
Ashbad wrote:
I'm just wondering, but I realize now that there is little point of making a Java VM for one platform -- the garbage collecting and other things just take away space and speed -- why not have the Java compile on comp, then have some sort of a transfer program to simplify it before sending? Because I feel as if the extra stuff just really isn't needed. To tell the truth, I think it would be better to just make a Java-like language from scratch that has everything in Java-syntax and OOP but has direct control over objects like C++.

If you are porting Java though anyways, I do hope you're porting something like Java ME Razz. It still has all that inflated crap in the header and GC, but at least it's meant for smaller size constraints.


Why? You are keeping the worst part of Java (its syntax) and getting rid of the best part (garbage collection). Besides, you can't strip GC out of Java - you've got no way to free objects then.

The different versions of Java (ME, SE, EE, etc...) just dictate the standard libraries it ships with, it has no impact on the VM or language.

But you should check out Go (golang.org). It's pretty much what you really want.
Quote:
But you should check out Go (golang.org). It's pretty much what you really want.

Says our Googlite.
elfprince13 wrote:
Says our Googlite.


*Googler

Wink
Okay, after spending three hours converting the source to a form the assembler would recognize (basically until I realized I could use REGEX to knock the rest out in ten minutes), it looks like most of the classloader and boot code is assembling correctly.
Qwerty.55 wrote:
Okay, after spending three hours converting the source to a form the assembler would recognize (basically until I realized I could use REGEX to knock the rest out in ten minutes), it looks like most of the classloader and boot code is assembling correctly.
Huzzah, that was relatively fast! Do you mean assembler or compiler, by the way? The JVM is in SH4 ASM?
I mean Assembler. Yes, I've been writing it in SH4 ASM. Turns out I misaligned some data, so it's not assembling perfectly, but close enough that I know my code is good.
Qwerty.55 wrote:
I mean Assembler. Yes, I've been writing it in SH4 ASM. Turns out I misaligned some data, so it's not assembling perfectly, but close enough that I know my code is good.
Gotcha, and very very nice! Have you succeeded in running your code on an emulator yet?
I haven't been able to figure out how to import my code into the emulator yet, so no.
Qwerty.55 wrote:
I haven't been able to figure out how to import my code into the emulator yet, so no.
Ah, I hope you figure it out soon. Smile We really need a computer-side Prizm emulator and a Prizm-side TI emulator. Wink
I've decided that a slight change of name is in order. The project is now officially the Khavi Virtual Machine Framework.

This name change is prompted by the fact that I have now added support for the instruction set of the Lua virtual machine. This will be included in the default release and will allow the framework to emulate both stack based and register based virtual machines.

On an unrelated note, I'll also be rewriting a large portion of the program to adhere to something more resembling a real virtual machine rather than a naive interpreter. This will result in some slowing of the program, but it will likely save kilobytes of space and code in the long run. The only thing that I have to completely rewrite because of this is the thread manager/context switcher, although that's by far the most complicated and evil part of this whole insane program.

PS: if you think supporting multiple languages is a bit ambitious, deal with it.
Now that you mention it, I was wondering how hard it would be to write a Lua add-in for the Prizm so that we could run native Nspire Lua documents on the Prizm with no modification. However, I think it's extremely likely that the next OS update will restrict access to the Lua environment on the Nspire, so it's probably not worth attempting for me. Thoughts? Oh, and great idea for your modifications, and nifty name!
KermMartian wrote:
Qwerty.55 wrote:
I haven't been able to figure out how to import my code into the emulator yet, so no.
Ah, I hope you figure it out soon. Smile We really need a computer-side Prizm emulator and a Prizm-side TI emulator. Wink
Just to mention I've been working on a computer Prizm emulator named Spectrum. Currently about half of the cpu instructions are included and after that the hardware will be the next step.

And the Khavi framework has proven to have more uses than just Java. I know that Qwerty has just started a Lua interpreter to run with Khavi and I'm also working on an 84+ emulator to be ran from Khavi. The emulator being programmed in straight Super H asm also.
z80man, I hope that you're going to be posting a Your Projects thread about that, including explaining how you came up with the name Spectrum for the emulator (intriguing because of the old z80-based machine, the Spectrum ZX). Qwerty, any progress reports on this particular project?
I assume it has to do with the phrase 'A Spectrum of Light' or the such. I doubt it has anything to do with the ZX spectrum Razz
Ashbad wrote:
I assume it has to do with the phrase 'A Spectrum of Light' or the such. I doubt it has anything to do with the ZX spectrum Razz
Ahhh, of course. A prism produces the spectrum from white light, Prizm, Spectrum. Thanks for clarifying that, Ashbad; good thinking. Smile
Yes that is where the name idea came from. I wanted the name to have to do something with prisms and light so spectrum was the first thing I came up with. Nothing to do with the Spectrum ZX
z80man wrote:
Yes that is where the name idea came from. I wanted the name to have to do something with prisms and light so spectrum was the first thing I came up with. Nothing to do with the Spectrum ZX
That's fair. I'll continue my two-topic attempt to convince you to start a Your Projects thread about this as soon as possible. Wink
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 4
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement