AAA is a new tool of assembling based on two different languages. The first is LOBA and is a low level assembly-like language. The second, HILA, is a high level language that include features as classes, objects, functions, and so on. I trough to write my operating system with C++ and assembly, but there were lots of problems, strange optimizations and limits I don't like. So I decide to write my own assembly assembler and include some of the more powerful features of structured languages and OOP.
The good thing is that AAA is more simple of Assembly to debug and more aderent to the real code than C++. AAA uses a run time control that allow you to change the type of a variable or the istructions of a function in a very easy way. Everything is defined with a table, this is a not complete struct of a var.
Code: Select all
struct AAA_var{
uint32 id;
uint32 type;
uint32 address;
uint8 var_const:1;
uint8 public_private:1;
uint8 local_far:1;
uint8 reserved:4;
uint8 nameLen;
}
Debugging is very easy here, you can ask that every access to this var must be mapped. As I have already said using this struct a var can change the memory location and the type.
In the future AAA will make metaprogramming easy. A greedy algorithm could find better greedy algorithm and change itself with other to be more fast. It is just a stupid exampla but I think is interesting
The high level language will make source shorter and easier, without strange optimizations. AAA will make what you want.
AAA it's not opensource, not yet. Perhaps in the future. Now it's just free XD
Code: Select all
@@@ This line is a remark and is jumped when this source is compiled
@@@ Now starts the section of preprocessor directives
@set arch 8086
@set mode real
@set lSet HILA
@set org auto
@set entry main
;This is a NASM-like remark. Now I include system libs
@require_once system.aaa
function main(#String, Number(++32.0))(Number(++8.0))
var args As arg(0) ;Declare a matrix taking the first argument as reference
var argc As arg(1) ;Declare a matrix taking the second argument as reference
var retV As ret(0) ;Declare a matrix taking the first returned value as reference
call alert(string(Hello world!))()
end
This is a sample of a source that write a white message on my os
(Please say me ideas about the design of the language itself)