orionpax55 Posted February 8, 2011 Share Posted February 8, 2011 When trying to assemble a text file in dasm, it tells me it can not open it and then says something like this: END OF PASS: 1 Segment--- init-pc init-rpc finl-pc finl-rpc code ???? ???? ???? ???? Reasons: 0, o, Reasoncode: 00000000 SYMBOL LIST NO SYMBOLS Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted February 8, 2011 Share Posted February 8, 2011 What command line are you using to call DASM and can you strip your code down to the minimum that does this and post it? Quote Link to comment Share on other sites More sharing options...
orionpax55 Posted February 9, 2011 Author Share Posted February 9, 2011 What command line are you using to call DASM and can you strip your code down to the minimum that does this and post it? I don't understand. Quote Link to comment Share on other sites More sharing options...
Devin Posted February 9, 2011 Share Posted February 9, 2011 (edited) 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 February 9, 2011 by Devin 1 Quote Link to comment Share on other sites More sharing options...
orionpax55 Posted February 10, 2011 Author Share Posted February 10, 2011 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. Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted February 10, 2011 Share Posted February 10, 2011 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 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.