Jump to content
IGNORED

DASM issues


Recommended Posts

So, I've been posting in the general Atari 2600 Programming forum recently, but I figured this would be more appropriate here.

 

Alright, so I've been going along with Andrew Davie's tutorial (as recommended) for the past few days, taking it piece by piece and today I sat down and I've been at it for...a good 6 hours today, I'd say.

 

The problem I've been having is that, with any of the code used in the tutorial, even with vcs.h and macro.h specifically placed with the DASM.exe binary, I've been having issues with getting a lot of undefined variables during compilation.

 

By contrast, I'm noticing that Adventure's source code (which lists all of the Atari 2600 constants at the top of the source file), compiles happily and spits out no errors.

 

I could easily just copy and paste all of the constants every time I go to assemble something, but out of practice, I figure it's a good idea to find out what's going on.

Link to comment
Share on other sites

The problem I've been having is that, with any of the code used in the tutorial, even with vcs.h and macro.h specifically placed with the DASM.exe binary, I've been having issues with getting a lot of undefined variables during compilation.

 

How are you including the files? Is DASM.EXE and your source and the *.h files all in the same directory? Have you got an ORG statement? Are you using "=" or "EQU" as label assignments?

Link to comment
Share on other sites

The problem I've been having is that, with any of the code used in the tutorial, even with vcs.h and macro.h specifically placed with the DASM.exe binary, I've been having issues with getting a lot of undefined variables during compilation.

 

How are you including the files? Is DASM.EXE and your source and the *.h files all in the same directory? Have you got an ORG statement? Are you using "=" or "EQU" as label assignments?

Same way Andrew teaches:

processor 6502

include "vcs.h"

include "macro.h"

 

Yes, my source, DASM.exe, and the .h files are all in the same directory.

 

Picture: dasmpic.png

Link to comment
Share on other sites

Have you put an ORG statement in? E.g.

 

   org $F000

Start

.. Your stuff goes here.

   org $FFFA
   .word Start ; NMI
   .word Start ; RESET
   .word Start ; IRQ

Yeah. In fact, once I tried copying the code straight out of the tutorial for the basic kernel. I figured it would be simple enough that nothing would go wrong, unlike some of the later sessions. Guess I was wrong. *shrugs*

Link to comment
Share on other sites

vcs.h and macro.h need to be placed in the current directory, not necessarily the same place as dasm.exe. If the header files are somewhere else, put them in the current directory or at least specify the directory where the header files are with the -I switch.

 

If nothing works, post the sample files you are using, as that will help us pinpoint the problem.

Link to comment
Share on other sites

Just for example, I copied and pasted the code seen here exactly after I'd had issues with about 3 iterations of my own code and I still am having issues.

 

Also, as the image above shows, I have the source, DASM.exe and the headers all in one folder for assembly.

Link to comment
Share on other sites

Well, put bluntly, it works, but it was concerning that it has references to unknown symbols and that's what I was asking about. Is that usual? (the one I mentioned gives 3, but still works correctly...well, almost correctly. I get a green bar at the top, and I wondered if that had to do with the unknown symbols)

 

Guess I'm either more tired than I thought or really didn't pay attention to the output.

Edited by johnon
Link to comment
Share on other sites

Well, put bluntly, it works, but it was concerning that it has references to unknown symbols and that's what I was asking about. Is that usual? (the one I mentioned gives 3, but still works correctly...well, almost correctly. I get a green bar at the top, and I wondered if that had to do with the unknown symbols)

 

What exactly are the errors? Can you also type DASM on its own and then tell us what version of the software it is.

Link to comment
Share on other sites

Well, put bluntly, it works, but it was concerning that it has references to unknown symbols and that's what I was asking about. Is that usual? (the one I mentioned gives 3, but still works correctly...well, almost correctly. I get a green bar at the top, and I wondered if that had to do with the unknown symbols)

 

What exactly are the errors? Can you also type DASM on its own and then tell us what version of the software it is.

 

DASM v. 2.20.11

 

The error exactly is "3 references to unknown symbols".

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