Jump to content



0

Trouble with DASM


9 replies to this topic

#1 TonyA OFFLINE  

TonyA

    Star Raider

  • 64 posts

Posted Tue Jul 18, 2006 4:16 PM

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, Tue Jul 18, 2006 5:36 PM.


#2 jbanes OFFLINE  

jbanes

    River Patroller

  • 3,074 posts
  • Coming soon to a natural satellite near you...

Posted Tue Jul 18, 2006 4:18 PM

View PostTonyA, on Tue Jul 18, 2006 5:16 PM, said:

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'. ;)

#3 TonyA OFFLINE  

TonyA

    Star Raider

  • 64 posts

Posted Tue Jul 18, 2006 4:25 PM

View Postjbanes, on Tue Jul 18, 2006 6:18 PM, said:

View PostTonyA, on Tue Jul 18, 2006 5:16 PM, said:

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!) ;)

#4 TonyA OFFLINE  

TonyA

    Star Raider

  • 64 posts

Posted Tue Jul 18, 2006 5:51 PM

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, Tue Jul 18, 2006 5:51 PM.


#5 Andrew Davie OFFLINE  

Andrew Davie

    Stargunner

  • 1,314 posts
  • Location:Tasmania

Posted Tue Jul 18, 2006 6:10 PM

View PostTonyA, on Wed Jul 19, 2006 9:51 AM, said:

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

#6 TonyA OFFLINE  

TonyA

    Star Raider

  • 64 posts

Posted Tue Jul 18, 2006 6:16 PM

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, Tue Jul 18, 2006 6:22 PM.


#7 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,547 posts
  • Location:Georgia, USA

Posted Tue Jul 18, 2006 7:40 PM

View PostTonyA, on Tue Jul 18, 2006 8:16 PM, said:

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

#8 TonyA OFFLINE  

TonyA

    Star Raider

  • 64 posts

Posted Wed Jul 19, 2006 8:21 AM

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.

#9 nmoog OFFLINE  

nmoog

    Space Invader

  • 44 posts

Posted Wed Jul 19, 2006 4:47 PM

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!

#10 TonyA OFFLINE  

TonyA

    Star Raider

  • 64 posts

Posted Wed Jul 19, 2006 5:23 PM

View Postnmoog, on Wed Jul 19, 2006 6:47 PM, said:

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, Wed Jul 19, 2006 5:24 PM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users