- Is a language to define the list of instruction. It is extendable, but not dedicated to any platform
- Is a language that similar to
LISP
, the way it describe the code and operators through syntax- It is compact to read. Trailing tab/space is optional. Syntax is limited to ASCII, even better, it is only
[a-zA-Z0-9.\s]
- It's design is not intended for automatic/smart expression parsing.
- It is a scalar, but neat to see that any object is statically typed, allocated and limbo between manual and automated memory management. Worse: it ignore any stack dead, because it is synchronous by the design
- Define a number, then the binary, so it is the ROM
FISL
aim is to make a 1-dimension memory allocated in a "make sense" way.
Without further explain, move to the first ever example for a clear view.
fn fibonacci n
stack
stack
stack
.n
.1
call le
call if
.n
else
stack
stack
.n
call fibonacci
stack
stack
.n
2
call sub
call fibonacci
call add
return
It is obviously too flat, at it is, so lets add some trailing tab to demonstrate the way it work.
fn fibonacci n
stack
stack
stack
.n
.1
call le
call if
.n
else
stack
stack
.n
call fibonacci
stack
stack
.n
2
call sub
call fibonacci
call plus
return
as it equivalent to this piece of code in C
unsigned int fibonacci(unsigned int n) {
return (n <= 1) ? n : fibonacci(n) + fibonacci(n - 2);
}
Struct is the most important feature in all language. (Un)Fortunately, FISL
is an assembly-kind language, there is no gun-foot-proof.
struct VecD {
int a;
int b;
}
struct VecD v = {0xAB, 0xCD}; //important part
stack
.171
.205
ref v
In our FISL
code, v is a reference/pointer to our heap (the size in memory is static, maybe generated upon compilation). Basically, if the code somewhere, refer to the stack definition, it will set the size for it automatically.
FISL
stack, is a memory structure to store one or many value, with fixed size allocation
When you define a stack, the function of its instruction must allocate the memory piece on its own segment.
Here is our memory, for a program that create a stack of 1 bit during runtime (casually 1 byte on a normal scenario)
fn a
stack
.0b1
ref a
## breakpoint
fn b
stack
.0b01
ref b
call a
# |0|1|1
# | | a's memory
# |___ b's memory
Function heap is died once the function is done. So threadding task must use it own heap.
Copy copy copy. We might even have buffer for that. A guarantee that:
- Function allocation always larger than its own return value.
- Its value is not a pointer How
- Just push the value inward (by default)
- Or keep anything (fake that value is size-padded)
--Dewp
(end with pad)
what else it could be, obviously a fixed array. It is also a stack. what we need is a way to allocate it more convenient and sizewise, and read it.
stack ## bake 8 * 12
# bake it just compile time evaluator (math only maybe)
ref a
read it
stack
.a
.5
.8
call se # seg is an operator lmfao
stack
.a
call si
- function is a list of instruction
- heap is a dynamic size, bytewise, 1 dimension array.
- stack is a memory allocated structure. It is rather a memory definition and compactor than a real structure to programming.
- ref is a memory address to stack heap. while stack is not represent a value in that allocation, even another stack store is as memory, low level function, and the processor itself should resolve it on run (more segfault risk).
- so afterall, everything is a stack, a sized allocation in memory, its instance or reference anywhere else is a reference "pointer"
fn
: define the functionstack
(stackdef
): start define the stackref
: stop define the stackcall
: isref
, then invoke a call to a function with that stack reference. The return value will be put in currentstackdef
fi
: is a control flow that is stopping currentif not
fast-forward without extra operation?else
:call if
with reusednot
stack (must callfi
first)
or
: (Incremental 0cf)and
if
: ?eq
: Equalse
: Stack segmentationxo
: XORsl
/sr
: Shift left/rightmk
: Mask
ne
: Not equalgr
/ge
: Greater/Greater or equalls/le
: Less/Less or equalsi
: Stack size
pow
: Powersrt
: Square root2
nst
: Square rootn
cei
: Ceilflo
: Floorclp
: Clamp[a](sin|cos|tan|cot)
: Geometry thing
c
: 8s
: 16i
: 32l
: 64u(c|s|i|l)
: as(c|s|i|l)
interpreted as unsignedsx
: asui
(system type for size)