Giter Club home page Giter Club logo

custom-assembly-like-language's Introduction

Armtal (A custom assembly like language.)

Note that this is not the final version, this is just V1.

How to write a script

Making a script

Make a new file and end it with .armt. Go in the config.json and change the script variable's value to the name of your script.

Running a script

If you wrote a script, just run the compiler script and it will run.


Instaling or writing a library

Writing a library

Make a python script and create all your functions. Make a dictionary called Cmds. The name of each element is what you want it to be in the script. The value should be a list. The first thing in the list is the function. The second thing is how many arguments your command takes.

Installing a library

It is very easy. Just put the python file in the same folder as the compiler. Go into the config.json file and add the name of it to the libraries list.

Program examples

Hello World

# There are two methods of doing this in Armtal
# First
out str Hello,world!
# Spaces are not allowed when outputting a string
# Second
hello

Counting

# This program counts up
add 1
out sys int
jmp 1

All Commands

out r s

If r is str then it will output s to the console. if r is sys and s is int/acc it will output the value of that register.

var r s

Sets the register of r with the value of s.

add/mul/sub/div n

Does the action you chose with int and n

if a r b l

If a r (for example ==) b, run line l

nex

Don't run the next line

jmp l

Jumps to line l

wait n

Waits for n seconds

noop

Does nothing

#

A comment (doesn't do anything)

custom-assembly-like-language's People

Contributors

retrocoder6504 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

tomvdb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.