Jump to content



0

Assembly Flash Cards


19 replies to this topic

#1 flavoredthunder OFFLINE  

flavoredthunder

    Chopper Commander

  • 103 posts
  • Location:Los Angeles

Posted Mon May 3, 2004 11:46 AM

One of my friends made some Assembly Flash Cards:

http://www.beigereco...2/flashcard.php

What do you guy/gals think, would they be useful to Stella development?

#2 Nukey Shay ONLINE  

Nukey Shay

    Sheik Yerbouti

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

Posted Mon May 3, 2004 12:14 PM

lol
What is the deal with the pics?

Attached Thumbnails

  • flash.jpg


#3 flavoredthunder OFFLINE  

flavoredthunder

    Chopper Commander

  • 103 posts
  • Location:Los Angeles

Posted Mon May 3, 2004 3:19 PM

who knows my friend is a couple sandwiches short of a picnic maybe there is some strange word association that I am not familiar with :ponder: :?

#4 kisrael OFFLINE  

kisrael

    HMBL 2600 coder

  • 3,970 posts
  • Location:Boston Burbs, MA

Posted Mon May 3, 2004 7:44 PM

Quote

who knows my friend is a couple sandwiches short of a picnic maybe there is some strange word association that I am not familiar with :ponder: :?
Well, http://www.beigereco...joe/6502/images is the images he uses I think. And, like, the lego set IS model 6502....and the undies do have that as a model #, so maybe he did like an images search on Google for "6502" and grabbed the most random stuff he could find, especially if it had the number in it.

Pretty cool in all. Though honestly, most of us don't need that deep a knowledge of individual 6502 instructions :-)

#5 Bruce Tomlin OFFLINE  

Bruce Tomlin

    River Patroller

  • 3,531 posts
  • CD C9 01
  • Location:Austin, TX

Posted Mon May 3, 2004 7:52 PM

Wierd. Well, I certainly am familiar with 6809 being the number of a model USMC railroad flatcar from my own ebay searches. Still, the panties are wierd, dude.

#6 flavoredthunder OFFLINE  

flavoredthunder

    Chopper Commander

  • 103 posts
  • Location:Los Angeles

Posted Mon May 3, 2004 8:35 PM

is thsi a good way to learn assembly though? I very green at this and am looking for anything that will help me learn these opcodes. They seem so abstract to me right now :ponder:

#7 Bruce Tomlin OFFLINE  

Bruce Tomlin

    River Patroller

  • 3,531 posts
  • CD C9 01
  • Location:Austin, TX

Posted Mon May 3, 2004 10:47 PM

Don't worry about learning freaking opcodes. That's what an assembler is for. The only reason I learned as many Z-80 opcodes as I did was because back in the day with my TRS-80, you had to enter things in hex a lot.

CD C9 01

#8 flavoredthunder OFFLINE  

flavoredthunder

    Chopper Commander

  • 103 posts
  • Location:Los Angeles

Posted Mon May 3, 2004 11:01 PM

Ok, so just focus on the fullname and clock cycles? :?

#9 Nukey Shay ONLINE  

Nukey Shay

    Sheik Yerbouti

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

Posted Mon May 3, 2004 11:48 PM

You only need to be concerned with clock cycles if you are working with time-critical areas of a program (like a 2600 display kernal or an 8-bit computer interrupt routine). Regular everyday "use em and lose em" routines and be coded without a second's thought about how many nanoseconds you are eating up (especially on a full computer like the 800...which has it's own hardware routines to handle the display for you).

As stated, the byte value for each of the opcodes doesn't even need to be learned at all...since the assembler will compile the correct hex values for you. No need to study them if you aren't going to be reading them ;)

Length of instructions is pretty straightforward. Everything uses at least one byte (natually). If it's followed by a 2-digit hex argument, it's using 2 bytes. Ones that have a 4-digit argument are using 3 bytes. The only exception to this rule is Branching instructions (which will look like they use a 4-digit argument when you are looking at a disassembly...but really only use 2 (it's jumping half a page or less in either direction...so only 1 byte is needed for the argument).

And the full name is useless.

The thing that you need to be concerned with is what that instruction DOES...and what the various addressing modes are. It only does that one thing, and virtually all variations of that instruction are doing the same thing. LDA $DD and LDA ($C0),Y are basically doing the same thing...they are copying the contents of a memory location into the accumulator (LDA). How it's getting that information differs greatly between the two (the addressing mode). The first one is grabbing the value from a static location in zero page...the second example is grabbing the value from the address stored at that zero page location plus the Y offset.

#10 Nukey Shay ONLINE  

Nukey Shay

    Sheik Yerbouti

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

Posted Tue May 4, 2004 1:03 AM

Addressing modes...
http://atariage.com/...p?p=51138#51138



#11 kisrael OFFLINE  

kisrael

    HMBL 2600 coder

  • 3,970 posts
  • Location:Boston Burbs, MA

Posted Tue May 4, 2004 6:55 AM

The most important thing is to to know what instructions are out there, not so much the details of each one.

I learned 6502 from Assembly in One Step. And over the course of writing Joustpong, at times I kind of forgot that you could INCrement and DECrement memory directly without using a register, and could transfer directly from memory to X or Y (I kept thinking you had to go through A and then transfer from there.) But despite that occasional idiocy on my part that made me write inneficient code at times, I still got things done.

#12 flavoredthunder OFFLINE  

flavoredthunder

    Chopper Commander

  • 103 posts
  • Location:Los Angeles

Posted Tue May 4, 2004 1:57 PM

Hey Kirk and Nukey,
I read the assembly in one step, but to be honest for me it is like reading brain surgery in one step. I get the general idea but nothing too detailed. I did however realize that I had over estimated my ability to pick up something like assembly right out of the gate. I did not go to school for programming so lots of the math and conversion techniques were originally alien to me. I have gotten a good foundation on that now, and I did a pencil and paper computer too which was a GREAT tool for people who are visual learners like myself. Anyway, thanks for the links I'll definitely pour over them some.

#13 Nukey Shay ONLINE  

Nukey Shay

    Sheik Yerbouti

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

Posted Tue May 4, 2004 3:02 PM

The best way (in my case, anyway) to learn is just to look at things that have already been done. Take a look at some disassemblies or source codes that other people have done. Try playing around with the values. While this may not help you discover ways to make your own unique program, it will help you understand what those instructions are trying to do.

Also, if you want to try adding your own routines to an existing program you will need to provide space in which to do that (like lowering the number of bytes a bitmap uses so you can use the memory freed for something else). Since the 2600 programs are in serious short supply of everthing, it might be best to try altering 2k games (which can be transformed into 4k games simply by moving the last 6 bytes 4096 bytes forward). Let's assume that that the last 6 values of a 2k game are this:

.byte $00
.byte $00
.byte $4E
.byte $F0
.byte $00
.byte $00

You can create a 4k binary out of this by just adding 1 tag to that...

ORG $FFFA
.byte $00
.byte $00
.byte $4E
.byte $F0
.byte $00
.byte $00

Bam...addresses $F7FA to $FFF9 are now free to use however you want :)

#14 kisrael OFFLINE  

kisrael

    HMBL 2600 coder

  • 3,970 posts
  • Location:Boston Burbs, MA

Posted Tue May 4, 2004 11:27 PM

Hey thunder, do you know any programming languages? It's ok to not have an educaition in programming, but I wouldn't suggest assembly as a first language for anyone...

#15 flavoredthunder OFFLINE  

flavoredthunder

    Chopper Commander

  • 103 posts
  • Location:Los Angeles

Posted Tue May 4, 2004 11:37 PM

Hey Kirk,
Yes here are my languages:

Scripting Languages: HTML, JAVA Script, and Action Script
Programming Languages: Lingo, C, JAVA, PHP

Like I mentioned before I am self taught however, that said I have read extensively on OOP and Design Patterns (which ain't much help in Assembly) ;)

If you are interested I have some of my programming projects on my web site:
http://www.markdaggett.com

#16 flavoredthunder OFFLINE  

flavoredthunder

    Chopper Commander

  • 103 posts
  • Location:Los Angeles

Posted Tue May 4, 2004 11:42 PM

looking at my last post, it seems more like I was posting my resume sorry then answering your question :D . The people at work think I am crazy to want to learn to program assembly especially since I am the creative director ;) As an artist the Atari just seems like such fertile ground it is too enticing to pass up, though i must admit I am really out of my comfort zone this deep in the machine language. Guess it just takes time!

#17 kisrael OFFLINE  

kisrael

    HMBL 2600 coder

  • 3,970 posts
  • Location:Boston Burbs, MA

Posted Wed May 5, 2004 12:00 AM

Wow, you've really done some cool conceptual stuff

(For some reason it reminds me I keep needing to learn Flash...)

#18 khryssun OFFLINE  

khryssun

    Dragonstomper

  • 814 posts
  • Location:Marseille - France

Posted Wed May 5, 2004 4:24 AM

[quote name='flavoredthunder]looking at my last post' date=' it seems more like I was posting my resume sorry then answering your question :D . The people at work think I am crazy to want to learn to program assembly especially since I am the creative director ;) As an artist the Atari just seems like such fertile ground it is too enticing to pass up, though i must admit I am really out of my comfort zone this deep in the machine language. Guess it just takes time![/quote']

Hi,
well, learning machine language (ML) is not as complicated as it seems... in fact, I consider it like a game : playing with the CPU and telling it to make what we want is really fun... :wink:

BTW : (Assembler is an improper term for this as it refers to the program that convert the machine laguage opcodes (LDA, STA, TXA...) of the source file (text) to a binary executable file understandable by the 6502/6510)... and it's this file created by the assembler that can be run on a computer using one of these microprocessors.)

As I said before, ML is easy in it's mechanisms : indeed, it's just playing with the instructions of the microprocessor.
Most of the operations are very basic : Load a value into a register, transfer a register's value into a memory address, transfer the value of one register to another, jump the program execution to another address regarding some conditions (or not), call a subroutine...

I'm very simplist but the things are not much more very complicated.

Personnaly I learnt ML when I had a Commodore 64. I had a book where all about the 6502/6510' programming was very, very well explained : it was the "Commodore 64 Programmer's Reference Guide"

If you are interrested, you can find the text version of the book here :
[url="http://project64.c64.org/hw/c64prg10.zip"]http://project64.c64.org/hw/c64prg10.zip[/url]

Forget all chapters about the C64, and jump directly to the Chapter 5 (page 209) : BASIC TO MACHINE LANGUAGE.

Everything you'll need is here :

- What is Machine laguage
- The registers of the 6510
- Hexadecimal notation
- Addressing modes
- The zero page
- The stack
- Indexing
- Branches and Testing
- Subroutines
- All Microprocessor instructions explained (with cycles)

Hope this'll help ;)

take care,
chris

#19 kisrael OFFLINE  

kisrael

    HMBL 2600 coder

  • 3,970 posts
  • Location:Boston Burbs, MA

Posted Wed May 5, 2004 8:43 AM

khryssun][quote=flavoredthunder]looking at my last post, on it seems more like I was posting my resume sorry then answering your question


Hi,
well, learning machine language (ML) is not as complicated as it seems... in fact, I consider it like a game : playing with the CPU and telling it to make what we want is really fun... :wink:
Hee, and just like "real games", I used a cheat code / FAQ...in the case of JoustPong, it was having a terrific new kernal handed to me by Paul Slocum :-)

#20 flavoredthunder OFFLINE  

flavoredthunder

    Chopper Commander

  • 103 posts
  • Location:Los Angeles

Posted Wed May 5, 2004 11:31 PM

Hey Kirk and Chris,
Chris, thanks for correcting me on the semantics now I'll sound smarter when I talk about ML. Also, thanks for the links I'll definitely read it over.

Kirk, Paul rules no two ways around it. He has been a great help in answering some of my newbee questions that I am sure bore him to tears. He also passed me a basic kernel wonder if we have the same one ;)

Anyway, thanks again guys for your help.
Mark




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users