Jump to content

Photo

DASM Compiling Troubles

dasm programming beginner

2 replies to this topic

#1 PaultheRoman OFFLINE  

PaultheRoman

    Space Invader

  • 15 posts

Posted Sat Sep 15, 2018 8:27 PM

 Hey, guys. I'm a beginner Atari programmer and I'm trying to go through Andrew Davie's book 2600 Programming for Newbies. I downloaded the dasm assembler from https://sourceforge....ts/dasm-dillon/, and i put the vcs.h and the macro.h file within the directory that the dasm.exe file is located. However, when I drag a file named testing1.asm to the dasm.exe file to compile it, i get a file called a.out that has nothing inside of it instead of a .bin file. What am I doing wrong? Below is what is written in the testing1.asm file.

processor 6502
include "vcs.h"
include "macro.h"
SEG
ORG $F000
Reset
StartOfFrame
; Start of vertical blank processing
lda #0
sta VBLANK
lda #2
sta VSYNC
; 3 scanlines of VSYNCH signal...
sta WSYNC
sta WSYNC
sta WSYNC
lda #0
sta VSYNC
; 37 scanlines of vertical blank...
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
; 192 scanlines of picture...
ldx #0
REPEAT 192 ; scanlines
inx
stx COLUBK
sta WSYNC
REPEND
lda #%01000010
sta VBLANK ; end of screen - enter blanking
; 30 scanlines of overscan...
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
sta WSYNC
jmp StartOfFrame
ORG $FFFA
.word Reset ; NMI
.word Reset ; RESET
.word Reset ; IRQ
END


#2 SpiceWare OFFLINE  

SpiceWare

    Draconian

  • 12,372 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sun Sep 16, 2018 8:56 AM

dasm's a command line program so you run it by typing commands in a terminal session such as this: 

dasm testing1.asm -f3 -v0 -stesting1.sym -ltesting1.lst -otesting1.bin

 
by dasm.exe I gather you're on windows, where the terminal is known as the Command Prompt. If you're not familiar with it then this tutorial might be useful. After you've started the Command Prompt you'll need to use the cd command to change into the directory your code is located in.  Once there you'd issue the command as shown above.

You may also find my tutorial Collect to be useful, it covers writing a 2K game from scratch.  There's a readme.txt included with the Collect source code that explains what those options like -f3 mean.



#3 SpiceWare OFFLINE  

SpiceWare

    Draconian

  • 12,372 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sun Sep 16, 2018 8:59 AM

Also, spacing at the start of the line is important.
 
    processor 6502
    include "vcs.h"
    include "macro.h"
    SEG
    ORG $F000
Reset
StartOfFrame
    ; Start of vertical blank processing
    lda #0
    sta VBLANK
    ...
 
 
It's possible you have that correct and the leading whitespace was lost when you cut/paste your code into the code box.




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users