Since Nebassembly is a JSON based language, your program needs to have a proper structure.
The Data section contains program metadata such as Copyright.
Human readable copyright
The application icon written in NBGF
Whether it is an executable or a library
Can be either "standalone" or "library"
"data": {
"EXE_TYPE": "standalone",
"nbgf": [],
"copyright": "© Annes Widow & Contributors - 2026 - Paint"
}
This section is where the functions of your program are.
To create a function, simply create a dictionary key with the name of your function.
Note: the "main" function is your program's entrypoint.
"text": {
"draw": [
{"cal": ["_clearbg", 0, 0, 0, 255]}
],
"main": [
{"cal": ["_setupdrawbuffer", 400, 300]},
{"cal": ["_setloop", "_DRAWLOOP", "draw"]},
{"mov": ["_NEBWIN", true]},
{"mov": ["_WINTITLE", "Paint"]}
]
}
the mov istruction moves a value into an address. Can be used to make variables or modify NebulaOS values
Syntax: {"mov" : ["address", value]}
This sets up the draw buffer that will be shown in the program window
Set a loop so that when it is called, FUNCNAME is called.
Draw circle in selected framebuffer
Draw Rectangle in selected framebuffer
fill the selected framebuffer with a color
Run LOOP
Get the length of a list, or other iterable
Return true if the rectangles are colliding
Return a random number between MIN and MAX
Return OBJ converted to an integer
Return OBJ converted to a string
Get contents of a virtual file
Get final extension of a virtual file
Get final name of a virtual file