TonyA Posted July 18, 2006 Share Posted July 18, 2006 (edited) Hi, I am able to call DASM from my command prompt, but then DASM will respond; "Warning: Cannot open sound.asm" "sound.asm" is my program text file. When saving my text file, should I save a .txt or .asm? (I have been saving as .asm). I am saving the file in the same directory as DASM. When I call DASM in command prompt I write this: 1. CD\DASM\bin\DOS (by the way, is there anyway to permenantly change the path command prompt points to when it starts up? It just keeps starting up in my documents directory.) then it returns; C:\DASM\bin\DOS 2. then I type: dasm sound.asm -lsound.txt -f3 -v5 -osound.bin (I just typed this again in command prompt and this time got error messages) I get a bunch of errors for my code, which is something written for the atari 8 bit. DASM replies "unrecognized mneumonics, etc.) Could I not use code written for the 8 bit for use with DASM? I also tried the example in session 9 "6502 And DASM" of the great tutorials by Andrew Davie for assembling the kernel.asm and I get a bunch of error saying "unknown mneumonic "sta", and other mneumonics; inx, lda, etc. Would this indicate there is something wrong with the source file? Or are there other files I need to download to work with DASM? Thanks for any help. Tony Edited July 18, 2006 by TonyA Quote Link to comment Share on other sites More sharing options...
jbanes Posted July 18, 2006 Share Posted July 18, 2006 I am able to call DASM from my command prompt, but then DASM will respond; "Warning: Cannot open soumd.asm" Try the key to the left of the 'M'. Quote Link to comment Share on other sites More sharing options...
TonyA Posted July 18, 2006 Author Share Posted July 18, 2006 I am able to call DASM from my command prompt, but then DASM will respond; "Warning: Cannot open soumd.asm" Try the key to the left of the 'M'. DASM did that, not me... (oooh DASM!) Quote Link to comment Share on other sites More sharing options...
TonyA Posted July 18, 2006 Author Share Posted July 18, 2006 (edited) Update: Even though I get a list of errors as mentioned such as "unknown mneumonics", etc. When I run the .bin file in Stella it works. Why would I get those error statements from DASM? Tony Edited July 18, 2006 by TonyA Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted July 19, 2006 Share Posted July 19, 2006 Update: Even though I get a list of errors as mentioned such as "unknown mneumonics", etc. When I run the .bin file in Stella it works. Why would I get those error statements from DASM? Tony An unknown mneumonic is probably a sphelling error. Cheers A Quote Link to comment Share on other sites More sharing options...
TonyA Posted July 19, 2006 Author Share Posted July 19, 2006 (edited) I copied and pasted the code into the text editor (Note Pad). Could these errors occur if the formatting of the text document is off (I mean if things aren't alighned, etc.?). Where can I find .asm files that I can try out with DASM? Thanks for the help. That tutorial is awesome. Thanks for writing that. Tony Edited July 19, 2006 by TonyA Quote Link to comment Share on other sites More sharing options...
SeaGtGruff Posted July 19, 2006 Share Posted July 19, 2006 I copied and pasted the code into the text editor (Note Pad). Could these errors occur if the formatting of the text document is off (I mean if things aren't alighned, etc.?). Yes, they possibly could, but with the alignment it isn't needing things to be lined up in certain columns, but rather whether certain lines befin right at the left margin (no leading spaces or indents) or are indented by one or more spaces. If DASM is telling you that it doesn't understand "lda" or "sta" and thinks they are mnemonics, then it's probably caused by a lack of indentation. The opcodes must have at least one space in front of them. If something starts right at the left margin, DASM treats it as a label. Michael Rideout Quote Link to comment Share on other sites More sharing options...
TonyA Posted July 19, 2006 Author Share Posted July 19, 2006 Hi, Yes, I think that's what's happening. I'm reading an old book about Atari Assembly and it does say this about the spacing. Thanks. Quote Link to comment Share on other sites More sharing options...
nmoog Posted July 19, 2006 Share Posted July 19, 2006 Also, make sure that you have "processor 6502" at the top of the file somewhere - with at least one space. That might explain your unknown mnemonics if it is dying on things like lda, sta etc... If you try and compile something and it has errors, you will still get a .bin file and stella will run it showing a black screen and making funny tickky noises. I dunno why! Quote Link to comment Share on other sites More sharing options...
TonyA Posted July 19, 2006 Author Share Posted July 19, 2006 (edited) Also, make sure that you have "processor 6502" at the top of the file somewhere - with at least one space. That might explain your unknown mnemonics if it is dying on things like lda, sta etc... If you try and compile something and it has errors, you will still get a .bin file and stella will run it showing a black screen and making funny tickky noises. I dunno why! Yes, I realized from trial and error that I had to align everything in my text document to the far left margin. And it worked fine. I also had that experience, DASM created a .bin and Stella produced a black screen with ticking... Starting to figure it out now. Thanks again. Edited July 19, 2006 by TonyA 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.