My favorites | Sign in
Project Logo
                
Search
for
Updated Sep 27, 2007 by darthandroid
Labels: Featured, Phase-Design
CmdLineParameters  
Information and details regarding parameters passed to DASM on the command line

Command Line

DASM is an extremely dynamic compiler with much of it's functionality controlled by arguments passed to it on the command line. There are also configuration files that DASM will read in (if they exist) prior to processing the actual arguments passed to it on the command line so that defaults can easily be defined. When gathering arguments for a compilation, DASM goes through the following methods:

  1. Load DASM's internal defaults, such as logging to <STDOUT>
  2. Load external defaults from a file (CONFIG.ini, CONFIG, or CONFIG.txt, in that order if multiple files exist such as both a CONFIG.ini and a CONFIG.txt file)
  3. Process arguments passed on the command line
  4. Fill in remaining required arguments with guesses based on the arguments already defined

Configuration files

DASM's external configuration files (CONFIG.ini, CONFIG, and CONFIG.txt) follow the section-key-value format of the *.ini files commonly used on windows. Parameters that should be parsed as defaults need to be placed in the "params" section of the file (there may be other sections in the future that will also be placed in the config file, but as for now there are none). An example config file would look like this:

[params]
#disable wait-for-keypress, even when DASM is double-clicked
#also, the pound symbol is interpereted as a line comment, causing the line to be ignored
#however, it must also be the first character on a line
wait-keypress=false
#sets the default output format to be *.83p files instead of *.8xp
output-format=83p

Parameters

All parameters follow a specific format of --name=value where name is the key and value is the associated value. All arguments are loaded into a table which allows source code to access this list and parameters to be passed to them. If value is omitted, then it defaults to "true", and if name is prefixed with no- then value is set to "false", regardless of what is actually passed for value (ex. --no-wait-keypress or --no-debug)

There are many parameters that DASM reads. The following modify the functioning of DASM:

sourcefile=filenameSpecifies the name and path of the input file
outputfile=filenameSpecifies the name and path of the output file. If not specified, this will be the filename of the source file with a different extention
logfile=filenameSpecifies the name and path of the logging file. By default, this is <STDOUT>
source-format=formatSpecifies the SourceFormats of the input file (defaults to "asm", representing assembly source)
output-format=formatSpecifies the OutputFormats of the output file (defaults to "8xp", representing a TI83+ assembly program).
debugRuns DASM in debug mode, which is used for internal debugging of DASM itself, not programs that it compiles. When in debug mode, DASM will profile the time used by each directive and the time to build each file as well as print out a stack trace for internal errors
compat-tasmTells DASM to run in compatability mode for TASM so that legacy code can be compiled
wait-keypressTells DASM to wait for the return key to be pressed following a compilation. This is useful on windows machines where when a console application is launched by double-clicking on the .exe file, it opens a terminal that is only open until the program terminates. By using this parameter, DASM will not terminate and thus not close the window, allowing the user to view the log output before the window is closed
target=targetTells DASM which of the Targets to use for the current compliation

The following switches control the functionality of some addon:

lockSets whether the linker for TI formats should produce "protected" programs
comment=commentSets the internal comment of TI files
block-size=sizeSets the length of blocks when generating Intel Hex output


Sign in to add a comment
Hosted by Google Code