Skip to content
ArkoSammy12Public

About

An implementation of the CHIP-8 Octo assembler written in Java

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

89 Commits

Folders and files

Repository files navigation

jocto

An implementation of the CHIP-8 Octo assembler written in Java

Command-line Usage

Make sure to have a Java Development Kit (JDK) targeting Java 25 or later to run the built .jar file.

You can run the assembler with the java -jar jocto-x.y.z.jar <args> command. It is recommended to alias the JVM -jar invocation.

The CLI options are as follows:

Usage: jocto [-hV] -i=<inputPath> [-o=<outputPath>]
Assembles the provided .8o source file
  -h, --help                Show this help message and exit.
  -i, --input=<inputPath>   The path of the .8o source file to assemble
  -o, --output=<outputPath> The path of the assembled binary file, or input.out.
                              ch8
  -V, --version             Print version information and exit.

Building

jocto is written in Java 25, so a Java Development Kit (JDK) targeting Java 25 or later to build this project.

Maven is used as the build and dependency management solution, though a wrapper is provided to avoid a local installation. To build the project, clone or download the repository and run the following from the top-level directory:

Windows

.\mvnw clean package

macOS/Linux

./mvnw clean package

An output .jar should have then been generated in /target/jocto-x.y.z.jar. To skip the automated tests, append the -DskipTests to the build command.

Notes

The implementation of this assembler is largely based on the c-octo implementation of the Octo language by John Earnest. Most semantics for directive arguments should follow that implementation.

All debug directives (:breakpoint, :monitor, :assert) are parsed for correct arguments but they are not currently exposed as an API, and therefore do nothing. The :monitor directive is parsed for correct arguments, but the format string is not yet verified. jocto will ignore incorrect usage of or unknown format specifiers within the format string and not produce an assembler error.

jocto runs the c-octo-tests test suite in chiplet's repository, which includes chiplet specific tests and c-octo's own tests. A list of current failures can be found in the expected-failures.txt file.

References

About

An implementation of the CHIP-8 Octo assembler written in Java

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages