EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Macrolibraries
All macrolibraries
OS API libraries
Calling convention
File functions

This is an overview of libraries which can be included to source files of programs written in EuroAssembler.

Names of all macroinstructions from all macrolibraries are listed in alphabetical order on the main EuroAssembler index page.

Although macrolibraries in this directory maclib are licensed for public domain, it's not recommendable to add your own macros, structures, constants to those files, because your update would have been lost whenever a new version of EuroAssembler overwrites them.
Create a new macrolibrary with unoccupied name instead.
Includable libraries shipped with EuroAssembler
RealmOSWidthContentsMaclib file
EUROASMany16BIOS API interfacebiosapi.htm
PROGRAMany16BIOS structures + symbols.bioss.htm
EUROASManyanyExtensions of CPU machine instructionscpuext.htm
EUROASMany16Extensions of CPU machine instructionscpuext16.htm
EUROASMany32Extensions of CPU machine instructionscpuext32.htm
EUROASMany64Extensions of CPU machine instructionscpuext64.htm
EUROASManyanyNontinteractive debuggingdebug.htm
EUROASMDos16DOS API interfacedosapi.htm
PROGRAMDos16DOS structures and symbols.doss.htm
EUROASMWin64FastCall Windows 64bit calling-convention macros.fastcall.htm
EUROASMLin64Linux 64bit SYSCALL ABI interface.linabi.htm
EUROASMLin32Linux 32bit INT 0x80 API interface.linapi.htm
PROGRAMLin32Wrappers of 32bit Linux file functions.linf32.htm
PROGRAMLin64Wrappers of 64bit Linux file functions.linf64.htm
PROGRAMLin32,64Struc+symbols for base functions in Linux.lins.htm
PROGRAMLin32,64Struc+symbols for file access in LinAPI.linsfile.htm
EUROASMany32Memory management macros.memory.htm
EUROASMany16Data sorting.sort16.htm
EUROASMany32Data sorting.sort32.htm
EUROASMany64Data sorting.sort64.htm
EUROASMany16Boolean flag manipulation.status16.htm
EUROASMany32Boolean flag manipulation.status32.htm
EUROASMany16StdCall 16bit calling-convention macros.stdcal16.htm
EUROASMany32StdCall 32bit calling-convention macros.stdcal32.htm
EUROASMany64StdCall 64bit calling-convention macros.stdcal64.htm
EUROASMany16Operations with zero-terminated strings.string16.htm
EUROASMany32Operations with zero-terminated strings.string32.htm
EUROASMany64Operations with zero-terminated strings.string64.htm
EUROASMany64System V 64bit calling-convention macros.sysvcall.htm
EUROASMWin64Macros for core 64bit MS Windows functions.winabi.htm
EUROASMWinanyList of MS Windows API functions with ANSI+WIDE variants.winansi.htm
EUROASMWin32Macros for core 32bit MS Windows functions.winapi.htm
PROGRAMWin32Wrappers of 32bit MS Windows file functions.winf32.htm
PROGRAMWin64Wrappers of 64bit MS Windows file functions.winf64.htm
PROGRAMWin32,64Struc+symbols for base functions in WinAPI.wins.htm
PROGRAMWin32,64Struc+symbols for console subsystem in WinAPI.winscon.htm
PROGRAMWin32,64Struc+symbols for common dialogs in WinAPI.winsdlg.htm
PROGRAMWin32,64Struc+symbols for file access in WinAPI.winsfile.htm
PROGRAMWin32,64Struc+symbols for graphic subsystem in WinAPI.winsgui.htm
PROGRAMWin32,64Struc+symbols for networking in WinAPI.winsnet.htm
PROGRAMWin32,64Struc+symbols for printing in WinAPI.winsprn.htm
PROGRAMWin32,64Struc+symbols for registry access in WinAPI.winsreg.htm
PROGRAMWin32,64Struc+symbols for security management in WinAPI.winssec.htm
PROGRAMWin32,64Struc+symbols for time functions in WinAPI.winstime.htm

The Realm category specifies visibility of included library members in the source.

Realm EUROASM libraries contain only macros and preprocessing %variables, i.e. redefinable resources which are not constrained by PROGRAM..ENDPROGRAM. Their scope begins at the moment of library inclusion, and it ends at the end of source file.
Macrolibraries from this realm may be included inside the PROGRAM block, or only once at the beginning of source file.

