Skip to content

sevonj/ttktk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TTKTK - TTK-91 ToolKit

CI

This Rust package provides tools for meddling with TTK-91 code. This is part of TiToMachine project.

Binaries:

  • titoasm - Assemble .k91 files to .b91

Library:

  • libttktk::compiler - Assembler backend for titoasm and titomachine
  • libttktk::disassembler - Disassembler
  • libttktk::instructions - Instruction struct and related enums.
  • libttktk::b91 - Parse .b91 contents.

Additions and differences to Titokone

(see: Titokone)

  • Supports expressing values in bin, oct, and hex.
  • Supports expressing values as unsigned.
  • Symbols are case sensitive.
  • Supports TiToMachine extended spec, but should be fully backwards compatible.

Usage

img.png

   titoasm --help
   titoasm file.k91
   titoasm file.k91 -o outputfile.b91

Use libttktk in rust code

Cargo.toml:

    [dependencies]

    # ...
    
    ttktk = { git = "https://github.com/sevonj/ttktk.git", tag = "v0.3.0" }
    use libttktk::compiler::compile;

    // ...

    let result = compile(source);

Building

You need Rust.

Shell examples:

    cargo build
    cargo test
    cargo run -- file.k91 -o outputfile.b91