Jump to content

Open Club  ·  64 members

DASM
IGNORED

Environment variables


Nostalgic

Recommended Posts

Does DASM have any support for environment variables?

 

For instance, it would be nice to create an INCLUDE_PATH environment variable to point to where vcs.h resides, rather than having to put it in the same directory as the source or use the INCDIR directive, which might point to a different directory depending on the installation.

 

Link to comment
Share on other sites

On 8/20/2023 at 3:37 PM, Nostalgic said:

Does DASM have any support for environment variables?

 

I don't think so. Reading thru the documentation I see 2 ways to add a directory to the search path for INCLUDE and INCBIN.

 

In your source code:

 

INCDIR directory

 

 

Or as a parameter passed to DASM from command line:

-Idirectory

 

 

The documentation can be downloaded from this page, the second link in the section titled Code & Documentation.

 

 

That said, there may be a way to do the same thing by creating an alias for dasm that includes -Idirectory. As an example on my Mac the ls command will list a directory without colorizing it. By creating an alias of ls that passes the -G parameter then issuing the command ls will result in ls -G being run as can be seen by the colorized output. 

 

image.thumb.png.fd80473ab6b8fb3cb7d5e4a71baefe7a.png

 

 

The initial results of ls and ls VirtualBox\ VMs/ are monochrome.   After defining the alias the directory names are now blue.

 

 

Looks like doskey is the Windows equivalent of alias in Linux and macOS.

 

On Mac I'd add the alias commands to a configuration file so they'd automatically be defined - How to Add an Alias in macOS with Terminal. Can do the same thing in Linux or Windows, though you'll need to track down instructions for those.

Link to comment
Share on other sites

Thanks for the suggestions!  I ended up creating a batch file named "d2600.bat" and am having the command in the batch file include the various command line parameters that I want.

 

dasm "%1.asm" -o"%1.bin" -f3 -I"C:\Program Files\Dasm\machines\atari2600"

 

So if I type d2600 foo to compile foo.asm I'll get an output of foo.bin in the proper format and using the include files packaged with DASM.

 

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...