A furry-themed assembly language and interpreter written in Kotlin.

Overview

FurASM

License Version

A furry-themed assembly language and interpreter written in Kotlin.

Inspired by Furcode, the Synacor challenge, and JVM bytecode.

I spent multiple hours on this. Dear god help me...

Logo Assets

Title From Link
Fox Vector Vecteezy https://www.vecteezy.com/vector-art/95451-free-fox-silhouette-vector
Public Sans The U.S. Government https://public-sans.digital.gov

Interpreter Guide

This implementation of the FurASM interpreter contains a scripts folder which you can use to test out the language via pre-written FurASM scripts.

Running the interpreter on one or more files
furasm "scripts/HelloWorld.fur" "scripts/Math.fur"

Language Guide

Program Quickstart

  1. Create a new file ending with '.fur'
  2. Write your script.
  3. Run it with the interpreter (view interpreter guide above for more information).

Instructions

Each program contains a set of instructions. These instructions perform different actions.
Instructions can be written like so: <opcode> <arguments>

Example: pet OWO 5 Set the MEW register to 5.

View the opcode listing near the bottom for more information on the different types of instructions.

Comments

Comments are lines that are skipped by the interpreter.
They are useful for documenting your code.

  • In an empty line:      ; My comment
  • After an instruction: pet MEW 10; My comment

Macros

Macros are instructions that create other instructions, they are used to reduce the amount of lines in a script, while also having the same amount of instructions as a script without said lines.

They always start with @, and can take a type-less value with =.

Example: @print = OwO, What's This? Print "OwO, What's This?" to the console.

To-Be-Implemented

  • Labels, label an instruction to give it a pounce-able name (alias for instruction pointers)
  • Constants, use string literals as a shortcut for mass-petting (alias for per-character petting)
    • Implemented as macros.
  • BEP Meta-Register, the value of it is always the current instruction pointer
  • Instruction modification instructions.

Specification

Language

Syntax

  • An instruction starts with an opcode, followed by the instruction's arguments.
  • A newline signals an instruction's ending.
  • Comments come after a semicolon at the end of a line.
  • Int literals cannot contain any spaces in them.
  • Macros start with a '@', and are followed by their names.
  • Macro values (optional) start with '=' and are followed by literally anything.
  • Macro names and values are trimmed for whitespace before and after their text values.

Semantics

  • A program starts at the first instruction (index 0); however, jumps are 1-indexed.
  • All numbers are 32-bit integers. (-2147483647 -> 2147483647)
  • Registers can be used as arguments, and if so, their value will be set/gotten.
  • Opcodes and register IDs are not case-sensitive.
  • The only other valid value are int literals.
  • Registers are initialized at 0.
  • Macros can contain any value and are processed individually.

Conventions

This serves as the official style guide for FurASM scripts.

  • A FurASM file ends with '.fur'
  • Opcodes should be in lowercase.
  • Register IDs should be in uppercase.
  • There should be a single space on each side of the '=' in a macro.

Features

Opcodes

Opcodes are the names of instructions.

0.  pet = Set register to value.
1.  paw = Add a register and a value together.
2.  bop = Subtract a register and a value.
3.  lik = Multiply a register with a value.
4.  kis = Divide a register with a value.
5.  bte = Get the remainder of a register and a value.
6.  cyt = Set register to 0 if value 1 is greater than value 2.
7.  wag = Set register to 0 if value 1 is equal to value 2.
8.  pnc = Jump to instruction and push the pointer of the next instruction to stack.
9.  wig = Jump to instruction.
10. nuz = Pop stack and set current pointer to returned pointer.
11. pat = Skip next instruction if register is 0.
12. yif = Terminate the program.

Macros

Macros are interpreter metadata for condensing multiple, usually tedious, instructions down into one line.

@print - Print a series of characters to the terminal via 'pet MEW'.

Storage

Stack

The stack in an interpreter stores the memory addresses for the next instruction after a 'pnc' instruction so that it may be returned to via 'nuz', this allows for subroutines (low-level functions).

'wig' does not store a memory address as it is used for infinite loops, which may cause a stack overflow.

Registers

  1. OWO
  2. UWU
  3. ONO
  4. UNU

Meta-Registers

Meta-registers are registers that do not store a value and instead have a special effect when retrieving/storing a value.

MEW Meta-Register

  • When setting the value of this register, it outputs the ASCII representation of the value to the terminal.
  • When using this register as an argument, it requests an optional number from the terminal.

DMW (Direct MEW) Meta-Register

  • When setting the value of this register, it outputs the value to the terminal.
  • When using this register as an argument, it requests a required number from the terminal.
You might also like...
📚  Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.
📚 Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Components Architecture in a Modular Word Android Components Architecture in a Modular Word is a sample project that presents modern, 2020 app

🚀 Sample Android Clean Architecture on JetRorty App focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack with Compose.
🚀 Sample Android Clean Architecture on JetRorty App focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack with Compose.

