34
Awk-JVM is a toy JVM in Awk
source link: https://github.com/rethab/awk-jvm
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
awk-jvm
a toy jvm in awk, based on this tutorial: https://zserge.com/posts/jvm/
notes
-
this requires gawk, because of functions and the builtin
strtonum
-
since none of the awks can read binary, you first need to pipe the classfile through hexdump
-
example (see run.sh):
javac Add.java && hexdump -v -e '/1 "%01u "' Add.class | awk -f jvm.awk
-
example (see run.sh):
what can it do?
- not a lot (eg. call methods and basic operations, see Add.java)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK