Skip to content

Latest commit

 

History

History
76 lines (65 loc) · 4.34 KB

ADW_M2.md

File metadata and controls

76 lines (65 loc) · 4.34 KB

ADW Modula-2 Quick Reference

ADW Modula-2 This document gathers ADW Modula-2 related informations.

Build scripts (Bash scripts, batch files, Make scripts) in our code examples simply provide arguments to the following ADW Modula-2 commands :

Command Options Examples
m2amd64.exe -nowarn a)
-quiet hides compiler logo and progress messages
-sym:<relpath> {,<relpath> } -sym:target\sym,target\def
sblink.exe { @<filepath>b) } @target\linker_opts.txt
a) For instance : Warning -- Function procedure called as a procedure
b) Most compilers support so-called response files 1.

Footnotes

[1] Response files

Compiler arguments specified in response files are either space-separated or line-separated (as with the ADW Modula-2 compiler).

For instance, the batch command build.bat (in project EstimatePi) generates the following response file to be passed to the ADW linker (sblink.exe) :
> type target\linker_opts.txt
-MACHINE:X86_64
-SUBSYSTEM:CONSOLE
-MAP:F:\adw-examples\EstimatePi\target\EstimatePi
-OUT:F:\adw-examples\EstimatePi\target\EstimatePi.exe
-LARGEADDRESSAWARE
target\mod\EstimatePi.obj
target\mod\Rand.obj
C:\opt\ADW-Modula-2\ASCII\rtl-win-amd64.lib
C:\opt\ADW-Modula-2\ASCII\win64api.lib
Let's call sblink.exe directly :
> del target\EstimatePi.exe
 
> c:\opt\ADW-Modula-2\ASCII\sblink.exe @target\linker_opts.txt
Linker. Build ADW 1.6.879
Copyright (C) 2009, by ADW Software
 
Time = 20
Memory = 1816k
 
> dir /s /b target\*.exe
F:\adw-examples\EstimatePi\target\EstimatePi.exe
Here a some references about response files :

mics/December 2024