Jump to content
IGNORED

DASM on MacOSX


Jedd

Recommended Posts

Hey guys I'm new here and started reading Andrew's tutorials yesterday. I have some experience with programming, but this is all still pretty hard for me, but I'm getting it. Great job with the tutorials man!

 

Anyway, I'm having trouble getting DASM set up on my Mac. A few months ago I switched from a PC to a Mac and I'm having trouble figuring out how I can set up DASM to actually assemble. In fact, I'm not even sure where to start.

 

Here's where I'm at: I've downloaded and unzipped both DASM and the header .h files. I have no idea where they should be, but right now both folders are on the desktop, seperate from eachother. When I try to run DASM under DASM->bin->Mac->OSX->DASM, it opens in a program called "Terminal" which I didnt even know I had. It promts me with this:


Last login: (date) on ttyp1

Welcome to Darwin!

[Jedd-Gobles-Computer:~] jeddgobl% []

(date) is today's date and the [] is actually a solid rectangle.

 

Am I doing something wrong? Do I need to open the asm files outside of the program? I've copied and pasted the kernal code on Andrew's tutorial and saved it as kernal.asm. What do I do now? Please help, I'm really confused and I'm still trying to figure out this darn Mac.[/code]

Link to comment
Share on other sites

When you double click on DASM what it's running is called a shell. DASM is meant to be used via this shell. To interact with DASM through the shell you have to type various shell commands.

 

For instance, try typing 'echo $SHELL' followed by a return.

The output will probably be /bin/tcsh. /bin/tcsh is the name of the shell program with which you're interacting.

 

In order to invoke DASM from the shell, you probably want to pop yourself into the directory in which DASM lives. You'll need to learn some basic shell commands in order to do this. man, pwd, cd are some of the first you might want to look into. ('man x' will give you the manual page for command x .. eg "man pwd" will tell you about pwd. man pages are unfortunately usually totally unhelpful ... you probably want to look to the web or a book to get started with shells). When you get to the directory in which the DASM MacosX binary as well as the .asm file you want to assemble, you'll invoke DASM from the command line like you invoked cd and the other commands, only this time with a './' in front, like this "./DASM" ..

 

The reason for that gets into default paths and stuff which you might also want to look up.

 

Additionally, if you copied and pasted the code and then saved it as x.asm, there's a likelihood it won't work when you get to the point where you invoke DASM for that file. This is because copy and paste is, by default, annoyingly "smart" and it remembers formatting. If you open your .asm file in SimpleText it might look just fine, but when you're on the command line if you look at it with programs called emacs, vi, or cat it'll look all messed up. I get around this default "feature" by pasting into TextWrangler or the free SubEthaEdit. You could also "paste unformatted" into MsWord and save as plain text.

 

good luck!

Link to comment
Share on other sites

:) :) :)

 

Thanks so much! You got me going on the right track. I guess "terminal" is like the Mac version of DOS prompt. It's taking some getting used to, there is no "cd" like in Dos. I'll tell you once I get this thing to work. Thanks again man!

Link to comment
Share on other sites

:)  :)  :)  

 

Thanks so much!  You got me going on the right track.  I guess "terminal" is like the Mac version of DOS prompt.  It's taking some getting used to, there is no "cd" like in Dos.  I'll tell you once I get this thing to work.  Thanks again man!

 

There is a "cd" command like in DOS, but because the file structure in OS X (and Unix-like operating systems in general) is setup differently, it takes some getting used to if you're not familiar with it. If you open a shell in OS X, you are deposited in your home directory. You can use "pwd" to "print working directory", which will show you what directory you are currently in. Your user directory will be under "/Users/name", where "name" is the short name you gave to OS X when setting up your account (if you are the only user on your machine, you were prompted for this when setting up the OS).

 

Drives are not assigned letters like in Windows, but are connected under the "Volumes" directory, located at the root of your file system. You can type "cd /volumes" and then "ls" to see what drives are mounted on your system. This list will contain not just hard drives, but optical media (CDs / DVDs), USB-filesystems (like compact flash cards), connected network drives, and so forth. To get back to your home directory at any time, just type "cd" by itself.

 

..Al

Link to comment
Share on other sites

Ok I figured out a lot about terminal. Al was right, you can use cd. But I still can't get it to assemble anything! I've tried just about everything. I even tried the test files included with Dasm. There is something in the Terminal Preferences that allows me to switch to another shell. I tried doing that but it doesn't seem to be any different. Also, I tried typing ./dasm and ./kernal and a whole bunch of other stuff, but everytime I do, it gives me but every time it gives me:

 

tcsh: ./demo: Permission denied.

 

Any clue why?

 

Btw, isn't ther some sort of an application where I can open it, choose the file I want, and it will assemble for me? Makes a lot more sense if you ask me.

Link to comment
Share on other sites

With more specifics regarding exactly which directory you are in I could help you better, but here's one thing that might be going wrong:

 

in the DASM directory structure on my machine there's a demo.asm file:


peapod:~/ataridev/DASM/test amw$ pwd

/Users/amw/ataridev/DASM/test

peapod:~/ataridev/DASM/test amw$ ls

demo.asm        example.asm     locals.asm      suite6303.asm   suite6502.asm   suite68705.asm  suite68HC11.asm

 

The ~ is a short form to indicate my home directory.

 

If I go to that directory (~/ataridev/DASM/test) and type ./demo.asm I see your error:


peapod:~/ataridev/DASM/test amw$ ./demo.asm

-bash: ./demo.asm: Permission denied

 

I don't know if your permissions error is due to a scenario like the above, but in case it is I'll explain why it's not working --

 

First, demo.asm is a text file, not an executable program. typing its name or ./demo.asm tells the shell to try to execute that file, but since this is just a text file your shell has no idea what to do with it.

 

What you need to do is invoke DASM using demo.asm as an input. DASM will produce a binary for you. In order to see the demo run you'll need to install a program called Stella, which thankfully works from the GUI .. all you'll need to to is go to Open and select the DASM output file and it'll run.

 

When I assemble code I do it from the directory in which the executable dasm lives. You don't necessarily have to do it that way, but this method works fine for me and it keeps things simple. So, when I want to assemble a .asm file, I go here:


peapod:~/ataridev/DASM/bin/Mac/OSX amw$ pwd

/Users/amw/ataridev/DASM/bin/Mac/OSX

peapod:~/ataridev/DASM/bin/Mac/OSX amw$ ls

#kernel.asm#    VCS.H           ftohex          kernel.bin      macro.h

README.txt      dasm            kernel.asm      kernel.txt

 

From here I can invoke the assembler by typing ./dasm

 


peapod:~/ataridev/DASM/bin/Mac/OSX amw$ ./dasm 

redistributable for non-profit only



DASM sourcefile [options]

-f#      output format

-oname   output file

-lname   list file

-Lname   list file, containing all passes

-sname   symbol dump

-v#      verboseness

-t#      Symbol Table sorting preference (#1 = by address.  default #0 = alphabetic)

