java_grinder for 65816

Programming the 6502 microprocessor and its relatives in assembly and other languages.
resman
Posts: 154
Joined: 12 Dec 2015
Location: Lake Tahoe
Contact:

Re: java_grinder for 65816

Post by resman »

If you're interested in the floating point routines I wrote for VM02, The Apple II Java VM, the opcode implementation is here:

http://vm02.cvs.sourceforge.net/viewvc/ ... iew=markup

Search for FLOATING_POINT. It implements the Java IEEE 32-bit format, but doesn't handle exceptional cases. Good enough for playing around, though.

Dave...
joe7
Posts: 78
Joined: 23 Feb 2014

Re: java_grinder for 65816

Post by joe7 »

Thanks, I'm sure it will come in handy. I haven't tried it but VM02 looks amazing.
joe7
Posts: 78
Joined: 23 Feb 2014

Re: java_grinder for 65816

Post by joe7 »

Worked on the 265SXB API over the weekend. There are routines for printing text, keyboard input, and I/O ports. The demo project (subject to change) currently prints some text and flashes an LED when a button is pressed:

https://github.com/mikeakohn/java_grind ... nkLED.java

Printing signed integers was a challenge. I borrowed an algorithm from a stack overflow answer (lost the link, sorry), which uses repeated subtraction to divide by 10000, 1000, 100, 10, etc. It's still pretty rough, but here it is anyway:

https://github.com/mikeakohn/java_grind ... B.cxx#L155

Edit: found the algorithm:
http://electronics.stackexchange.com/qu ... 2633#12633
Post Reply