> > >
> > > Anyone tried writing a CPU core in Jasmin? http://mrl.nyu.edu/~meyer/jasmin/
> > >
> > > Looks possibly interesting - I wonder if there is anything you can do in
> > Jasmin
> > > you can't in normal Java (in analogy between C and machine code)
> > >
> > I've written some javavm asm before (we had to do for a uni project). There
> > quite a few things that are much easier to do in javavm asm than actual java,
> > however there are a couple of minor things to consider.
> > 1) Programming stack machines sucks
> > 2) Nowadays most java VMs basically decompile the java bytecode back to
> > so they can do wizzy recompiling, so I'm not sure how much it would help to
> > write things in java asm.
> depends i guess - do you reckon you could do an opcode jump table or something
> in Java Asm?
> Or in MSIL?
> to tighten up the execute loop maybe?
If you write an ordered switch/case, it will compile to a jump table.
I don't think writing java asm will really help since the VM will do all sorts of recompiling and optimizing on the fly so that the executed code probably looks nothing like the original bytecode anymore. I could even imagine that if you write java asm, you could give the VM a hard time doing that; I suppose the VM recognizes some typical javac output.
The thing that *really* pissis me off with java when it comes to emulator programming is the lack of unsigned data types.