-Dname=exp   define label

-Mname=exp   define label as in EQM

-Idir    search directory for include and incbin

-p#      max number of passes

-P#      max number of passes, with less checks

Fatal assembly error: Check command-line format.

peapod:~/ataridev/DASM/bin/Mac/OSX amw$ 

 

Let's say I want to assemble kernel.asm. First, I make sure it's in the same directory as the dasm binary :


peapod:~/ataridev/DASM/bin/Mac/OSX amw$ pwd

/Users/amw/ataridev/DASM/bin/Mac/OSX

peapod:~/ataridev/DASM/bin/Mac/OSX amw$ ls

#kernel.asm#    README.txt      VCS.H           dasm            ftohex          kernel.asm      macro.h

peapod:~/ataridev/DASM/bin/Mac/OSX amw$ 

 

Then I invoke dasm :


peapod:~/ataridev/DASM/bin/Mac/OSX amw$ ./dasm kernel.asm -f3 -v5 -okernel.bin

 

Here's what happens :

 


peapod:~/ataridev/DASM/bin/Mac/OSX amw$ ./dasm kernel.asm -f3 -v5 -okernel.bin

DASM V2.20.07, Macro Assembler (C)1988-2003



START OF PASS: 1



----------------------------------------------------------------------

SEGMENT NAME                 INIT PC  INIT RPC FINAL PC FINAL RPC

                                     0000 ????                       0000 ????             

RIOT                     [u]          0000 ????                       0000 ????             

TIA_REGISTERS_READ       [u]          0000 ????                       0000 ????             

TIA_REGISTERS_WRITE      [u]          0000 ????                       0000 ????             

INITIAL CODE SEGMENT                  0000 ????                       0000 ????             

----------------------------------------------------------------------

3 references to unknown symbols.

0 events requiring another assembler pass.



--- Symbol List (sorted by symbol)

AUDC0                    0015                  

AUDC1                    0016                  

AUDF0                    0017                  

AUDF1                    0018                  

AUDV0                    0019                  

AUDV1                    001a                  

COLUBK                   0009              (R )

COLUP0                   0006                  

COLUP1                   0007                  

COLUPF                   0008                  

CTRLPF                   000a                  

CXBLPF                   0006                  

CXCLR                    002c                  

CXM0FB                   0004                  

CXM0P                    0000                  

CXM1FB                   0005                  

CXM1P                    0001                  

CXP0FB                   0002                  

CXP1FB                   0003                  

CXPPMM                   0007                  

ENABL                    001f                  

ENAM0                    001d                  

ENAM1                    001e                  

GRP0                     001b                  

GRP1                     001c                  

HMBL                     0024                  

HMCLR                    002b                  

HMM0                     0022                  

HMM1                     0023                  

HMOVE                    002a                  

HMP0                     0020                  

HMP1                     0021                  

INPT0                    0008                  

INPT1                    0009                  

INPT2                    000a                  

INPT3                    000b                  

INPT4                    000c                  

INPT5                    000d                  

INTIM                    0284                  

NUSIZ0                   0004                  

NUSIZ1                   0005                  

PF0                      000d                  

PF1                      000e                  

PF2                      000f                  

REFP0                    000b                  

REFP1                    000c                  

RESBL                    0014                  

Reset                    f000              (R )

RESM0                    0012                  

RESM1                    0013                  

RESMP0                   0028                  

RESMP1                   0029                  

RESP0                    0010                  

RESP1                    0011                  

RSYNC                    0003                  

StartOfFrame             f000              (R )

SWACNT                   0281                  

SWBCNT                   0283                  

SWCHA                    0280                  

SWCHB                    0282                  

T1024T                   0297                  

TIA_BASE_ADDRESS         0000              (R )

TIA_BASE_READ_ADDRESS    0000              (R )

TIA_BASE_WRITE_ADDRESS   0000              (R )

TIM1T                    0294                  

TIM64T                   0296                  

TIM8T                    0295                  

TIMINT                   0285                  

VBLANK                   0001              (R )

VDELBL                   0027                  

VDELP0                   0025                  

VDELP1                   0026                  

VERSION_MACRO            0069                  

VERSION_VCS              0069                  

VSYNC                    0000              (R )

WSYNC                    0002              (R )

--- End of Symbol List.

Complete.

peapod:~/ataridev/DASM/bin/Mac/OSX amw$ ls

#kernel.asm#    VCS.H           demo.asm        kernel.asm      macro.h

README.txt      dasm            ftohex          kernel.bin

peapod:~/ataridev/DASM/bin/Mac/OSX amw$ 

 

Note that now there's a kernel.bin file in my directory -- that's what the -o option in the command invoking dasm specified.

 

Now I can run my Stella emulator and using the regular Mac GUI tell it to open the kernel.bin final --- and that's where you get to see the fruits of your programming labor.

 

Incidentally, right after I assembled the kernel above I copied demo.asm into my dasm directory and tried to assemble it .... it didn't work and I haven't looked into why yet. Here's what dasm said as it barfed:

 


peapod:~/ataridev/DASM/bin/Mac/OSX amw$ ./dasm demo.asm -f3 -v5 -odemo.bin

DASM V2.20.07, Macro Assembler (C)1988-2003



START OF PASS: 1

segment: code 0000 ????               vs current org: 0005

demo.asm (46): error: Origin Reverse-indexed.

Aborting assembly

Link to comment
Share on other sites

Man thanks so much for all your help and the awesome description. But I'm still stuck. :(

 

Here's the problem:

Jedd-Gobles-Computer:/dasmfolder/bin/mac/osx jeddgoble$ ls

README.txt      dasm            kernal.asm

VCS.H           ftohex          macro.h

Jedd-Gobles-Computer:/dasmfolder/bin/mac/osx jeddgoble$ ./dasm

-bash: ./dasm: Permission denied

Jedd-Gobles-Computer:/dasmfolder/bin/mac/osx jeddgoble$ You suck computer!!!

I have no clue why. I did the same thing as you. Maybe the dasm I have isn't good?

Oh and btw I have stella and it works fine on my computer, so once I generate some .bin's I can get them tested and running.

Thanks again for all your help.

Link to comment
Share on other sites

What is the output if you run "ls -la" in the dasm directory?

 


peapod:~/ataridev/DASM/bin/Mac/OSX amw$ ls -la

total 496

-rw-r--r--   1 amw  staff    3704  1 Feb 19:09 #kernel.asm#

drwxrwxrwx  14 amw  staff     476  3 Apr 20:23 .

drwxrwxrwx   7 amw  staff     238 31 Jan 16:33 ..

-rw-rw-rw-   1 amw  staff    6148 30 Mar 00:06 .DS_Store

-rw-------   1 amw  staff     631  1 Feb 12:06 .gdb_history

-rw-rw-rw-   1 amw  staff     101 19 Jul  2003 README.txt

-rw-rw-rw-   1 amw  staff    9397 14 Nov 22:17 VCS.H

-rwxrwxrwx   1 amw  staff  173556  1 Feb 11:54 dasm

-rw-r--r--   1 amw  staff     656  3 Apr 20:10 demo.asm

-rw-r--r--   1 amw  staff       5  3 Apr 20:23 demo.bin

-rwxrwxrwx   1 amw  staff   16160 18 Jul  2003 ftohex

-rw-r--r--   1 amw  staff    2906  3 Apr 20:11 kernel.asm

-rw-r--r--   1 amw  staff    4096  3 Apr 20:12 kernel.bin

-rw-rw-rw-   1 amw  staff    5317 14 Nov 22:23 macro.h

 

See how the dasm program says -rwxrwxrwx? Those x flags mark dasm as being an executable program. If the x flags are turned off you'll see the permissions error you're experiencing when you try to execute dasm. Again I don't know if this is your problem but it's another way to get the error message you're fighting with.

 

If your dasm program doesn't have its execute bit set appropriately you can fix that by typing "chmod ugo+x dasm"

Also you can "man chmod" to see exactly what that command does.

 

hope this helps and best of luck

Link to comment
Share on other sites

Last login: Sun Apr  4 15:16:24 on ttyp1

Welcome to Darwin!

[Jedd-Gobles-Computer:~] jeddgobl% cd /dasmfolder/bin/mac/osx

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ls -la

total 304

drwxrwxrwx  9 jeddgobl  staff    306  4 Apr 15:01 .

drwxrwxrwx  7 jeddgobl  staff    238 31 Mar 16:17 ..

-rw-rw-rw-  1 jeddgobl  staff   6148  4 Apr 15:32 .DS_Store

-rw-rw-rw-  1 jeddgobl  staff    101 19 Jul  2003 README.txt

-rw-rw-rw-  1 jeddgobl  staff   9397 14 Nov 22:17 VCS.H

-rw-rw-rw-  1 jeddgobl  staff  98932 18 Jul  2003 dasm

-rw-rw-rw-  1 jeddgobl  staff  16160 18 Jul  2003 ftohex

-rw-r--r--  1 jeddgobl  staff   2939 31 Mar 15:25 kernal.asm

-rw-rw-rw-  1 jeddgobl  staff   5317 14 Nov 22:23 macro.h

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% man chmod

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% chmod ugo+x dasm

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ls -la

total 304

drwxrwxrwx  9 jeddgobl  staff    306  4 Apr 15:01 .

drwxrwxrwx  7 jeddgobl  staff    238 31 Mar 16:17 ..

-rw-rw-rw-  1 jeddgobl  staff   6148  4 Apr 15:32 .DS_Store

-rw-rw-rw-  1 jeddgobl  staff    101 19 Jul  2003 README.txt

-rw-rw-rw-  1 jeddgobl  staff   9397 14 Nov 22:17 VCS.H

-rwxrwxrwx  1 jeddgobl  staff  98932 18 Jul  2003 dasm

-rw-rw-rw-  1 jeddgobl  staff  16160 18 Jul  2003 ftohex

-rw-r--r--  1 jeddgobl  staff   2939 31 Mar 15:25 kernal.asm

-rw-rw-rw-  1 jeddgobl  staff   5317 14 Nov 22:23 macro.h

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ./dasm

redistributable for non-profit only



DASM sourcefile [options]

-f#      output format

-oname   output file

-lname   list file

-Lname   list file, containing all passes

-sname   symbol dump

-v#      verboseness

-t#      Symbol Table sorting preference (#1 = by address.  default #0 = alphabetic)

-Dname=exp   define label

-Mname=exp   define label as in EQM

-Idir    search directory for include and incbin

-p#      max number of passes

-P#      max number of passes, with less checks

Fatal assembly error: Check command-line format.

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl%

I think I'm getting closer. What does that error at the end mean?

Link to comment
Share on other sites

Here's what happens when I try to assemble the code:

 

Last login: Sun Apr  4 16:18:16 on ttyp1

Welcome to Darwin!

[Jedd-Gobles-Computer:~] jeddgobl% cd /dasm

[Jedd-Gobles-Computer:/dasm] jeddgobl% ls

Machines        Web             doc             test

README.txt      bin             src

[Jedd-Gobles-Computer:/dasm] jeddgobl% cd /dasm/bin/mac/osx

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ls

README.txt      dasm            kernal.asm

VCS.H           ftohex          macro.h

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ./dasm

tcsh: ./dasm: Permission denied.

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ls -la

total 304

drwxrwxrwx  9 jeddgobl  staff    306  4 Apr 16:33 .

drwxrwxrwx  7 jeddgobl  staff    238  4 Apr 16:33 ..

-rw-rw-rw-  1 jeddgobl  staff   6148  4 Apr 16:34 .DS_Store

-rw-rw-rw-  1 jeddgobl  staff    101 18 Jul  2003 README.txt

-rw-rw-rw-  1 jeddgobl  staff   9397 14 Nov 21:17 VCS.H

-rw-rw-rw-  1 jeddgobl  staff  98932 18 Jul  2003 dasm

-rw-rw-rw-  1 jeddgobl  staff  16160 18 Jul  2003 ftohex

-rw-r--r--  1 jeddgobl  staff   3046  4 Apr 16:33 kernal.asm

-rw-rw-rw-  1 jeddgobl  staff   5317 14 Nov 21:23 macro.h

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% chmod ugo+x dasm

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ls

README.txt      dasm            kernal.asm

VCS.H           ftohex          macro.h

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ls -la

total 304

drwxrwxrwx  9 jeddgobl  staff    306  4 Apr 16:33 .

drwxrwxrwx  7 jeddgobl  staff    238  4 Apr 16:33 ..

-rw-rw-rw-  1 jeddgobl  staff   6148  4 Apr 16:34 .DS_Store

-rw-rw-rw-  1 jeddgobl  staff    101 18 Jul  2003 README.txt

-rw-rw-rw-  1 jeddgobl  staff   9397 14 Nov 21:17 VCS.H

-rwxrwxrwx  1 jeddgobl  staff  98932 18 Jul  2003 dasm

-rw-rw-rw-  1 jeddgobl  staff  16160 18 Jul  2003 ftohex

-rw-r--r--  1 jeddgobl  staff   3046  4 Apr 16:33 kernal.asm

-rw-rw-rw-  1 jeddgobl  staff   5317 14 Nov 21:23 macro.h

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ./dasm

redistributable for non-profit only



DASM sourcefile [options]

-f#      output format

-oname   output file

-lname   list file

-Lname   list file, containing all passes

-sname   symbol dump

-v#      verboseness

-t#      Symbol Table sorting preference (#1 = by address.  default #0 = alphabetic)

-Dname=exp   define label

-Mname=exp   define label as in EQM

-Idir    search directory for include and incbin

-p#      max number of passes

-P#      max number of passes, with less checks

Fatal assembly error: Check command-line format.

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ./dasm kernal.asm -f3 -v5 -okernal.bin

DASM V2.20.07, Macro Assembler (C)1988-2003



START OF PASS: 1

kernal.asm (1): error: Unknown Mnemonic '?'.

kernal.asm (2): error: Unknown Mnemonic '?'.

kernal.asm (3): error: Unknown Mnemonic '?'.

kernal.asm (5): error: Unknown Mnemonic '?'.

kernal.asm (6): error: Unknown Mnemonic '?'.

kernal.asm (8): error: Unknown Mnemonic 'Reset'.

kernal.asm (9): error: Unknown Mnemonic 'StartOfFrame'.

kernal.asm (11): error: Unknown Mnemonic '?'.

kernal.asm (13): error: Unknown Mnemonic '?'.

kernal.asm (14): error: Unknown Mnemonic '?'.

kernal.asm (16): error: Unknown Mnemonic '?'.

kernal.asm (17): error: Unknown Mnemonic '?'.

kernal.asm (18): error: Unknown Mnemonic '?'.

kernal.asm (19): error: Unknown Mnemonic '?'.

kernal.asm (21): error: Unknown Mnemonic '?'.

kernal.asm (22): error: Unknown Mnemonic '?'.

kernal.asm (23): error: Unknown Mnemonic '?'.

kernal.asm (25): error: Unknown Mnemonic '?'.

kernal.asm (26): error: Unknown Mnemonic '?'.

kernal.asm (28): error: Unknown Mnemonic '?'.

kernal.asm (30): error: Unknown Mnemonic '?'.

kernal.asm (31): error: Unknown Mnemonic '?'.

kernal.asm (32): error: Unknown Mnemonic '?'.

kernal.asm (33): error: Unknown Mnemonic '?'.

kernal.asm (34): error: Unknown Mnemonic '?'.

kernal.asm (35): error: Unknown Mnemonic '?'.

kernal.asm (36): error: Unknown Mnemonic '?'.

kernal.asm (37): error: Unknown Mnemonic '?'.

kernal.asm (38): error: Unknown Mnemonic '?'.

kernal.asm (39): error: Unknown Mnemonic '?'.

kernal.asm (40): error: Unknown Mnemonic '?'.

kernal.asm (41): error: Unknown Mnemonic '?'.

kernal.asm (42): error: Unknown Mnemonic '?'.

kernal.asm (43): error: Unknown Mnemonic '?'.

kernal.asm (44): error: Unknown Mnemonic '?'.

kernal.asm (45): error: Unknown Mnemonic '?'.

kernal.asm (46): error: Unknown Mnemonic '?'.

kernal.asm (47): error: Unknown Mnemonic '?'.

kernal.asm (48): error: Unknown Mnemonic '?'.

kernal.asm (49): error: Unknown Mnemonic '?'.

kernal.asm (50): error: Unknown Mnemonic '?'.

kernal.asm (51): error: Unknown Mnemonic '?'.

kernal.asm (52): error: Unknown Mnemonic '?'.

kernal.asm (53): error: Unknown Mnemonic '?'.

kernal.asm (54): error: Unknown Mnemonic '?'.

kernal.asm (55): error: Unknown Mnemonic '?'.

kernal.asm (56): error: Unknown Mnemonic '?'.

kernal.asm (57): error: Unknown Mnemonic '?'.

kernal.asm (58): error: Unknown Mnemonic '?'.

kernal.asm (59): error: Unknown Mnemonic '?'.

kernal.asm (60): error: Unknown Mnemonic '?'.

kernal.asm (61): error: Unknown Mnemonic '?'.

kernal.asm (62): error: Unknown Mnemonic '?'.

kernal.asm (63): error: Unknown Mnemonic '?'.

kernal.asm (64): error: Unknown Mnemonic '?'.

kernal.asm (65): error: Unknown Mnemonic '?'.

kernal.asm (66): error: Unknown Mnemonic '?'.

kernal.asm (67): error: Unknown Mnemonic '?'.

kernal.asm (70): error: Unknown Mnemonic '?'.

kernal.asm (72): error: Unknown Mnemonic '?'.

kernal.asm (73): error: Unknown Mnemonic '?'.

kernal.asm (75): error: Unknown Mnemonic '?'.

kernal.asm (76): error: Unknown Mnemonic '?'.

kernal.asm (77): error: Unknown Mnemonic '?'.

kernal.asm (79): error: Unknown Mnemonic '?'.

kernal.asm (82): error: Unknown Mnemonic '?'.

kernal.asm (83): error: Unknown Mnemonic '?'.

kernal.asm (85): error: Unknown Mnemonic '?'.

kernal.asm (87): error: Unknown Mnemonic '?'.

kernal.asm (88): error: Unknown Mnemonic '?'.

kernal.asm (89): error: Unknown Mnemonic '?'.

kernal.asm (90): error: Unknown Mnemonic '?'.

kernal.asm (91): error: Unknown Mnemonic '?'.

kernal.asm (92): error: Unknown Mnemonic '?'.

kernal.asm (93): error: Unknown Mnemonic '?'.

kernal.asm (94): error: Unknown Mnemonic '?'.

kernal.asm (95): error: Unknown Mnemonic '?'.

kernal.asm (96): error: Unknown Mnemonic '?'.

kernal.asm (97): error: Unknown Mnemonic '?'.

kernal.asm (98): error: Unknown Mnemonic '?'.

kernal.asm (99): error: Unknown Mnemonic '?'.

kernal.asm (100): error: Unknown Mnemonic '?'.

kernal.asm (101): error: Unknown Mnemonic '?'.

kernal.asm (102): error: Unknown Mnemonic '?'.

kernal.asm (103): error: Unknown Mnemonic '?'.

kernal.asm (104): error: Unknown Mnemonic '?'.

kernal.asm (105): error: Unknown Mnemonic '?'.

kernal.asm (106): error: Unknown Mnemonic '?'.

kernal.asm (107): error: Unknown Mnemonic '?'.

kernal.asm (108): error: Unknown Mnemonic '?'.

kernal.asm (109): error: Unknown Mnemonic '?'.

kernal.asm (110): error: Unknown Mnemonic '?'.

kernal.asm (111): error: Unknown Mnemonic '?'.

kernal.asm (112): error: Unknown Mnemonic '?'.

kernal.asm (113): error: Unknown Mnemonic '?'.

kernal.asm (114): error: Unknown Mnemonic '?'.

kernal.asm (115): error: Unknown Mnemonic '?'.

kernal.asm (116): error: Unknown Mnemonic '?'.

kernal.asm (118): error: Unknown Mnemonic '?'.

kernal.asm (121): error: Unknown Mnemonic '?'.

kernal.asm (123): error: Unknown Mnemonic '?'.

kernal.asm (124): error: Unknown Mnemonic '?'.

kernal.asm (125): error: Unknown Mnemonic '?'.

kernal.asm (127): error: Unknown Mnemonic '?'.



----------------------------------------------------------------------

SEGMENT NAME                 INIT PC  INIT RPC FINAL PC FINAL RPC

INITIAL CODE SEGMENT                  0000 ????                       0000 ????             

----------------------------------------------------------------------

0 references to unknown symbols.

0 events requiring another assembler pass.



--- Symbol List (sorted by symbol)

--- End of Symbol List.

Complete.

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% 



 

Edit: Sorry about the double post...and the really long code.

Link to comment
Share on other sites

Here's what happens when I try to assemble the code:

 

Last login: Sun Apr  4 16:18:16 on ttyp1

Welcome to Darwin!

[Jedd-Gobles-Computer:~] jeddgobl% cd /dasm

[Jedd-Gobles-Computer:/dasm] jeddgobl% ls

Machines        Web             doc             test

README.txt      bin             src

[Jedd-Gobles-Computer:/dasm] jeddgobl% cd /dasm/bin/mac/osx

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ls

README.txt      dasm            kernal.asm

VCS.H           ftohex          macro.h

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ./dasm

tcsh: ./dasm: Permission denied.

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ls -la

total 304

drwxrwxrwx  9 jeddgobl  staff    306  4 Apr 16:33 .

drwxrwxrwx  7 jeddgobl  staff    238  4 Apr 16:33 ..

-rw-rw-rw-  1 jeddgobl  staff   6148  4 Apr 16:34 .DS_Store

-rw-rw-rw-  1 jeddgobl  staff    101 18 Jul  2003 README.txt

-rw-rw-rw-  1 jeddgobl  staff   9397 14 Nov 21:17 VCS.H

-rw-rw-rw-  1 jeddgobl  staff  98932 18 Jul  2003 dasm

-rw-rw-rw-  1 jeddgobl  staff  16160 18 Jul  2003 ftohex

-rw-r--r--  1 jeddgobl  staff   3046  4 Apr 16:33 kernal.asm

-rw-rw-rw-  1 jeddgobl  staff   5317 14 Nov 21:23 macro.h

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% chmod ugo+x dasm

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ls

README.txt      dasm            kernal.asm

VCS.H           ftohex          macro.h

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ls -la

total 304

drwxrwxrwx  9 jeddgobl  staff    306  4 Apr 16:33 .

drwxrwxrwx  7 jeddgobl  staff    238  4 Apr 16:33 ..

-rw-rw-rw-  1 jeddgobl  staff   6148  4 Apr 16:34 .DS_Store

-rw-rw-rw-  1 jeddgobl  staff    101 18 Jul  2003 README.txt

-rw-rw-rw-  1 jeddgobl  staff   9397 14 Nov 21:17 VCS.H

-rwxrwxrwx  1 jeddgobl  staff  98932 18 Jul  2003 dasm

-rw-rw-rw-  1 jeddgobl  staff  16160 18 Jul  2003 ftohex

-rw-r--r--  1 jeddgobl  staff   3046  4 Apr 16:33 kernal.asm

-rw-rw-rw-  1 jeddgobl  staff   5317 14 Nov 21:23 macro.h

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ./dasm

redistributable for non-profit only



DASM sourcefile [options]

-f#      output format

-oname   output file

-lname   list file

-Lname   list file, containing all passes

-sname   symbol dump

-v#      verboseness

-t#      Symbol Table sorting preference (#1 = by address.  default #0 = alphabetic)

-Dname=exp   define label

-Mname=exp   define label as in EQM

-Idir    search directory for include and incbin

-p#      max number of passes

-P#      max number of passes, with less checks

Fatal assembly error: Check command-line format.

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ./dasm kernal.asm -f3 -v5 -okernal.bin

DASM V2.20.07, Macro Assembler (C)1988-2003



START OF PASS: 1

kernal.asm (1): error: Unknown Mnemonic '?'.

kernal.asm (2): error: Unknown Mnemonic '?'.

kernal.asm (3): error: Unknown Mnemonic '?'.

kernal.asm (5): error: Unknown Mnemonic '?'.

kernal.asm (6): error: Unknown Mnemonic '?'.

kernal.asm (8): error: Unknown Mnemonic 'Reset'.

kernal.asm (9): error: Unknown Mnemonic 'StartOfFrame'.

kernal.asm (11): error: Unknown Mnemonic '?'.

kernal.asm (13): error: Unknown Mnemonic '?'.

kernal.asm (14): error: Unknown Mnemonic '?'.

kernal.asm (16): error: Unknown Mnemonic '?'.

kernal.asm (17): error: Unknown Mnemonic '?'.

kernal.asm (18): error: Unknown Mnemonic '?'.

kernal.asm (19): error: Unknown Mnemonic '?'.

kernal.asm (21): error: Unknown Mnemonic '?'.

kernal.asm (22): error: Unknown Mnemonic '?'.

kernal.asm (23): error: Unknown Mnemonic '?'.

kernal.asm (25): error: Unknown Mnemonic '?'.

kernal.asm (26): error: Unknown Mnemonic '?'.

kernal.asm (28): error: Unknown Mnemonic '?'.

kernal.asm (30): error: Unknown Mnemonic '?'.

kernal.asm (31): error: Unknown Mnemonic '?'.

kernal.asm (32): error: Unknown Mnemonic '?'.

kernal.asm (33): error: Unknown Mnemonic '?'.

kernal.asm (34): error: Unknown Mnemonic '?'.

kernal.asm (35): error: Unknown Mnemonic '?'.

kernal.asm (36): error: Unknown Mnemonic '?'.

kernal.asm (37): error: Unknown Mnemonic '?'.

kernal.asm (38): error: Unknown Mnemonic '?'.

kernal.asm (39): error: Unknown Mnemonic '?'.

kernal.asm (40): error: Unknown Mnemonic '?'.

kernal.asm (41): error: Unknown Mnemonic '?'.

kernal.asm (42): error: Unknown Mnemonic '?'.

kernal.asm (43): error: Unknown Mnemonic '?'.

kernal.asm (44): error: Unknown Mnemonic '?'.

kernal.asm (45): error: Unknown Mnemonic '?'.

kernal.asm (46): error: Unknown Mnemonic '?'.

kernal.asm (47): error: Unknown Mnemonic '?'.

kernal.asm (48): error: Unknown Mnemonic '?'.

kernal.asm (49): error: Unknown Mnemonic '?'.

kernal.asm (50): error: Unknown Mnemonic '?'.

kernal.asm (51): error: Unknown Mnemonic '?'.

kernal.asm (52): error: Unknown Mnemonic '?'.

kernal.asm (53): error: Unknown Mnemonic '?'.

kernal.asm (54): error: Unknown Mnemonic '?'.

kernal.asm (55): error: Unknown Mnemonic '?'.

kernal.asm (56): error: Unknown Mnemonic '?'.

kernal.asm (57): error: Unknown Mnemonic '?'.

kernal.asm (58): error: Unknown Mnemonic '?'.

kernal.asm (59): error: Unknown Mnemonic '?'.

kernal.asm (60): error: Unknown Mnemonic '?'.

kernal.asm (61): error: Unknown Mnemonic '?'.

kernal.asm (62): error: Unknown Mnemonic '?'.

kernal.asm (63): error: Unknown Mnemonic '?'.

kernal.asm (64): error: Unknown Mnemonic '?'.

kernal.asm (65): error: Unknown Mnemonic '?'.

kernal.asm (66): error: Unknown Mnemonic '?'.

kernal.asm (67): error: Unknown Mnemonic '?'.

kernal.asm (70): error: Unknown Mnemonic '?'.

kernal.asm (72): error: Unknown Mnemonic '?'.

kernal.asm (73): error: Unknown Mnemonic '?'.

kernal.asm (75): error: Unknown Mnemonic '?'.

kernal.asm (76): error: Unknown Mnemonic '?'.

kernal.asm (77): error: Unknown Mnemonic '?'.

kernal.asm (79): error: Unknown Mnemonic '?'.

kernal.asm (82): error: Unknown Mnemonic '?'.

kernal.asm (83): error: Unknown Mnemonic '?'.

kernal.asm (85): error: Unknown Mnemonic '?'.

kernal.asm (87): error: Unknown Mnemonic '?'.

kernal.asm (88): error: Unknown Mnemonic '?'.

kernal.asm (89): error: Unknown Mnemonic '?'.

kernal.asm (90): error: Unknown Mnemonic '?'.

kernal.asm (91): error: Unknown Mnemonic '?'.

kernal.asm (92): error: Unknown Mnemonic '?'.

kernal.asm (93): error: Unknown Mnemonic '?'.

kernal.asm (94): error: Unknown Mnemonic '?'.

kernal.asm (95): error: Unknown Mnemonic '?'.

kernal.asm (96): error: Unknown Mnemonic '?'.

kernal.asm (97): error: Unknown Mnemonic '?'.

kernal.asm (98): error: Unknown Mnemonic '?'.

kernal.asm (99): error: Unknown Mnemonic '?'.

kernal.asm (100): error: Unknown Mnemonic '?'.

kernal.asm (101): error: Unknown Mnemonic '?'.

kernal.asm (102): error: Unknown Mnemonic '?'.

kernal.asm (103): error: Unknown Mnemonic '?'.

kernal.asm (104): error: Unknown Mnemonic '?'.

kernal.asm (105): error: Unknown Mnemonic '?'.

kernal.asm (106): error: Unknown Mnemonic '?'.

kernal.asm (107): error: Unknown Mnemonic '?'.

kernal.asm (108): error: Unknown Mnemonic '?'.

kernal.asm (109): error: Unknown Mnemonic '?'.

kernal.asm (110): error: Unknown Mnemonic '?'.

kernal.asm (111): error: Unknown Mnemonic '?'.

kernal.asm (112): error: Unknown Mnemonic '?'.

kernal.asm (113): error: Unknown Mnemonic '?'.

kernal.asm (114): error: Unknown Mnemonic '?'.

kernal.asm (115): error: Unknown Mnemonic '?'.

kernal.asm (116): error: Unknown Mnemonic '?'.

kernal.asm (118): error: Unknown Mnemonic '?'.

kernal.asm (121): error: Unknown Mnemonic '?'.

kernal.asm (123): error: Unknown Mnemonic '?'.

kernal.asm (124): error: Unknown Mnemonic '?'.

kernal.asm (125): error: Unknown Mnemonic '?'.

kernal.asm (127): error: Unknown Mnemonic '?'.



----------------------------------------------------------------------

SEGMENT NAME                 INIT PC  INIT RPC FINAL PC FINAL RPC

INITIAL CODE SEGMENT                  0000 ????                       0000 ????             

----------------------------------------------------------------------

0 references to unknown symbols.

0 events requiring another assembler pass.



--- Symbol List (sorted by symbol)

--- End of Symbol List.

Complete.

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% 



 

Edit: Sorry about the double post...and the really long code.

 

 

You're getting there. This looks like errors in the actual source code. Is ' processor 6502' at the top of the file? How about you post it here (and whitespace/spaces are VERY important, so get the formatting exactly right in your post) and we can have a quick look at it.

 

Cheers

A

Link to comment
Share on other sites

That's exactly how it is on my computer, and "processor 6502" is nowhere to be found in the code. I'll try to assemble the examples and stuff. Like most programming languages, I'm sure fooling around with this is one of the best ways to learn. :)

 

YAY!!!! Ok I got example.asm to assemble!

 

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl% ./dasm example.asm -f3 -v5 -oexample.bin

DASM V2.20.07, Macro Assembler (C)1988-2003



START OF PASS: 1



----------------------------------------------------------------------

SEGMENT NAME                 INIT PC  INIT RPC FINAL PC FINAL RPC

vector                                0000 ????                       0000 ????             

code                                  0000 ????                       0000 ????             

data                     [u]          0000 ????                       0000 ????             

bss                      [u]          0000 ????                       0000 ????             

INITIAL CODE SEGMENT                  0000 ????                       0000 ????             

----------------------------------------------------------------------

4 references to unknown symbols.

8 events requiring another assembler pass.

- Expression in mnemonic not resolved.

- Label defined after it has been referenced (forward reference).





START OF PASS: 2



----------------------------------------------------------------------

SEGMENT NAME                 INIT PC  INIT RPC FINAL PC FINAL RPC

vector                                0000 ????                       0000 ????             

code                                  0000 ????                       0000 ????             

data                     [u]          0000 ????                       0000 ????             

bss                      [u]          0000 ????                       0000 ????             

INITIAL CODE SEGMENT                  0000 ????                       0000 ????             

----------------------------------------------------------------------

0 references to unknown symbols.

0 events requiring another assembler pass.



--- Symbol List (sorted by symbol)

1.1                      f036              (R )

2.1                      f041              (R )

3.2                      f04b              (R )

4.1                      f066              (R )

4.2                      f075              (R )

B100                     0002                  

B1200                    0009                  

B12800                   000f                  

B150                     0003                  

B1600                    000a                  

B200                     0004                  

B2400                    000b                  

B300                     0005                  

B3200                    000c                  

B400                     0006                  

B4800                    000d                  

B600                     0007                  

B6400                    000e                  

B75                      0001                  

B76800                   0000                  

B800                     0008                  

C1CMD                    6002              (R )

C1CTL                    6003              (R )

C1DATA                   6000              (R )

C1STAT                   6001              (R )

C2CMD                    8002              (R )

C2CTL                    8003              (R )

C2DATA                   8000              (R )

C2STAT                   8001              (R )

CA1_THI                  0001                  

CA1_TLO                  0000                  

CA2_I_NEG                0000                  

CA2_I_NEGI               0020                  

CA2_I_POS                0040                  

CA2_I_POSI               0060                  

CA2_O_HSHAK              0080                  

CA2_O_MANHI              00e0                  

CA2_O_MANLO              00c0                  

CA2_O_PULSE              00a0                  

CB1_THI                  0010                  

CB1_TLO                  0000                  

CB2_I_NEG                0000                  

CB2_I_NEGI               0020                  

CB2_I_POS                0040                  

CB2_I_POSI               0060                  

CB2_O_HSHAK              0080                  

CB2_O_MANHI              00e0                  

CB2_O_MANLO              00c0                  

CB2_O_PULSE              00a0                  

DTRRDY                   0001                  

H_ACR                    a00b                  

H_DDRA                   a003              (R )

H_DDRB                   a002                  

H_IER                    a00e              (R )

H_IFR                    a00d                  

H_ORA                    a00f              (R )

H_ORAHS                  a001                  

H_ORB                    a000                  

H_PCR                    a00c                  

H_SR                     a00a                  

H_T1CH                   a005                  

H_T1CHL                  a007                  

H_T1CL                   a004                  

H_T1CLL                  a006                  

H_T2CH                   a009                  

H_T2CL                   a008                  

I_ACR                    c00b                  

I_DDRA                   c003                  

I_DDRB                   c002                  

I_IER                    c00e              (R )

I_IFR                    c00d                  

I_ORA                    c00f                  

I_ORAHS                  c001                  

I_ORB                    c000                  

I_PCR                    c00c                  

I_SR                     c00a                  

I_T1CH                   c005                  

I_T1CHL                  c007                  

I_T1CL                   c004                  

I_T1CLL                  c006                  

I_T2CH                   c009                  

I_T2CL                   c008                  

IRCA1                    0002                  

IRCA2                    0001                  

IRCB1                    0010                  

IRCB2                    0008                  

IRDISABLE                0000                  

IRENABLE                 0080                  

IRQ                      f056              (R )

IRSR                     0004                  

IRT1                     0040                  

IRT2                     0020                  

LOAD                     f03f              (R )

NMI                      f055              (R )

PALE                     0001                  

PAREVEN                  0060                  

PARMARK                  00a0                  

PARODD                   0020                  

PAROFF                   0000                  

PARSPACE                 00e0                  

PBLE                     0002                  

PROMBEG                  f000                  

PROMEND                  10000                  

RAMEND                   2000                  

RCS                      0010                  

RECECHO                  0010                  

RESET                    f000              (R )

SAVE                     f049              (R )

SR_DCD                   0020                  

SR_DSR                   0040                  

SR_FE                    0002                  

SR_INTPEND               0080                  

SR_OVRUN                 0004                  

SR_PE                    0001                  

SR_RDRFULL               0008                  

SR_TDREMPTY              0010                  

SRC_INEXT                000c                  

SRC_INPH2                0008                  

SRC_INT2                 0004                  

SRC_OFF                  0000                  

SRC_OUTEXT               001c                  

SRC_OUTFR                0010                  

SRC_OUTPH2               0018                  

SRC_OUTT2                0014                  

STOP1                    0000                  

STOP2                    0080                  

T1_FREERUN               0040                  

T1_OEPB7                 0080                  

T1_ONESHOT               0000                  

T2_ICPB6                 0020                  

T2_ONESHOT               0000                  

TBREAK                   000c                  

TDISABLE                 0000                  

TDISABLER                0008                  

TENABLE                  0004                  

TMASK                    000c                  

UA_IRQDSBL               0002                  

VIRPEND                  0080                  

WL5                      0060                  

WL6                      0040                  

WL7                      0020                  

WL8                      0000                  

--- End of Symbol List.

Complete.

[Jedd-Gobles-Computer:bin/mac/osx] jeddgobl%

The .bin doesn't work on stella, but I'm getting really close!

Link to comment
Share on other sites

From the looks of it you may be encountering the copy/paste formatting problem. if you run "cat -vet kernal.asm" are there lots of question marks that don't seem like they should be there?

 

I've attached one of Andrew's kernels that I cleaned up after copy/paste resulted in a hosed file that looked fine in Simpletext.

 

Can you assemble the file I've attached?

 

The file is compressed because i needed to make it an AtariAge recognized MIME type in order to attach it. If it doesn't unzip automagically for you, you can run "gunzip" from the command line to extract it.

testkern.asm.gz

Link to comment
Share on other sites

Ok I restarted my computer and signed in as my dad. I dunno why but maybe it will help.


[Roy-Gobles-Computer:bin/mac/osx] jeddgobl% cat -vet kernal.asm

M-J M-J M-J M-J M-J M-J processor 6502 $

M-J M-J M-J M-J M-J M-J include "vcs.h" $

M-J M-J M-J M-J M-J M-J include "macro.h" $

$

M-J M-J M-J M-J M-J M-J SEG $

M-J M-J M-J M-J M-J M-J ORG $F000 $

$

Reset $

StartOfFrame $

$

M-J M-J; Start of vertical blank processing $

$

M-J M-J M-J M-J M-J M-J lda #0 $

M-J M-J M-J M-J M-J M-J sta VBLANK $

$

M-J M-J M-J M-J M-J M-J lda #2 $

M-J M-J M-J M-J M-J M-J sta VSYNC $

M-J M-J M-J M-J M-J M-J $

M-J M-J M-J M-J M-J M-J M-J M-J; 3 scanlines of VSYNCH signal... $

$

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

$

M-J M-J M-J M-J M-J M-J lda #0 $

M-J M-J M-J M-J M-J M-J sta VSYNCM-J M-J M-J M-J M-J M-J $

$

M-J M-J M-J M-J M-J M-J M-J M-J; 37 scanlines of vertical blank... $

$

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J $

$

$

M-J M-J M-J M-J M-J M-J M-J M-J; 192 scanlines of picture... $

$

M-J M-J M-J M-J M-J M-J M-J M-J ldx #0 $

M-J M-J M-J M-J M-J M-J M-J M-J REPEAT 192; scanlines $

$

M-J M-J M-J M-J M-J M-J M-J M-J M-J M-J inx $

M-J M-J M-J M-J M-J M-J M-J M-J M-J M-J stx COLUBK $

M-J M-J M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

$

M-J M-J M-J M-J M-J M-J M-J M-J REPEND $

$

$

M-J M-J M-J M-J M-J M-J lda #%01000010 $

M-J M-J M-J M-J M-J M-J sta VBLANKM-J M-J M-J M-J M-J M-J M-J M-J M-J M-J M-J; end of screen - enter blanking $

$

M-J M-J M-J M-J M-J M-J M-J M-J; 30 scanlines of overscan... $

$

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

M-J M-J M-J M-J M-J M-J M-J M-J sta WSYNC $

$

M-J M-J M-J M-J M-J M-J jmp StartOfFrame $

$

$

M-J M-J M-J M-J M-J M-J ORG $FFFA $

$

M-J M-J M-J M-J M-J M-J .word ResetM-J M-J M-J M-J M-J M-J; NMI $

M-J M-J M-J M-J M-J M-J .word ResetM-J M-J M-J M-J M-J M-J; RESET $

M-J M-J M-J M-J M-J M-J .word ResetM-J M-J M-J M-J M-J M-J; IRQ $

$

M-J M-J M-J M-JEND $

$

What does all that mean?

 

Edit: My computer is being weird now...brb.

Link to comment
Share on other sites

Hey guess what! It works!


[Roy-Gobles-Computer:bin/mac/osx] jeddgobl% ls

README.txt      VCS.H           dasm            ftohex          macro.h         testkern.asm

[Roy-Gobles-Computer:bin/mac/osx] jeddgobl% ./dasm testkern.asm -f3 -v5 -otestkern.bin

DASM V2.20.07, Macro Assembler (C)1988-2003



START OF PASS: 1



----------------------------------------------------------------------

SEGMENT NAME                 INIT PC  INIT RPC FINAL PC FINAL RPC

                                     0000 ????                       0000 ????             

RIOT                     [u]          0000 ????                       0000 ????             

TIA_REGISTERS_READ       [u]          0000 ????                       0000 ????             

TIA_REGISTERS_WRITE      [u]          0000 ????                       0000 ????             

INITIAL CODE SEGMENT                  0000 ????                       0000 ????             

----------------------------------------------------------------------

3 references to unknown symbols.

0 events requiring another assembler pass.



--- Symbol List (sorted by symbol)

AUDC0                    0015                  

AUDC1                    0016                  

AUDF0                    0017                  

AUDF1                    0018                  

AUDV0                    0019                  

AUDV1                    001a                  

COLUBK                   0009              (R )

COLUP0                   0006                  

COLUP1                   0007                  

COLUPF                   0008                  

CTRLPF                   000a                  

CXBLPF                   0006                  

CXCLR                    002c                  

CXM0FB                   0004                  

CXM0P                    0000                  

CXM1FB                   0005                  

CXM1P                    0001                  

CXP0FB                   0002                  

CXP1FB                   0003                  

CXPPMM                   0007                  

ENABL                    001f                  

ENAM0                    001d                  

ENAM1                    001e                  

GRP0                     001b                  

GRP1                     001c                  

HMBL                     0024                  

HMCLR                    002b                  

HMM0                     0022                  

HMM1                     0023                  

HMOVE                    002a                  

HMP0                     0020                  

HMP1                     0021                  

INPT0                    0008                  

INPT1                    0009                  

INPT2                    000a                  

INPT3                    000b                  

INPT4                    000c                  

INPT5                    000d                  

INTIM                    0284                  

NUSIZ0                   0004                  

NUSIZ1                   0005                  

PF0                      000d                  

PF1                      000e                  

PF2                      000f                  

REFP0                    000b                  

REFP1                    000c                  

RESBL                    0014                  

Reset                    f000              (R )

RESM0                    0012                  

RESM1                    0013                  

RESMP0                   0028                  

RESMP1                   0029                  

RESP0                    0010                  

RESP1                    0011                  

RSYNC                    0003                  

StartOfFrame             f000              (R )

SWACNT                   0281                  

SWBCNT                   0283                  

SWCHA                    0280                  

SWCHB                    0282                  

T1024T                   0297                  

TIA_BASE_ADDRESS         0000              (R )

TIA_BASE_READ_ADDRESS    0000              (R )

TIA_BASE_WRITE_ADDRESS   0000              (R )

TIM1T                    0294                  

TIM64T                   0296                  

TIM8T                    0295                  

TIMINT                   0285                  

VBLANK                   0001              (R )

VDELBL                   0027                  

VDELP0                   0025                  

VDELP1                   0026                  

VERSION_MACRO            0069                  

VERSION_VCS              0069                  

VSYNC                    0000              (R )

WSYNC                    0002              (R )

--- End of Symbol List.

Complete.

The .bin works great! Thanks for giving me that file. I know some programs don't work in Stella. Could that be why the other programs won't run? And is it safe to go on learning 2600 Asm, or should I make sure I got all the bugs out of Dasm first?

Link to comment
Share on other sites

All the weird text in your source file is formatting information which you don't want to be in there.

 

GUI text editors will understand what it means and they won't display it -- your text file will look fine in TextEdit because TextEdit, for instance, knows how to deal with that embedded information in the text file. On the other hand, unix command line tools like cat will give you the straight dope as to what's in that file. Because that raw file is what dasm is trying to assemble and that file actually has a bunch of text formatting stuff that dasm doesn't and shouldn't have any idea how to deal with, it throws all kinds of errors.

 

The subtle bit is the fact that your text editor is lying about the contents of the file. If you look at it in your gui text editor you probably won't see a '?' anywhere and you'll wonder why dasm claims the file is full of them.

 

Try pasting code into text editor documents you've already told to save as plaintext. I don't know what's the text editor of your choice, but this technique works for several of them.

Link to comment
Share on other sites

Hey guess what!  It works!

 

The .bin works great!  Thanks for giving me that file.  I know some programs don't work in Stella.  Could that be why the other programs won't run?  And is it safe to go on learning 2600 Asm, or should I make sure I got all the bugs out of Dasm first?

 

 

No, it's not why the other programs won't run; and clearly you need a better understanding of the fundamentals before you venture into wilder territory. I hope you've read and understood some of the tutorials, and that you are actually following them step-by-step. The 'processor 6502' one is a fundamental one mentioned very early on in the tutorials. The fact that you missed this suggests you're trying to do things too rapidly. Go back to square 1, and do things slowly.

 

Just to be super-clear about this; it wasn't DASM causing the errors, it was things you did incorrectly.

 

Cheers

A

Link to comment
Share on other sites

Hey guess what!  It works!

 

The .bin works great!  Thanks for giving me that file.  I know some programs don't work in Stella.  Could that be why the other programs won't run?  And is it safe to go on learning 2600 Asm, or should I make sure I got all the bugs out of Dasm first?

 

 

No, it's not why the other programs won't run; and clearly you need a better understanding of the fundamentals before you venture into wilder territory. I hope you've read and understood some of the tutorials, and that you are actually following them step-by-step. The 'processor 6502' one is a fundamental one mentioned very early on in the tutorials. The fact that you missed this suggests you're trying to do things too rapidly. Go back to square 1, and do things slowly.

 

Just to be super-clear about this; it wasn't DASM causing the errors, it was things you did incorrectly.

 

Cheers

A

 

I'm such a grump, sometimes!

Link to comment
Share on other sites

Grump, yes. But you have a good point. I knew what "processor 6502" was. And the reason it wasn't working was because of my computer and Terminal, which I just discovered a few days ago. But you're right, I should go back to square 1 and review all the basics. Although I have a little experience with computer programming, this is my first serious attempt to learn Asm. I tried once with calculator Asm, but it turns out you can only assemble on PC's.

 

Andrew, thanks for all your help. I'm going to continue reading your tutorials.

Link to comment
Share on other sites

Ok Andrew, I went back and re-read the tutorials 1-8, then continued to session 13. I'm happy to say that I can now write my own code. :D Theyre all just variations on the original kernel, but they work! Thanks soooo much for writing these.

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