A small compiled programming language similar to C.
import Stdio
function _start() {
println("hi", 2)
SYS::EXIT
}
SYS::DATA
Assembly can be embedded directly into the language (Working to add features so you wouldnt need to use assembly)
Exits program
Data section of the program, where you define variables, working on those too, soon to be “var name = db “value”
Constants are defined with “equ”
function name(p1, p2, p3) {
pop $reg1 // return line
pop $reg2 // param 3
pop $reg3 // param 2
pop $reg4 // param 1
// run code
push $reg1 // return line
}
name(p1, p2, p3)
If import is not included in my standard imports, then it will look around for an external import file
import Stdio // imports println() and input()
println(msg, msgLength)
input() // pushes output/response to stack
import Stdlib // imports Sys aliases and ifEqu()
SYS_EXIT // 1
SYS_READ // 3
SYS_WRITE // 4
STDIN // 0
STDOUT // 1
ifEqu(1, 2, function) // (Value, Value, function pointer) Does not call function
ifEqu(1, 1, function) // calls function
strlen("string") // returns length of string (6, in this case)
index.rit:
import external.rit // imports external .rit file (just takes contents of file, no "module.exports" or "require" statements)
import external.asm // imports external .asm file (same as above^^)
external.rit:
// No import Stdio needed, because it was included in the index.rit file, just make sure you import Stdio before importing external.rit
function external_function() {
println("Hello World!", 12)
ret
}
declare variables with the “var” keyword
var ${size} ${name} = ${value}
b = byte
var b x = "hi"
println([x], 2)
See also the list of contributors who participated in this project.
MIT License © Amukh1