You must install .NET or mono
Transpiler is failing, don't use please Transpiler was abolished.
Define data / main section
; comment
#define key = value
#include <math.oba>
#include <stdout.oba>
#include <util/exitcodes.oba>
#include <util/error.oba>
#include <util/version.oba>
#include <util/number.oba>
#include custom.oba
.data:
.text Text data
.text unicode$<FFFD>
.decimal 3.14159265
.boolean 1
.empty
; comment
_name:
; commands...
.main:
mov 0,@
; Get value from data section and put to stack
msg @
; Print the value at the top of the stack
Move data section's data to stack
mov 0,@
; mov pos,@
Move the text value at the top of the stack to data section
movt @,0
; movt @,pos
Move the decimal value at the top of the stack to data section
movd @,0
; movd @,pos
Move the boolean value at the top of the stack to data section
movb @,0
; movb @,pos
Prints the value at the top of the stack without newline
msg @
; msg @
Adds the decimal value at the top of the stack and the decimal value at the 2nd from top of the stack
add @,@
add 0,@
add @,0
add 0,0
; add @,@
; add decimal,@
; add @,decimal
; add decimal,decimal
Subtracts the decimal value at the top of the stack by the decimal value at the 2nd from top of the stack
sub @,@
sub 0,@
sub @,0
sub 0,0
; sub @,@
; sub decimal,@
; sub @,decimal
; sub decimal,decimal
Multiplys the decimal value at the top of the stack and the decimal value at the 2nd from top of the stack
mul @,@
mul 0,@
mul @,0
mul 0,0
; mul @,@
; mul decimal,@
; mul @,decimal
; mul decimal,decimal
Divides the decimal value at the top of the stack by the decimal value at the 2nd from top of the stack
div @,@
div 0,@
div @,0
div 0,0
; div @,@
; div decimal,@
; div @,decimal
; div decimal,decimal
Modulos the decimal value at the top of the stack by the decimal value at the 2nd from top of the stack
mod @,@
mod 0,@
mod @,0
mod 0,0
; mod @,@
; mod decimal,@
; mod @,decimal
; mod decimal,decimal
Calculates AND logic by the boolean value at the top of the stack and the boolean value at the 2nd from top of the stack
and @,@
and 0,@
and @,0
and 0,0
; and @,@
; and boolean,@
; and @,boolean
; and boolean,boolean
Calculates OR logic by the boolean value at the top of the stack and the boolean value at the 2nd from top of the stack
or @,@
or 0,@
or @,0
or 0,0
; or @,@
; or boolean,@
; or @,boolean
; or boolean,boolean
Calculates XOR logic by the boolean value at the top of the stack and the boolean value at the 2nd from top of the stack
xor @,@
xor 0,@
xor @,0
xor 0,0
; xor @,@
; xor boolean,@
; xor @,boolean
; xor boolean,boolean
Calculates NOT logic by the boolean value at the top of the stack
not @
not 0
; not @
; not boolean
Duplicate the value at the top of the stack
dup
Pops the value at the top of the stack
pop
Removes the data section's data
remove @
remove 0
; remove @
; remove decimal(uint)
Exits program
ret
ret @
ret 0
; ret
; ret @
; ret decimal
Jumps to line
jmp @
jmp 0
; jmp @
; jmp decimal
Concatenates the value at the top of the stack and the value at the 2nd from top of the stack
concat @,@
concat 0,@
concat @,0
concat 0,0
; concat @,@
; concat any types,@
; concat @,any types
; concat any types,any types
Emits text by the value at the top of the stack
emit @
emit 0
; emit @
; emit decimal(uint)
Comment
; comment
msg @ ; comment
; ^ error
Multiline comment
/*hello
world*/
/*
hello
world
*/
/*hello world*/
msg @ /*hello
world*/
; ^ error
Do nothing
nop
nop 0
; nop
; nop any types[, any types[, any types[, ...]]]
Push value to the stack by type text
push @
push 0
; push @
; push any types[, any types[, any types[, ...]]]
Get type of the value at the top of the stack
type
; type
Prints carriage return (U+000D)
cr
; cr
Prints line feed (U+000A)
lf
; lf
Define variable
Default variables:
- e
- pi
- local_0 (contains started local time by milliseconds)
- local_1 (contains local time by milliseconds)
- utc_0 (contains started utc time by milliseconds)
- utc_1 (contains utc time by milliseconds)
- license (contains license legal code)
define @,@
define @,0
define 0,@
define 0,0
; define @,@
; define @,decimal
; define decimal,@
; define decimal,decimal
Get value from variable
get @
get 0
; get @
; get decimal
If the boolean value at the top of the stack is 1 then jumps to line
cond @
cond 0
; cond @
; cond decimal(uint)
Compare value
Note: = same content text,same content decimal
returns 1, but == same content text,same content decimal
returns 0
operator @,@
operator @,0
operator 0,@
operator 0,0
; operator @,@
; operator @,decimal
; operator decimal,@
; operator decimal,decimal
Pow value
pow @,@
pow @,0
pow 0,@
pow 0,0
; pow @,@
; pow @,decimal
; pow decimal,@
; pow decimal,decimal
Call section
call @
; call @
Transpiler was abolished.
We write document without write (not supporting in transpile mode)
.
Get length
len @
len 0
; len @
; len decimal
Read one line
read
Read one key
Note: It returns decimal
readk
Read file
fread @
; fread @
Write to file
Note: First argument is for filename, Second argument is for content
fwrite @,@
; fwrite @,@
Define label for comeback
dlabel
; dlabel
Come back to dlabel
comeback
; comeback