euroasm.htm is the EuroAssembler linker script which will be invoked by the make-script
eamake.sh
or eamake.cmd
.
It is not a module; actual data and code are scattered in other
source modules and they will be linked here
by the same executable EuroAssembler file which was used for assembly.
This linker script is common for Linux and Windows versions of EuroAssembler.
It expects that the downloaded executable file, whose name is euroasm.x
for Linux and
euroasm.exe
for Windows, remains in the main €ASM directory, the same where
euroasm.css
, search.php
etc are located, see the
installation instructions.
EuroAssembler is shipped as executable file but it can also be rebuild
in the subdirectory easource
with script
./eamake.sh
(in Linux) or
eamake.cmd
(in Windows).
If the rebuild is successfull, it creates the listing file
easource/euroasm.htm.lst
and output file
easource/euroasm.x
(in Linux) or
easource\euroasm.exe
(in Windows).
You cannot rebuild EuroAssembler with the sameeuroasmexecutable which is being created, that means you cannot executeeuroasm euroasm.htm
in the subdirectoryeasource. Use the executable from PATH or from the directory one level higher thaneasource.
Presence of environment variable OS specifies the operating system for which will be EuroAssembler linked.
In MS Windows is something like OS=Windows_NT
, in Linux it is undefined.
Changing the variable manually, e. g.SET OS=Linux
before invokation ofeamake.cmd
will link Linux versioneasource\euroasm.xon MS Windows (and vice versa).
The just rebuilt executable can be tested in subdirectory eatests
using more than eight hundred test files with command
./testman.x "t*.htm"
(in Linux) or
testman.exe "t*.htm"
(in Windows).
Executable test managerseatests/testman.xandeatests\testman.exeare not shipped ineuroasm.zip, you should create them first from their source file.
In Linux change to subdirectoryprolin32and run../euroasm.x testman.htm
.
In Windows change to subdirectoryprowin32and run..\euroasm.exe testman.htm
.
HEAD
and ENDHEAD
in this file represent the common module header,
which is included into every EuroAssembler source module (using the pseudoinstruction
INCLUDEHEAD euroasm.htm ).HEAD ; Begin common interface block which is included to all modules. EUROASM NOWARN=0563, NOWARN=2101, NOWARN=2512, \ ; Common options valid for each source module. LIST=ON, LISTINCLUDE=OFF, LISTMACRO=OFF, LISTREPEAT=OFF, LISTVAR=OFF, \ CODEPAGE=UTF-8, UNICODE=OFF, PROFILE=OFF, DEBUG=OFF
ea.htmand EXTERN in all other modules.
%@RTprocedureList %SET BufferCreate@RT,BufferNew@RT,BufferResize@RT,BufferStore@RT,BufferStoreByte@RT,BufferStoreDword@RT, \
BufferStorePascalString@RT,BufferStoreQword@RT,BufferStoreWord@RT,Clear32@RT,Compare32@RT,CopyTo32@RT,FileClose@RT, \
FileCreate@RT,FileEach@RT,FileMapOpen@RT,FileMkDir@RT,FileWrite@RT,GetLength$A@RT,IiAbort@RT,IiAbortIfNotST0@RT, \
IiAllowLocking@RT,IiDataSize@RT,IiDispatchFormatFail@RT,IiDispatchLocation@RT,IiDispSize@RT,IiEmitImm@RT,IiEmitImm2@RT, \
IiEmitOpcode@RT,IiImmSize@RT,IiStringDestination@RT,IiStringSource@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,SysGetEnvironment@RT
%IF "%^PROGRAM" == "ea" ; Perform the actual scope declarations of runtime procedures.
PUBLIC %@RTprocedureList ; Scope is PUBLIC in the module ea.htm
%ELSE
EXTERN %@RTprocedureList ; and EXTERN in all other modules.
%ENDIF
This linker script uses environment variable OS to recognize
whether it runs on Linux or MS Windows. According to the detected OS it selects
macrolibraries for this system, for instance linapi.htm
or winapi.htm
etc.,
which will be included to all modules. The source code of modules is the same for both Linux and Windows.
%OS %SETE OS ; Try to load environment variable OS at runtime. %IF "%OS[1]" == "W" ; Environment %OS% in MS Windows is something like "Windows_NT". Test its first character. %eaos %SET win ; User-defined variable %eaos is used to include macrolibrary files. %format %SET PE ; Output executable file format. %outfile %SET euroasm.exe ; Output executable file name. %ELSE ; When the environment %OS% is not set, we must be in Linux. %eaos %SET lin ; User-defined variable %eaos is used to include macrolibraries. %format %SET ELFX ; Output executable file format. %outfile %SET euroasm.x ; Output executable file name. %ENDIF INCLUDE cpuext.htm, cpuext32.htm, stdcal32.htm, status32.htm, string32.htm, sort32.htm INCLUDE %eaos[]api.htm, %eaos[]sfile.htm, %eaos[]f32.htm, %eaos[]s.htm, memory32.htm, sys%eaos.htm
ENDHEAD ; End of common interface, which is included to all €ASM sources.
eamake.shor
eamake.cmd.
euroasm: PROGRAM Format=%format, Model=FLAT, Width=32, Entry=EaMain:, \ Subsystem=CON, ListLiterals=OFF, ListGlobals=OFF, ListMap=ON, \ Options below this line StubFile="..\objlib\coffstub.exe", IconFile="euroasm.ico", \ are irrelevant SizeOfStackReserve=1M, SizeOfStackCommit=8K, \ in Linux version. SizeOfHeapReserve=1M, SizeOfHeapCommit=4K LINK ea.obj, chunk.obj, ctx.obj, dict.obj, eaopt.obj, exp.obj, lst.obj, mac.obj, member.obj, msg.obj LINK pass.obj, pgm.obj, pgmopt.obj, pseudo.obj, reloc.obj, src.obj, sss.obj, stm.obj, sym.obj, var.obj LINK ii.obj, iia.obj, iib.obj, iic.obj, iid.obj, iif.obj, iig.obj, iik.obj, iim.obj, iip.obj LINK iis.obj, iit.obj, iiv.obj, iix.obj, iiy.obj, iiz.obj LINK pf.obj, pfbin.obj, pfboot.obj, pfcoff.obj, pfcom.obj, pfdll.obj, pfelf.obj, pfelfso.obj, pfelfx.obj LINK pflibcof.obj, pflibomf.obj, pfmz.obj, pfomf.obj, pfpe.obj, pfrsrc.obj ENDPROGRAM euroasm: