JOSH x86 version - JOSH-VM/JOSHVM GitHub Wiki
JOSH could run on x86 arch systems (Linux i386 or Windows x86), for using as emulator or just the starting point of code study.
Linux i386: (Tested on Ubuntu 16.04LTS)
sudo apt-get update
sudo apt-get install gcc binutils build-essential g++ libc6 libc6-dev gcc-multilib g++-multilib
sudo apt install openjdk-8-jdk-headless
git clone https://github.com/JOSH-VM/JOSHVM.git
cd JOSHVM
chmod a+x ./build-linux-i386-cldc.sh
./build-linux-i386-cldc.sh -C -J ${YOUR_JDK_DIR}
YOUR_JDK_DIR is JDK installing path on your machine, in my case it's /usr/lib/jvm/java-8-openjdk-amd64. Not tested building with JDK version > 1.9, always use 1.8 or early JDK version to build JOSH.
After building, try helloworld demo in test directory:
cd test/helloworld
JDK_DIR=${YOUR_JDK_DIR} make
JDK_DIR=${YOUR_JDK_DIR} make run
Again, YOUR_JDK_DIR is JDK installing path on your machine.
Expected result:
HelloWorld from TEST begin
Hello, IOT world!6* 2^3 = 48
Hello, IOT world!5* 2^3 = 40
Hello, IOT world!4* 2^3 = 32
Hello, IOT world!3* 2^3 = 24
Hello, IOT world!2* 2^3 = 16
Hello, IOT world!1* 2^3 = 8
Hello, IOT world!0* 2^3 = 0
Waiting for 5 seconds...
Hello again
Waiting for 5 seconds...
Done!