The Solar Assembler


The Solar Assembler (SolAsm as a friendly name) is a multipass, high level, macro assembler that can compile 16/32/64 bits code and runs on Windows, Linux, MacOS and Solar_OS. The Solar Assembler is programmed by Bogdan Valentin Ontanu and it is still under development, so it is not complete. Please carefully read the Solar Assembler manual and the REMARKS section at the end of this page in order to get familiar with its syntax and avoid annoying errors at compile time.

Easy Code versions 2.02.0.0003 and later also support the SolAsm assembler, however you must take into account that some projects cannot currently be built with SolAsm because it is under development, so up to version 0.36.62 (included) the following projects can NOT be built:

NT Drivers 32-bit and 64-bit
Static libraries 32-bit and 64-bit

In order to maintain the same basic folder structure of the other supported assemblers, I suggest to create a folder named SolAsm in the root of one of your hard drives (any other than the system drive C:, if possible). Then create one subfolder named Bin and another one named Help inside the SolAsm folder you just created (these are the two needed subfolders but you can create more subfolders if you like):

    SolAsm

Bin
Help
Now download the latest version of the Solar Assembler Binary here and once unzipped locate the sol_asm2.exe file and copy it to the \SolAsm\Bin subfolder just created. Then download the sol_asm_manual.htm page and copy it to the \SolAsm\Help subfolder juts created:

    SolAsm
Bin
sol_asm2.exe
Help
Solar Assembler Manual.htm

Since Easy Code (for 64-bit projects) and the MASM32 SDK (for 32-bit projects) provide the necessary include and library files, you do not need anything else. Take into account that the MASM32 SDK is only needed if you plan to build 32-bit visual projects, otherwise you do not need to install it.

After downloading the latest version of Easy Code, run it, go to the Tools-->Settings menu, click the Configurations tab, select the SolAsm item in the Configuration combo box and carefully follow the instructions of the Settings menu - Configuring Easy Code topic. Then repeat the same steps but selecting the SolAsm64 item in the Configuration combo box. Please see also the comments related to SOLASM in IMPORTANT REMARKS.

REMARK: Everything will work fine if all settings are well configured, so please take your time to carefully read the Configurations tab, in order to avoid further problems.

The SolAsm is a good assembler but, as said before, it is under development, so for more information or for reporting errors fired by SolAsm, that is, not related to Easy Code, please contact the author Bogdan Valentin Ontanu.

Those projects that SolAsm cannot build itself (NT drivers 32-bit/64-bit and static libraries 32-bit/64-bit), could be manually built by compiling the code with SolAsm and using an external linker for drivers, and a library compiler for static libraries, but you need to know how to do that. On the other hand, the capability of SolAsm for building NT drivers in the future will be determined by the author.

The SolAsm has its own resource compiler, but at the time of this writing it can only create the following resources:

- Dialog boxes
- Controls
- Menus
REMARK: This applies to all project type except to visual projects, which have all resources available because they use an external resource compiler (usually the Microsoft rc.exe). On the other hand, dialog boxes do not accept, neither CLASS (class name), nor FONT (font parameters), nor EXSTYLE (extended styles) keywords.

The SolAsm resources can be manually added by following the syntax specified in the SolAsm manual (Chapter 8. Internal Resource compiler), but they can also be added in a more comfortable and easy way in the Resource Editor (recommended). That way Easy Code will create a resource file with "rc" extension in the project folder and it will take care of all work. Please see the Classic example located at the \EasyCode\Examples\SolAsm\x86\Classic folder. In this example you will see how to create and set a menu and show up a dialog box. Besides, you will also see how a font resource must be manually created because, as said before, the FONT keyword for dialog boxes is not accepted by the SolAsm resource compiler.

WARNING: Menu resources must be loaded with the LoadMenuIndirect API function, while dialog box resources must be loaded with the DialogBoxIndirectParam API function (please see the Classic example).


REMARKS: As said before the Solar Assembler is under development, so it has some issues to be fixed (be carefull with spaces):

MAX_PATH + 1      WRONG, it fires an error
MAX_PATH+1        GOOD,    no error is fired
When intializing structures:
{10 0 40 20 60}      WRONG, it fires an error
{ 10 0 40 20 60 }    GOOD,    no error is fired
Another issue affecting mainly to visual projects is that the extern directive DOES NOT work for extern variables (it DOES work for extern procedures). That means that you cannot reference a variable in a window or module if the referenced variable is in anothermodule.

The Classic example mentioned above is only available for 32-bit since it does not work for 64-bit due to a SolAsm bug affecting the dialog box procedure (the dialog box is shown, but you have no control over it). As a result, and until this bug is solved, dialog boxes cannot be used in 64-bit projects, except in visual projects, which have its own DialogBox object.

The MDI example is also available for 32-bit only due to another SolAsm bug that sometimes (not always) affects the 64-bit structures initialization, which makes the status bar not to work fine because it is not properly initialized.

IMPORTANT: The SolAsm author is going to be very busy for some time, but he is aware of all those issues and he is going to fix them as soon as possible. Until they are not fixed, it is highly recommended to disable the Beautify Syntax option (in the Tools menu, Syntax tab) when working with SolAsm projects, for the beautifier not to add/remove spaces that the Solar Assembler does not accept and fire compilation errors.