Android Clean Architecture in Rorty is a sample project that presents modern, approach to Android application development using Kotlin and latest tech-stack.

Android To-Do MVVM Architecture App written in Kotlin.(ViewModel, ROOM, Livedata, Coroutines)

MVVM-To-Do-App A To-Do application written in kotlin using Android Architectural components What's new? Room + Coroutines - Upgraded Room to v2.1. Roo

An extension of EditText with pin style written in Kotlin
An extension of EditText with pin style written in Kotlin

pin-edittext An extension of EditText with pin style Usage Include PinCodeEditText in your layout XML com.oakkub.android.PinEditText android:layo

A lightweight cache library written in Kotlin

[NEW] Released to Maven Central: 'com.github.yundom:kache:1.x.x' Kache A runtime in-memory cache. Installation Put this in your build.gradle implemen

Android AsyncTask wrapper library, written in Kotlin

KillerTask This is a Kotlin Android library to create async background tasks. Inspired by TinyTask, but more beautiful and easy to use for Kotlin Andr

Advancement Utils for Android Developer written in Kotlin
Advancement Utils for Android Developer written in Kotlin

RichUtils About Version: 2.0.0 :: Dreaming Bird (夢魅鳥, Yumemidori) :: Release Note (Eng) : https://blog.uzuki.live/richutils-2-0-0-dreaming-bird-releas

A simple 'Slide to Unlock' Material widget for Android, written in Kotlin 📱🎨🦄
A simple 'Slide to Unlock' Material widget for Android, written in Kotlin 📱🎨🦄

Slide To Act A simple Slide to Unlock Material widget for Android, written in Kotlin 🇰. Getting Started Example Features Attributes area_margin inner

Mobile client for official Nextcloud News App written as Kotlin Multiplatform Project
Mobile client for official Nextcloud News App written as Kotlin Multiplatform Project

Newsout Android and iOS mobile client for Nextcloud news App. The Android client is already available to download in the Play Store. F-Droid and Apple

Releases(1.1.1)
Owner
Maow
My 100th repository will always be FurASM.
Maow
LifecycleMvp 1.2 0.0 Kotlin is MVP architecture implementation with Android Architecture Components and Kotlin language features

MinSDK 14+ Download Gradle Add to project level build.gradle allprojects { repositories { ... maven { url 'https://jitpack.io' }

Robert 20 Nov 9, 2021
ATH Sample is a sample Authentication and Authorization Application with Kotlin Language and MVVM architecture.

ATH Sample ATH Sample is a sample Authentication and Authorization Application with Kotlin Language and MVVM architecture. Overview ATH Sample is a sa

AbolfaZl RezaEi 4 Jun 8, 2021
Kotlin DALL·E 2 is a new AI system that can create realistic images and art from a description in natural language.

OpenAI Dall•E AI Kotlin Mobile App OpenAI Dall•E Application Build With Kotlin MVVM (Model - View - ViewModel) Clean Architecture, Beautiful Design UI

Murat ÖZTÜRK 15 Jan 1, 2023
An example for who are all going to start learning Kotlin programming language to develop Android application.

Kotlin Example Here is an example for who are all going to start learning Kotlin programming language to develop Android application. First check this

Prabhakar Thota 56 Sep 16, 2022
An under development minecraft plugin (1.8.8) to learning Kotlin language

CorePlus CorePlus is a minecraft plugin coded with Kotlin language. Still under development CorePlus will be an essential for each minecraft servers !

Gonz 3 Jun 16, 2021
Lambda-snake.kt - Snake Game Implementation for Web using Kotlin programming language compiled for Javascript

Projeto da disciplina de Linguagem de Programação Funcional 2021.1 (jan/2022) ??

Alex Candido 3 Jan 10, 2022
FaceTimeClone app that implements Coroutines , mvvm architecture , clean architecture , navigation component , hilt , etc.... using kotlin language

This repository contains a FaceTimeClone app that implements Coroutines , mvvm architecture , clean architecture , navigation component , hilt , etc.... using kotlin language

null 17 Dec 13, 2022
Metremenqeemi - Android/iOS app to teach the Coptic Language

ⲙⲉⲧⲣⲉⲙⲛ̀ⲭⲏⲙⲓ The Open Source Android/iOS app to learn how to read and understand the Coptic Language Join our Discord Channel About the Curriculum The

Mark Yacoub 8 Aug 30, 2022
fusion4j - declarative rendering language for the JVM based on Neos.Fusion

fusion4j - declarative rendering language for the JVM based on Neos.Fusion Supports the Neos Fusion syntax/semantic as described in the official Neos

sandstorm 2 May 3, 2022
RoomJetpackCompose is an app written in Kotlin and shows a simple solution to perform CRUD operations in the Room database using Kotlin Flow in clean architecture.

RoomJetpackCompose is an app written in Kotlin and shows a simple solution to perform CRUD operations in the Room database using Kotlin Flow in clean architecture.

Alex 27 Jan 1, 2023