Fresh IDE . Documentation
Not logged in

This repository is a mirror!

The original is located on: https://fresh.flatassembler.net/fossil/repo/fresh
If you want to follow the project, please update your remote-url

FreshLib directory: compiler

This directory contains only one macro library: "executable.inc"

This library defines the macros that are going to be used for creating the main structure of the program. These macros are OS dependent as long as the type of the executable file is OS dependent: PE for Win32 and ELF for Linux.

Every one of the macros from this library should be used only once in the program.

FreshLib Executable macros

This macro library contains:

_BinaryType

macro _BinaryType type

This macro sets the type of the executable. The argument type can accept one of the following values: GUI, console or DLL.

This macro defines also the entry label of the program. This label is fixed to start:

For example, following code will tell the compiler to compile the program as a GUI application:

include 'compiler/executable.inc'
_BinaryType GUI

_CodeSection

macro _CodeSection

This macro defines the section where the code of the program to be placed.

Actually this section is the main section of the project. Here should be included all used libraries and other project files.

_DataSection

macro _DataSection

This macro defines the section where the data of the program to be placed. The common way to use this section is to use inside the macro IncludeAllGlobals that will allow you to use data defining macros from every place inside the source and leave the compiler to order this data properly for you.

For details on using global data definition macros see: _globals.inc

_ImportSection

macro _ImportSection

This macro defines the section where to be inserted the list with functions dynamically imported from external libraries.

Usually you only have to include here the library "allimports.asm" and the compiler will import for you only those functions that are used in the project.