Jump to content



0

Why won't anything compile?


7 replies to this topic

#1 godzillajoe OFFLINE  

godzillajoe

    Stargunner

  • 1,971 posts
  • Location:watch city, ma

Posted Tue Mar 27, 2007 7:34 AM

OK so I typed in the source for the first kernal in the programming fo newbies guide and I'm trying to compile it

I get a million errors but everything appears to be in the right place

Directory of C:\DASM

03/27/2007 09:11 AM <DIR> .
03/27/2007 09:11 AM <DIR> ..
08/12/2005 05:20 PM <DIR> BeOS
02/19/2007 07:33 PM <DIR> bin
02/19/2007 07:33 PM <DIR> DASM
02/19/2007 07:33 PM 163,840 dasm.exe
03/27/2007 09:15 AM 1,316 first.asm
03/27/2007 09:16 AM 0 first.bin
08/12/2005 05:20 PM <DIR> Linux
02/19/2007 07:34 PM 5,747 macro.h
08/12/2005 05:29 PM <DIR> src
02/19/2007 07:34 PM 9,397 VCS.H
5 File(s) 180,300 bytes
7 Dir(s) 86,003,466,240 bytes free

C:\DASM>dasm first.asm -f3 -v5 -ofirst.bin
DASM V2.20.10, Macro Assembler ©1988-2004

START OF PASS: 1
first.asm (1): error: Unknown Mnemonic '6502'.
first.asm (2): error: Unknown Mnemonic '"vcs'.
first.asm (3): error: Unknown Mnemonic '"macro'.
first.asm (6): error: Unknown Mnemonic '$F000'.
first.asm (13): error: Unknown Mnemonic '#2'.
first.asm (14): error: Unknown Mnemonic 'VBLANK'.
first.asm (16): error: Unknown Mnemonic '#2'.
first.asm (17): error: Unknown Mnemonic 'VSYNC'.
first.asm (21): error: Unknown Mnemonic 'WSYNC'.
first.asm (22): error: Unknown Mnemonic 'WSYNC'.

etc.

It's all in the same path so what is the problem here.

Off to a flying start! :roll:

Here's what the start of the source looks like which is exactly what it is in the tutorial

processor 6502
include "vcs.h"
include "macro.h"

SEG
ORG $F000

Reset
StartOfFrame

;Start vblank processing

lda #2
sta VBLANK

lda #2
sta VSYNC

;3 scanlines of VSYNC signal

sta WSYNC
sta WSYNC
sta WSYNC

lda #0
sta VSYNC

;37 scanlines of vertical blank

sta WSYNC

So what am I not getting here?!

#2 godzillajoe OFFLINE  

godzillajoe

    Stargunner

  • 1,971 posts
  • Location:watch city, ma

Posted Tue Mar 27, 2007 9:54 AM

OK I figured out that it doesn't like instructions starting at beginning of a line.

I cut and paste the code from the Programming for Newbies section and it compiles just fine.

Is there a certain number of spaces or a tab or something DASM expects?

Like I'm not gonna have enough problems without worry about a cranky compiler

:x

Anyone recommend a good dev environment aside from crappy notepad?

I tried downloading the IDE from the DASM site but it just gives you a page not found error.

#3 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,543 posts
  • Location:Georgia, USA

Posted Tue Mar 27, 2007 11:33 AM

View Postgodzillajoe, on Tue Mar 27, 2007 11:54 AM, said:

OK I figured out that it doesn't like instructions starting at beginning of a line.

I cut and paste the code from the Programming for Newbies section and it compiles just fine.

Is there a certain number of spaces or a tab or something DASM expects?

Like I'm not gonna have enough problems without worry about a cranky compiler

:x

Anyone recommend a good dev environment aside from crappy notepad?

I tried downloading the IDE from the DASM site but it just gives you a page not found error.
Indenting 1 space is all that's required, but I personally find it unnecessarily difficult to tell the difference between the indented and non-indented lines when only 1 space is used, so I like to use at least 3 spaces.

I'm using Crimson Editor, a free IDE for Windows (http://www.crimsoneditor.com). The IDE that you saw the broken link for on the DASM web site is based on the old DOS-based EDIT.COM editor. It's actually pretty good-- it supports editing multiple files at once, search-and-replace, cut-and-paste or copy-and-paste, etc., as well as compiling from within the IDE using DASM, or running compiled games from within the IDE using z26 or Stella. It's the IDE that I was using when I first started learning to program the Atari 2600 a few years ago, and I still have a copy of it if you're really and truly interested-- but honestly, you'll probably want to use Crimson Editor instead. :)

By the way, there is a thread or pinned topic in one of the AtariAge forums that includes links for programmers, so you might want to check it out to see what other IDEs or programming tools people are using.

Michael

#4 godzillajoe OFFLINE  

godzillajoe

    Stargunner

  • 1,971 posts
  • Location:watch city, ma

Posted Tue Mar 27, 2007 1:17 PM

Thanks, I don't really need anything fancy, I just downloaded Crimson Editor and see how that works for me

#5 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,543 posts
  • Location:Georgia, USA

Posted Tue Mar 27, 2007 11:12 PM

View Postgodzillajoe, on Tue Mar 27, 2007 3:17 PM, said:

I just downloaded Crimson Editor
Oops, I just tried to check Crimson Editor's site (http://www.crimsoneditor.com) to see if a newer version is available, and the site is gone!

A quick search on Google turned up the interesting information that Crimson Editor is being replaced by Emerald Editor (http://www.emeraldeditor.com).

The bad news is, Emerald Editor isn't available yet.

The good news is, Crimson Editor is still available (http://www.emeralded....com/downloads/).

And the better news is, Emerald Editor will (eventually) be available for Windows, Linux, BSD, and Mac-OSX (whereas Crimson Editor is strictly for Windows).

Michael

#6 godzillajoe OFFLINE  

godzillajoe

    Stargunner

  • 1,971 posts
  • Location:watch city, ma

Posted Wed Mar 28, 2007 6:35 AM

The site is still there.

I downloaded it yesterday and just visited the site again now

#7 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,543 posts
  • Location:Georgia, USA

Posted Wed Mar 28, 2007 6:45 AM

View Postgodzillajoe, on Wed Mar 28, 2007 8:35 AM, said:

The site is still there.

I downloaded it yesterday and just visited the site again now
Okay, it must have been down temporarily. I tried several times to get to it last night, for nearly five minutes, and it could not be found. Anyway, it's also available at the Emerald Editor site. :)

Michael

#8 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 20,458 posts
  • Location:The land of Gorch

Posted Wed Mar 28, 2007 8:12 AM

BTW the reason you need to indent is because Dasm would misinterpret statements/instructions to be labels (address locations).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users