If an EUROASM macrolibrary depends on %variables and macros defined in other library, it should ensure from misorder and start with INCLUDE1 OtherLibrary.

Realm PROGRAM libraries contain definitions of constant symbols and structures, which must be unique in a program.
Libraries from this realm should be included inside the PROGRAM block, otherwise the symbols and structures would not be visible for the assembled program.
Order of their inclusion does not matter.

Structures and symbols retrieved from [WindowsSDK]   were classified by their subsystem or functionality and split to several specialized macrolibraries wins*.htm. This should speed up the assembly time, because ordinary programs usually do not need to include all possible functionalities at once.
Look for the constant/structure name with the Search applet on top of this page when you are not sure which macrolibrary hosts the symbol.
Lazy Windows programmer can include all those libraries at once with INCLUDEHEAD1 wins*.htm in its header.

↑ API libraries

This collection provides macros for interaction with the application programming interface of operating system. It also defines homonymous macros for basic functions of the operating systems: standard console input and output (StdInput, StdOutput), retrieving of command-line arguments ( GetArgCount, GetArg), retrieving of environment variables ( GetEnv), return from the program to OS (TerminateProgram, TerminateStayResident).

Programming interface macros represent an elegant way of interaction with operating system using only one single statement. Otherwise we would have to push or load appropriate registers with argument values in the right order, store caller-save registers, manually arrange stack alignment, call the imported function and finally restore the stack.

Overview of macrolibraries for interaction with OS
via Application Programming Interface
OSWidthMacroMethodModeMacrolibrary file
Bios16BiosAPI INT 0x10Robustbiosapi.htm
Dos16DosAPI INT 0x21Robustdosapi.htm
Lin32LinAPI INT 0x80Robust | Fastlinapi.htm
Lin64LinABI SYSCALLRobust | Fastlinabi.htm
Win32WinAPI StdCallRobust | Fastwinapi.htm
Win64WinABI FastCallRobust | Fastwinabi.htm

↑ Calling convention libraries

This set of libraries is designed to create procedures conform with usual calling conventions (macros Procedure, EndProcedure). Such procedures can be invoked as an OS-function callback, or invoked by 3rd-party programs, if the procedure is exported from a shared library.

Macros Invoke can be used to exploit procedures and functions from OS or from 3rd-party non-OS libraries. Nevertheless, for interaction with OS it's better to use a specialized API macroinstruction.

Overview of OS-independent
calling convention macrolibraries
OSWidthMacroMethodModeMacrolibrary file
any16InvokeStdCallRobuststdcal16.htm
any32InvokeStdCallRobuststdcal32.htm
any64InvokeStdCallUsesstdcal64.htm
any64InvokeSystem VUsessysvcall.htm
any64InvokeFastCallRobust | Fastfastcall.htm

The Mode category specifies expansion mode of the macro. Most macros from EuroAssembler libraries are
Robust which means that they do not clobber any registers except for those which return the result. This is suitable for programming style where important variables are kept in GPR permanently and they survive invocation of OS API or of other library function. Robust mode macros also allow to pass function arguments in arbitrary registers.

Fast mode macros do not bother with saving and restoring caller-save registers. Programmers cannot rely on values in scratch registers to remain unchanged by OS interaction. They also need to pay attention to not overwrite values in registers designed for argument transport.

Some API invokation macros allow to select Fast or Robust expansion mode with keyword operand Fastmode=.

64bit libraries employ the macro Uses to explicitly specify the list of registers which the invoked procedure should save and restore. The level of robustness then depends on Uses operands.

Calling convention libraries contain homonymous macroinstructions
(Procedure, EndProcedure, Invoke, LocalVar, ClearLocalVar, Uses). Only one such library should be included in a program. Calling convention library can be combined with API library, see the sample projects for examples.

↑ File functions

Homonymous macroinstructions whose name begins with File~ were created to unify work with files in EuroAssembler programs, regardless of OS and program width.

Overview of macrolibraries
for file functions
OSWidthModeMacrolibrary file
Lin32Robustlinf32.htm
Lin64Robustlinf64.htm
Win32Robustwinf32.htm
Win64Robustwinf64.htm

As an example of using those File~ macros see the sample testing programs tlinf32.htm, tlinf64.htm, twinf32.htm, twinf64.htm.


▲Back to the top▲