Can use ca65 (instead of dasm):
http://wiki.cc65.org/doku.php?id=cc65:atari_2600
Need vcs.h and macro.h from dasm https://github.com/munsie/dasm/tree/master/machines/atari2600 No they don't compile, just start a new vcs.inc that defines all the registers using http://www.classic-games.com/atari2600/specs.html.
Adapt http://www.randomterrain.com/atari-2600-memories-tutorial-andrew-davie-08.html assembly example to ca65.
This produces demo.o
$HOME/other/cc65/bin/ca65 -g -o demo.o demo.s -I.
$HOME/other/cc65/bin/ld65 -C atari2600.cfg -m demo.map -Ln demo.labels -vm demo.o -o demo.bin
This is the working adapted example: