initial commit

This commit is contained in:
Christoph J. Scherr 2023-12-10 14:00:11 +01:00
commit 84812d7664
3 changed files with 29 additions and 0 deletions

BIN
bin/Hello.class Normal file

Binary file not shown.

12
build.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
set -e
if [ -z "$1" ]
then
echo "specify the project name to build"
else
jasmin -d bin src/$1.jas
ls -lah bin/$1.class
echo -e "executing ================================================\n"
cd bin
java $1
fi

17
src/Hello.jas Normal file
View File

@ -0,0 +1,17 @@
.class public Hello
.super java/lang/Object
.method public <init>()V
aload 0
invokenonvirtual java/lang/Object/<init>()V
return
.end method
.method public static main([Ljava/lang/String;)V
.limit locals 1
.limit stack 2
getstatic java/lang/System/out Ljava/io/PrintStream;
ldc "Hello World!"
invokevirtual java/io/PrintStream/println(Ljava/lang/String;)V
return
.end method