Jump to content
IGNORED

Learning 6502 assembly language


SpiceWare

Recommended Posts

I ran across Easy 6502 yesterday, seems to be rather nice introduction to learning the 6502 (which is basically the same CPU as the 6507 used in the Atari 2600). I really like the use of the 6502 simulator, you can manipulate the example code on the web page and see the results right there.

 

Initial example

post-3056-0-10153500-1438096394_thumb.png

 

After clicking Assemble - note the assembler's output in the shaded box

post-3056-0-30578700-1438096400_thumb.png

 

After clicking Run - note the 3 colored dots that showed up in the black box:

post-3056-0-62523600-1438096407_thumb.png

 

After making changes then clicking Assemble and Run

post-3056-0-46608600-1438096414_thumb.png

 

After clicking Hexdump

post-3056-0-17640700-1438096451_thumb.png

 

After clicking Disassembly

post-3056-0-07063200-1438096458_thumb.png

 

It wraps up with a game of snake ( play using the keys WASD )

post-3056-0-50639000-1438096596_thumb.png post-3056-0-52466000-1438096603_thumb.png

Edited by SpiceWare
  • Like 7
Link to comment
Share on other sites

That was really fun, but the "Our First Program" was really boring. Here's my 2nd program:

 

LDX #$e
TXA
STA $0200,X
STA $0240,Y
STA $0280,X
STA $0320,Y
STA $0360,X
STA $0400,Y
STA $0440,X
STA $0480,Y
STA $0500,X
INX
DEY
STA $0200,Y
STA $0240,X
STA $0280,Y
STA $0320,X
STA $0360,Y
STA $0400,X
STA $0440,Y
STA $0480,X
STA $0500,Y
INX
DEY
INX
DEY
INX
DEY
INX
DEY
INX
DEY
INX
DEY
JMP $0602
That's a lot more fun to watch, and you can mess around adding INX and DEY opcodes to get completely different effects.
-mini
Link to comment
Share on other sites

  • 2 weeks later...

Ah nice they are! :)

 

If I remember right Spacer was a holdout from the OLD 6502ASM version they were running in 2004/2005 whenever that was, and it did run really slowly at that time. After the simulator was optimized now it runs like a champ.

 

I made a Breakout game for the site ages ago, but doesn't look like it was catalogued anywhere. :( I believe it was on the old forum they had but I don't think it's there anymore.

 

They're the same, though I do like all the example programs you can quickly call up.

 

I will note the comment in Spacer.

 

 

 

is not at all true for me, it's much too fast to play on my Mac Pro.

Edited by Jinroh
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...