Jump to content
IGNORED

Trouble with DASM


Recommended Posts

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 by TonyA
Link to comment
Share on other sites

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 by TonyA
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 by TonyA
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 by TonyA
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...