Jump to content
IGNORED

dasm troubles


orionpax55

Recommended Posts

dasm is a great assembler, but takes a little effort to get used to. The best approach (at least the one I use) is to create a batch file called "asm" that calls dasm with the correct parameters.

 

The following is the batch file contents that I use:

 

@echo off
dasm ntsc.asm -f3 -o%1.bin
start %1.bin

 

The approach I used was for testing. I always name the root assembly ntsc.asm - mainly because I also plan to create PAL versions if necessary.

 

The code above basically assembles the code, saves the binary to the specified name, and then opens it. I vary the output name depending on the build - to keep a binary history for myself.

 

So, if I want to assemble build 1, and I am calling it "b1", I would type:

 

asm b1

 

Of course, you might want a more flexible version. The batch file below takes two arguments - the source and destination. Notice that you don't have to specify the .asm or .bin - the batch adds those manually.

 

@echo off
dasm %1.asm -f3 -o%2.bin
start %2.bin

 

It would be used as:

 

asm mycode b1

 

I've also attached a copy of the batch file.

asm.zip

Edited by Devin
  • Like 1
Link to comment
Share on other sites

dasm is a great assembler, but takes a little effort to get used to. The best approach (at least the one I use) is to create a batch file called "asm" that calls dasm with the correct parameters.

 

The following is the batch file contents that I use:

 

@echo off
dasm ntsc.asm -f3 -o%1.bin
start %1.bin

 

The approach I used was for testing. I always name the root assembly ntsc.asm - mainly because I also plan to create PAL versions if necessary.

 

The code above basically assembles the code, saves the binary to the specified name, and then opens it. I vary the output name depending on the build - to keep a binary history for myself.

 

So, if I want to assemble build 1, and I am calling it "b1", I would type:

 

asm b1

 

Of course, you might want a more flexible version. The batch file below takes two arguments - the source and destination. Notice that you don't have to specify the .asm or .bin - the batch adds those manually.

 

@echo off
dasm %1.asm -f3 -o%2.bin
start %2.bin

 

It would be used as:

 

asm mycode b1

 

I've also attached a copy of the batch file.

Thanks, I've gotten it to work now.

Link to comment
Share on other sites

Thanks, I've gotten it to work now.

I don't know what the problem was, but one thing people new to DASM and Atari 2600 programming often overlook is the "-f3" command-line switch. If you forget to include it, DASM won't assemble your code into a proper ROM image, and your program won't run in an emulator. :)

 

Michael

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

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