Started AAA developemnt

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
User avatar
Karlosoft
Member
Member
Posts: 277
Joined: Thu Feb 14, 2008 10:46 am
Location: Italy
Contact:

Started AAA developemnt

Post by Karlosoft »

Hi! I'm publishing the first parts of my new project, AAA, a new assembler with lots of features. The assembler is going to be released, so I would test its components before the first release. The reference website is http://pikkolamakkia.com/AAA/index.php?page=download . Only AAASearch is down-loadable but I will soon add the docs and the other components.

AAA is still in development, I give no warrant and any support for trouble. If you find bugs or missing things (this is sure), please write here a report (I'm adding this function on the pages)

PS. My English is far to be readable :) Please report the language mistakes too :D
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: Started AAA developemnt

Post by earlz »

Karlosoft wrote:Hi! I'm publishing the first parts of my new project, AAA, a new assembler with lots of features. The assembler is going to be released, so I would test its components before the first release. The reference website is http://pikkolamakkia.com/AAA/index.php?page=download . Only AAASearch is down-loadable but I will soon add the docs and the other components.

AAA is still in development, I give no warrant and any support for trouble. If you find bugs or missing things (this is sure), please write here a report (I'm adding this function on the pages)

PS. My English is far to be readable :) Please report the language mistakes too :D
I'm having trouble exactly what this is. How is AAA better than existing assemblers? Is it open source?
User avatar
Karlosoft
Member
Member
Posts: 277
Joined: Thu Feb 14, 2008 10:46 am
Location: Italy
Contact:

Re: Started AAA developemnt

Post by Karlosoft »

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)
User avatar
Karlosoft
Member
Member
Posts: 277
Joined: Thu Feb 14, 2008 10:46 am
Location: Italy
Contact:

Re: Started AAA developemnt

Post by Karlosoft »

Hi!, I've update now the new version of AAASearch and the first public release of AAAOptimizer. Please, could someone compile it for linux? My eeepc with ubuntu is broken :(

http://pikkolamakkia.com/AAA/index.php?page=download

(Yeah my coding style is very ungly ;))
Attachments
rewrite.cpp
My AAASearch source
(31.44 KiB) Downloaded 118 times
Last edited by Karlosoft on Wed Jan 06, 2010 5:02 am, edited 1 time in total.
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Re: Started AAA developemnt

Post by AndrewAPrice »

It compiles successfully (though with a warning) on Windows under Visual Studio 2008:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 80x86 wrote:main.cpp(132) : warning C4715: 'reg' : not all control paths return a value
There could be a possible bug if a value is passed to reg that is not handled by the switch.
My OS is Perception.
User avatar
Karlosoft
Member
Member
Posts: 277
Joined: Thu Feb 14, 2008 10:46 am
Location: Italy
Contact:

Re: Started AAA developemnt

Post by Karlosoft »

First reported bug has been solved :) Now reg return -1 if reg isn't a reg and the program is closed with a error string on the screen ;) (I will update the source in the next hours)
I'm going to add this code in assembler so it will be able to assemble the first source without labels :)
User avatar
Karlosoft
Member
Member
Posts: 277
Joined: Thu Feb 14, 2008 10:46 am
Location: Italy
Contact:

Preprocessor directives

Post by Karlosoft »

Hi! AAA is stil alive :)
In these days I'm working on the HILA, it mean the high level language that is combined with traditional assembly. The HILA compiler is just a converter, wich transforms your code in LOBA. By the time it's not complete, I'm going to add the variables, blocks and the functions support, than classes, cycles and conditions. I just want to discuss with you about this syntax draft. So you can know what I'm thinking and find features to add or improve.

Preprocessor directives
AAA has a common preprocessor for HILA and LOBA. All the instructions start with a @ char and and in the line itself. Only one of these is inline, the data exchanging. I will explain this in the next paragraph. The most important instruction is set that allow you to change the compiler variables, and to add new. arch, mode, org, entry are reserved names. All the other strings are good personalized variables (the name should NOT have '\n', 't', 0 and ' ' chars.)

@set arch 8086
@set mode real
@set org 0x7c00
@set entry main


These lines force the compiler to use the 8086 opcode map in real mode. The first instruction is loaded in 0x7c00 memory location and the entry point of the program is main function. You can declare up to 256 different variables. Use one is really easy. You have just to write @@labelOfVar@@ where you want.

Require and its variant require_once are the next directives. They allow you to load a source, a resource file or a memory dump.

@set arch 8086
@require vesaScreen.aaa
@require_once apic.aaa
@require image.bmp
@require RAMDump(7c00 9000)


The last preprocessor instruction (by now) is @@@, the preprocessor remark. It's simply jumped :)


_____________________________________________________________________________________
I'll as soon as possible add the variables syntax. :)
User avatar
Karlosoft
Member
Member
Posts: 277
Joined: Thu Feb 14, 2008 10:46 am
Location: Italy
Contact:

Re: Started AAA developemnt

Post by Karlosoft »

Hi! Just a link http://pikkolamakkia.altervista.org/AAA/guide/en/
The guide of the language is being written step by step while I'm writing the parser.
Please report here mistakes, and ideas.

Soon, the first public release.
Post Reply