Description

ESETv2 is an intriguing challenge developed by ESET, available on their website under the "Challenge" menu. The challenge involves an "assembly-like" language and a Python compiler that generates .evm binary files.

This is an example using one of their samples (it prints N Fibonacci numbers):

.dataSize 0
.code

loadConst 0, r1 # first
loadConst 1, r2 # second

loadConst 1, r14 # loop helper

consoleRead r3

loop:
    jumpEqual end, r3, r15

    add r1, r2, r4
    mov r2, r1
    mov r4, r2

    consoleWrite r1

    sub r3, r14, r3
    jump loop
end:
hlt

This language also supports multi-threading. It includes instructions such as createThread to start a new thread, joinThread to wait until a thread completes, and lock/unlock to facilitate synchronization between threads.

Goals

  • create a full interpreter able to run all the available samples provided by ESET.
  • improve / optimize memory (eg. using bitfields where needed as well as avoid unnecessary memory allocations)

Resources

Achivements

Project still not complete. Added lock / unlock instruction implementation but further debug is needed; there is a bug somewhere. Actually the code it works for almost all the examples in the samples folder. 1 of them is not yet runnable (due to a missing "write" opcode implementation), another will cause the bug to show up; still not investigated, anyhow.

Looking for hackers with the skills:

emulator interpreter c

This project is part of:

Hack Week 24

Activity

  • 6 months ago: m.crivellari added keyword "c" to this project.
  • 6 months ago: epaolantonio liked this project.
  • 6 months ago: m.crivellari started this project.
  • 6 months ago: m.crivellari added keyword "emulator" to this project.
  • 6 months ago: m.crivellari added keyword "interpreter" to this project.
  • 6 months ago: m.crivellari originated this project.

  • Comments

    Be the first to comment!

    Similar Projects

    This project is one of its kind!