euroasm.htm is the nominal EuroAssembler source, linker and make script.
It is not a module, actual data and code are scattered in other
source modules and included here.
EuroAssembler program itself can be rebuilt with command
..\euroasm euroasm.htm
executed in subdirectory easource
.
Rebuild uses the stable version located in EuroAssembler home directory
..
or in system %PATH%.
Those output files are created during the rebuild:
..\easource\euroasm.iniused for initialization of all modules.
..\objlib\coffstub.exeassembled from
..\easource\coffstub.htm.
..\easource\*.objassembled from their sources
..\easource\*.htm, from macrolibraries
..\maclib\*.htmand from factory-default configuration
..\objlib\euroasm.ini.
..\easource\euroasm.exelinked from
..\easource\*.obj,
..\objlib\coffstub.exe
..\objlib\euroasm.ico.
..\easource\euroasm.htm.lst
This file ..\easource\euroasm.htm
in its HEAD..ENDHEAD
block
is also hosting common interface
headers from all other source modules which are included to each module (except for its own).
easource/euroasm.ini, so they need not to be explicitly specified in each module source file.
euroasm_ini PROGRAM FORMAT=BIN,OUTFILE="euroasm.ini" DB "; This is a temporary configuration file created on the fly when EuroAssembler is built.",13,10 DB "; It tailors the appearance and format of assembly output and listing.",13,10 DB "[EUROASM]",13,10 DB "NOWARN=0563",13,10 ; I0563 Accepting link directive ''/!1S:!2S''. DB "NOWARN=2101",13,10 ; W2101 Symbol "!1S" was defined but never used. DB "NOWARN=2512",13,10 ; W2512 Overwriting macro "!1S" previously defined at !2@. DB "MAXINCLUSIONS=5000",13,10 DB "MAXLINKS=64",13,10 DB "AUTOALIGN=ON",13,10 DB "LIST=ON",13,10 DB "LISTINCLUDE=OFF",13,10 DB "LISTREPEAT=OFF",13,10 DB "LISTMACRO=OFF",13,10 DB "DUMP=ON",13,10 DB "DUMPALL=OFF",13,10 DB "DUMPWIDTH=28",13,10 DB "CPU=586",13,10 DB "UNICODE=OFF",13,10 DB "PROFILE=OFF",13,10 DB "DEBUG=OFF",13,10 DB "; Program options for all EuroAssembler modules:",13,10 DB "[PROGRAM]",13,10 DB "FORMAT=COFF",13,10 DB "MODEL=FLAT",13,10 DB "WIDTH=32",13,10 DB "MAXPASSES=48",13,10 DB "LISTLITERALS=ON",13,10 DB "LISTMAP=ON",13,10 DB "LISTGLOBALS=OFF",13,10 ENDPROGRAM euroasm_ini
Target file ../objlist/coffstub.exe
depends on its source ../easource/coffstub.htm
.
%IF FILETIME# "..\objlib\coffstub.exe" <= FILETIME# "coffstub.htm" ; > INCLUDE "coffstub.htm" ; Include and compile the stub foreuroasm.exe. %ENDIF
euroasm: HEAD
.. ENDHEAD euroasm:
in this file contains the common module header,
which is included into every EuroAssembler source module.
It refers interface of all other modules, thus each module knows about
macros, structures and global symbols defined in other modules.euroasm: HEAD ; Begin common interface block which is included to all modules.
%EuroasmOS specifies the operating system which EuroAssembler is compiled for. This version od €ASM supports only Win (32bit MS Windows) at this moment.
%EuroasmOS %SET Win ; Identifier of EuroAssembler OS (1..4 characters). %eaos %SET ; Lowercase version of %EuroasmOS will be used in filenames to include. %eaossize %SETS %EuroasmOS ; Get number of characters in this %variable. i %FOR 1..%eaossize %lc %SETC '%EuroasmOS[%i]' | 0x20 ; Convert i-th character to lowercase, set it to %lc %eaos %SET %eaos%lc ; and append it to %eaos. %ENDFOR i ; %eaos is now 'win'.
euroasm.exe.
%ModuleList %SET \ ea, \ src, \ pgm, \ pass, \ eaopt, \ chunk, \ ctx, \ exp, \ dict, \ msg, \ pgmopt, \ stm, \ sss, \ sym, \ member, \ reloc, \ var, \ mac, \ pseudo, \ ii, \ iia, \ iib, \ iic, \ iid, \ iif, \ iig, \ iik, \ iim, \ iip, \ iis, \ iit, \ iiv, \ iix, \ iiy, \ iiz, \ lst, \ pf, \ pfbin, \ pfboot, \ pfcom, \ pfmz, \ pfomf, \ pflibomf, \ pfcoff, \ pflibcof, \ pfpe, \ pfdll, \ pfelf, \ pfelfx, \ pfelfso, \ pfrsrc, \ sys%eaos, \ Expanded to syswin, syslin, sysos2, sysbsd etc. ;;
.htm, they are searched for in subdirectory
..\maclib\and they contain definitions of those generally usable macros, which are hired by EuroAssembler.
%MaclibList %SET \ wins, \ winscon, \ winsfile, \ winapi, \ memory, \ stdcal32, \ cpuext, \ cpuext32, \ status32, \ string32, \ sort32, \ ;;
ea.htmwhere are the macros expanded.
%@RTprocedureList %SET \ BufferCreate@RT, \ BufferNew@RT, \ BufferResize@RT, \ BufferStore@RT, \ BufferStoreByte@RT, \ BufferStoreWord@RT, \ BufferStoreDword@RT, \ BufferStoreQword@RT, \ BufferStorePascalString@RT,\ Clear32@RT, \ Compare32@RT, \ CopyTo32@RT, \ FileAssignA@RT, \ FileClose@RT, \ FileCreate@RT, \ FileEach@RT, \ FileMapOpen@RT, \ FileMkDir@RT, \ FileNameParseA@RT, \ FileWrite@RT, \ GetLength$A@RT, \ SysGetFileSize@RT, \ SysGetFileTime@RT, \ IiAbort@RT, \ IiAbortIfNotST0@RT, \ IiAllowLocking@RT, \ IiStringDestination@RT, \ IiStringSource@RT, \ IiDispatchFormatFail@RT, \ IiDispatchLocation@RT, \ IiDispSize@RT, \ IiEmitImm@RT, \ IiEmitImm2@RT, \ IiEmitOpcode@RT, \ IiImmSize@RT, \ ListCreate@RT, \ ListInsert@RT, \ ListNew@RT, \ ListRemove@RT, \ ListStore@RT, \ LodD32@RT, \ PoolCreate@RT, \ PoolDestroy@RT, \ PoolNew@RT, \ ShellSort32@RT, \ StackCreate@RT, \ StackPush@RT, \ StoD32@RT, \ StoH32@RT, \ StoQD32@RT, \ StreamCreate@RT, \ StreamDump@RT, \ StreamGetSize@RT, \ StreamStore$size@RT, \ StreamStore@RT, \ ;;
EUROASM NOWARN=0563, NOWARN=2101, NOWARN=2512, \ ; Common options valid for each source module. MAXINCLUSIONS=5000, LIST=ON, LISTINCLUDE=OFF, LISTREPEAT=OFF, \ PROFILE=OFF, DEBUG=OFF INCLUDE wins.htm, winscon.htm, winsfile.htm, winapi.htm, memory.htm, \ stdcal32.htm, \ cpuext.htm, cpuext32.htm, status32.htm, string32.htm, sort32.htm %IF "%^PROGRAM" == "ea" ; Perform the actual scope declarations of runtime procedures. PUBLIC %@RTprocedureList %ELSE %IF "%^PROGRAM" !== "euroasm" EXTERN %@RTprocedureList %ENDIF %ENDIF EUROASM LISTINCLUDE=ON
ENDHEAD euroasm: ; End of common interface, which is included to all €ASM sources.
module %FOR %ModuleList %IF FILETIME# "%module.obj" <= FILETIME# "%module.htm" ;> Reassembly only if the object file isn't fresh. %ModulesToAssemble %SET %ModulesToAssemble,"%module.htm" %ENDIF %ENDFOR module EUROASM LISTINCLUDE=ON ; Incorporate listing of each module toeuroasm.htm.lst. INCLUDE %ModulesToAssemble ; Perform the actual assembly of each included PROGRAM..ENDPROGRAM block.
; Define executable properties. euroasm: PROGRAM Format=PE,Model=FLAT,Width=32,Subsystem=CON, \ StubFile="..\objlib\coffstub.exe", IconFile="euroasm.ico", \ SizeOfStackReserve=1M, SizeOfStackCommit=8K, \ SizeOfHeapReserve=1M, SizeOfHeapCommit=4K, \ ListGlobals=OFF,Entry=EaMain:: ; Enumerate all assembled COFF modules which will be linked. module %FOR %ModuleList %ModulesToLink %SET %ModulesToLink,"%module.obj" %ENDFOR module ; Perform the actual linking. LINK %ModulesToLink ; Perform the linking of all modules to outfile. ENDPROGRAM euroasm: