Jump to content



0

Fastest way for a 15 year old to learn 6502?


21 replies to this topic

#1 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Fri Jul 15, 2011 8:44 PM

can someone help me out? i am only 15 at the moment, stubborn, and need a fast, easy way to learn 6502. not necessarily become fluent just yet, but to learn the basics.

i already read some of "Atari Roots" but i dont have an atari 800 or 400 and i dont plan on buying one.

i know these basic things so far

off/on, yes/no, white/black, the whole concept of the numbers 1 and 0

i know that 1111 1111 = 255 and that's all that 8-bit can handle.

that's all i know about 6502, and i really need help, any help is appreciated!

#2 Wickeycolumbus OFFLINE  

Wickeycolumbus

    River Patroller

  • 4,064 posts
  • Location:Michigan

Posted Fri Jul 15, 2011 9:01 PM

This book is probably the best. It's how I learned :)

http://www.atariarchives.org/mlb/

#3 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Fri Jul 15, 2011 10:16 PM

thanks! ill jump into that!

#4 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Sat Jul 16, 2011 6:37 PM

how long did it take you to learn from this book

#5 Wickeycolumbus OFFLINE  

Wickeycolumbus

    River Patroller

  • 4,064 posts
  • Location:Michigan

Posted Sat Jul 16, 2011 7:11 PM

View Postesplonky, on Sat Jul 16, 2011 6:37 PM, said:

how long did it take you to learn from this book

The learning doesn't stop with the book, you learn more and more with each project. Just read the book slowly, take in as much as possible, and you'll be fine.

#6 Yart OFFLINE  

Yart

    Star Raider

  • 53 posts

Posted Fri Sep 9, 2011 8:55 AM

This is awesome.

I've been wanting to learn ASM for a while too but I had a hard time with every other resource. I like how this guy compares the routines to BASIC. Makes it so much easier for me to learn.

Though from what I understand this is for the Atari 8-Bit line of computers and not the 2600 eh? Still a good learning point (and I hear the 2600 is much harder anyways).

What's a good assembly compiler for Windows to use for Atari computer applications? Will DASM work?

Edited by Yart, Fri Sep 9, 2011 8:56 AM.


#7 danwinslow OFFLINE  

danwinslow

    Stargunner

  • 1,748 posts

Posted Fri Sep 9, 2011 11:17 AM

I like CC65 myself.
www.cc65.org

#8 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 20,923 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Fri Sep 9, 2011 11:56 AM

Remember to check this out when you get a chance:

http://www.randomter...sembly_language


And be sure to check out the useful links:

http://www.randomter...ml#useful_links

#9 Mr SQL OFFLINE  

Mr SQL

    Chopper Commander

  • 121 posts

Posted Fri Sep 9, 2011 3:41 PM

The Batari compiler produces an .asm output file which does a really good job of showing you how your code is translated into assembly; that is a great way to learn along with a good book on the basics of Assembly to help explain what is going on.

#10 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Sat Sep 10, 2011 12:36 PM

Can someone show me how to install dasm on my Linux computer?

#11 Joe Musashi OFFLINE  

Joe Musashi

    Space Invader

  • 30 posts

Posted Sat Sep 10, 2011 1:59 PM

View Postesplonky, on Sat Sep 10, 2011 12:36 PM, said:

Can someone show me how to install dasm on my Linux computer?
As far as I can see, the recent stable DASM version 2.20.11 does not come with binaries for Linux, just source. You would have to compile it yourself. Unfortunately, this is not straightforward, so another thing you can do is to download an older version. E.g., you can get

DASM 2.20.10

If you unzip it, there's a folder bin/Linux, which contains three executables. One of them might work for you on Fedora.

You do not have to install dasm. Just copy the executables to wherever you want. E.g. if you copy dasm to /usr/local/bin you should be able to start it in the shell with just "dasm".

#12 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Sat Sep 10, 2011 3:57 PM

Sweet thx

#13 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Sat Sep 10, 2011 4:07 PM

i go to /home/esplonky/dasm/bin/Linux and they i type "dasm" and it says "command not found"

#14 RevEng ONLINE  

RevEng

    River Patroller

  • 2,010 posts
  • bit shoveler
  • Location:Canada

Posted Sat Sep 10, 2011 4:16 PM

You probably don't have that directory or "." in your PATH variable.

Try typing "./dasm" instead.

#15 Joe Musashi OFFLINE  

Joe Musashi

    Space Invader

  • 30 posts

Posted Sat Sep 10, 2011 4:28 PM

Also, if you have not done already, make sure it can be executed by setting the executable (X) flag:

"chmod 777 dasm"

(to check the flags, type "ls -l dasm", you can get more info about chmod with "man chmod" or see here http://www.ee.surrey...Unix/unix5.html)

#16 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Sun Sep 11, 2011 3:15 PM

joe got me up and running, butttttttt i have one problem. every time i assemble my source code (see below) i get an error message (see below also!)

 		*=1000

 LDA 	#4
 STA 	400
 STA 	1000
 LDX 	#5
 LDY 	#6
 STX 	500
 STY 	600
 LDA 	1000
 LDX 	500
 LDY 	600
 BRK

[root@Esplonky Linux]# ./dasm test.asm
DASM V2.20.10, Macro Assembler (C)1988-2004
test.asm (1): error: Unknown Mnemonic '*=1000'.
test.asm (3): error: Unknown Mnemonic 'LDA'.
test.asm (4): error: Unknown Mnemonic 'STA'.
test.asm (5): error: Unknown Mnemonic 'STA'.
test.asm (6): error: Unknown Mnemonic 'LDX'.
test.asm (7): error: Unknown Mnemonic 'LDY'.
test.asm (8): error: Unknown Mnemonic 'STX'.
test.asm (9): error: Unknown Mnemonic 'STY'.
test.asm (10): error: Unknown Mnemonic 'LDA'.
test.asm (11): error: Unknown Mnemonic 'LDX'.
test.asm (12): error: Unknown Mnemonic 'LDY'.
test.asm (13): error: Unknown Mnemonic 'BRK'.
Complete.

and my code above was changed by me because i was tweaking to see if it would compile, so ive tried with all kinds of indentions and stuff.

Edited by esplonky, Sun Sep 11, 2011 3:20 PM.


#17 SpiceWare OFFLINE  

SpiceWare

    Quadrunner

  • 5,990 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Mon Sep 12, 2011 12:29 PM

DASM supports multiple processors, so you have to tell it which one you're writing code for.

        PROCESSOR 6502
        ORG 1000

 LDA    #4
 STA    400
 STA    1000
 LDX    #5
 LDY    #6
 STX    500
 STY    600
 LDA    1000
 LDX    500
 LDY    600
 BRK

Edited by SpiceWare, Mon Sep 12, 2011 12:32 PM.


#18 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Mon Sep 12, 2011 4:47 PM

now how would i make it a .bin file? cus everytime i assemble, and i say "./dasm test.asm -f#.bin" of "./dasm test.asm -f bin" i get "illegal output format"

#19 SpiceWare OFFLINE  

SpiceWare

    Quadrunner

  • 5,990 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Mon Sep 12, 2011 5:24 PM

The -f should be followed by an actual number, not #. 3 means don't include the start address as the 2600 doesn't use it. This is how I compile Frantic:
./dasm frantic.asm -f3 -v0 -sfrantic.sym -lfrantic.lst -ofrantic.bin


-v0 is how verbose (wordy) the output is during the compile

-s is the symbol file, it lists all the variables and labels and what their values are. There's no space between the option and the file name (as with the next 2 options).

-l is the full compiler listing

-o is the binary file you want to create

The extra files are helpful for figuring things out, but you don't need to use them.
./dasm test.asm -f3 -otest.bin

you can even leave off the -o part, if you do the .bin would be called a.out

#20 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Mon Sep 12, 2011 6:46 PM

sweet thanks!!!

#21 GonzoGamer OFFLINE  

GonzoGamer

    Chopper Commander

  • 169 posts
  • Location:Texas

Posted Mon Dec 5, 2011 3:29 PM

check out this link
http://www.atariarch...g/mlb/index.php

#22 esplonky ONLINE  

esplonky

    Moonsweeper

  • 292 posts
  • Kinetic, Not synthetic.
  • Location:Canyon Lake, TX

Posted Fri Apr 13, 2012 9:19 AM

Thanks everyone, I am going to learn 6502 asm on my new Atari 800xl, and will use Machine Language for Beginners, and The Second Book of Machine Language. thanks for your help everyone!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users