| Table of Contents |
|---|
| Summary |
|---|
|
This IDE was developed as an alternative to FASMW tool, which is supplied
in the FASM package. In addition to syntax highlighting this IDE also provides
very good navigational capabilities and auto-completion, which are missing from FASMW. These
features are the most needed for development of a large project.
|
The following screenshot gives overall view of IDE: |
| Directory Structure |
|---|
I will explain the contents of the package: |
|
| Project Management |
|---|
|
The concept of a project is simple. First of all, the project name is the same as a name of a directory where all project files are located. Also, the name of a root ASM file is the same as project name. Following image shows some details when new project named A1 is created by IDE:
To create/open a project IDE has a dialog invoked from a File popup menu:
To create a new project:
To load an existing project simply select project from a list and click OK. Or double click the project item in the list. The root file of the project is loaded and parsed with all include files. It fills the identifier tables in IDE memory. These tables are used for auto-completion and navigation. Sometimes project has frozen information associated with it. In this case all source files which were opened during closing of IDE (or freezing) will be restored with their scrolling/caret positions, so the IDE loads all information as it were before the project got frozen. See more details about the project freezing later in this document. Few important points about the contents of a root ASM file:
|
| What is a Module? |
|---|
|
The module, in my opinion, is a software building block, which encapsulates some behaviour in such a way that it can be reused in other applications. This reuse can be implemented in two ways:
When you creating a module in IDE (let us name it TString), the IDE will generate two files for you: TString.Inc and TString.Asm. Optionally, you can select what files would be generated. Next, IDE will automatically include these files at their places in a root file. These places are tagged with {INSMODDEF} and {INSMODIMPL} keys.
INC file contains the structure(s), constants and macros to represent an object described by the module, in this case a TString object. ASM file contains code - the set of functions to manipulate the object data structure and behaviour. IDE has an ability to generate a function body inside ASM file (Ctrl+P). During that process
IDE will use the module name to generate a prefix for the function name. This is done to avoid a
duplication of names belonging to different modules.
|
| Concept of a Library |
|---|
|
The code reuse is a basis for Rapid Application Development. If you have a lot of reusable objects (or modules) in the Library then your next application can be built more quickly. IDE provides this functionality with Library menu:
![]() Knowing the directory structure, IDE can easily generate the relative path for any included files from the Library: ![]() When looking at the list of includes you can easily see which modules are coming from the Library and which are part of this project in its directory. This process has a simple implementation. There is no checking if module being inserted is already included, so you may include few things twice or if you including something big - there will be no check for its dependencies. They will not be included automatically. In any case, because FASM is so fast to assemble the root file - you will see the error messages, whatever is missing or duplicated and easily fix the issue. You may include dependencies into bigger modules, but I suggest against that - it will cause problems if two large modules use the same dependencies. New IDE I am designing will have the module dependency solved. I imagine, that this issue of dependency may be solved with some smart macros (which FASM is so famous for!), like with used macro element. In conclusion, a few points about designing a good module. The good module is the one which will not introduce any building errors when included into any project, like duplicate/missing identifiers. The following few design principles may prove useful:
|
| Main Menu Commands |
|---|
|
In this section we will examine all menu commands from main menu bar in IDE. I will skip only commands which will be explained in the toolbar section. File menu:
Edit menu: View menu:
Tools menu:
Library menu - see Concept of a Library section. Help menu:
|
| Local Editor Menu |
|---|
|
When you click right mouse button in code editor the cursor is moved to
a point of a click and following popup menu is displayed:
Some of these menu items are located on the toolbar, so they will be explained in toolbar section. The rest of commands is described here:
|
| Toolbar Commands |
|---|
|
|
| Source Code Editor |
|---|
|
IDE has a very simple code editor. Only fixed spaced fonts are used. No tabs. The usual navigation
keys are accepted. Auto-indent is always present. No horizontal scrolling.
You can select an identifier by double clicking on it or by a single click, but holding down
Ctrl key. Also, you can copy a single line into Clipboard without doing anything - just press Ctrl+C
key without any visible selection present. To cancel selection simply click somewhere with mouse
or press Esc key.
Auto-completion engine has two modes:
I want to point out a small problem with Auto-Completion engine. When IDE was done and I started
testing it and writing this document, I have noticed that IDE will not complete the structure members
for a variable which is itself a structure member. Let me explain with a few screenshots:
Auto-Completion engine also "knows" about structures declared using virtual construct. It can
be used as an alternative to native FASM implementation of local variables. It is demonstrated by
following screenshot: Auto-Completion, however, works for old style locals too. As seen on the following screenshot, when
prefix dw is typed and user presses Ctrl+Blank - you can see both parameters and
locals beginning with that prefix in the same list: Auto-Completion engine is case sensitive. It means if you type wm_ and press Ctrl+Blank, engine will not find any completions for that prefix. You must type WM_ to get a valid list. |