Latest Items
Blog : Holiday!
New Site Design (Janice)

Cower Thu 11:55

Blog : Development Ideas
Anti-Vehicle theft idea

Mog Thu 08:01

Blog : Feel Good
AGameAWeek Y2 : Note : Quite big!

Jayenkai Wed 02:15

Links : Dev-News
DirectDraw hack for older games

mindstorm8191 Mon 20:05

Links : Just for Fun
Hahahaha, you're kidding?

HoboBen Mon 14:10

Links : Useful Apps
Art of Illusion

Jayenkai Sun 00:53

Showcases : Functions Libraries
SVG Tech Demo 2

HoboBen Sat 12:08

Snippets : Graphical Effects
Algorithm to Draw a Line of Arbitrary Thickness

HoboBen Sat 08:21

Snippets : Misc
Simple stack-based interpreter

Tikihead Sat 00:07

Snippets : Variables
Parse point-pair string

HoboBen Fri 10:21

More


Socoder.co.nr
url provided by
Free SubDomain Names
Handy Links
Ascii Chart
Blitz Key Scancodes
Back to spinal's Blog ( Created 22 February 2010 | Last Edited 22 February 2010)
Learning ASM...
OK, As I could find almost no information about coding C for the SNES, I'm going to have to learn ASM.

65816 ASM to be exact, but I'm going to start with the basics as I have never even considered learning this stuff before.

I'm going to post my findings here so that anyone knowing ASM already can correct me or expand on my learnings.

The first site I found that offers to teach me ASM basics (for the 65816) is http://acmlm.kafuka.org/board/thread.php?id=99.
Now having read the first part of the post, I think I have a rough understanding of the LDA, STA and RTS opcodes.

Here is what I think I know, correct me if I'm wrong...

LDA - Loads the Accumulator with a value, which is either a number or a memory address. the Accumulator as I understand it, seems to be a variable, perhaps the ONLY variable I can truly use?

STA - Stores the Accumulator to a memory address. Sounds simple enough, it suggests that if I want to store a number, I must first put it in the accumulator then copy it to an address.

RTS - basically this seems to be the RETURN command in various languages. The page hints that I would get to my subroutine using the JSR opcode, which I havent read about yet.

So a subroutine to copy a number to a memory location would look something like...



Does that look right so far?

Latest Comments

Posted : Monday, 22 February 2010, 15:14
Phoenix


The accumulator is a processor register. A register is the form of memory closest to the CPU, hence also the fastest. Arithmetic/logical operations are carried out in that register.

I haven't done any 65816 assembly, but you seem to have gotten it right.

Posted : Thursday, 25 February 2010, 12:41
spinal


Someone is going to have to explain the X,Y registers to me, I just don't understand what they do.

Posted : Saturday, 27 February 2010, 23:15
Sticky


I just got Sublime Text today and I'm trying to write a syntax highlighter for Flat Assembler in that. Once I've got it highlighting nicely and everything, I'll be trying to learn assembly too. I think Flat Assembler is arguably easier than what you'll be learning, though.

Posted : Monday, 08 March 2010, 09:10
spinal


YES! Tiles on the screen!!!!!



I'm not 100% sure how the tile map knows where the actual tiles are yet, but I got them on the screen at least!

Posted : Monday, 08 March 2010, 09:43
Jayenkai


woot!
Well done!!

Latest Posts
Tutorials
Stealth Fri 11:23
cars turning
redmoth Thu 15:57
What Have You Done : 8th September 2010
Cower Thu 12:59
Jayenkai's Arcade Slots
worchyld Wed 04:47
WHAT !... Do my eyeballs decieve me?
dna Tue 20:26
Draw me some tiles...!
Jayenkai Mon 15:45
AudioCompressing
Afr0 Sat 13:31
Design : a Kinect game
Jayenkai Sat 04:34
Candy House!
Jayenkai Sat 04:29
Universal Clock
JL235 Fri 09:21
More

Latest Comments
Link : Art of Illusion
Jayenkai Fri 14:01
Dev-Ideas : Anti-Vehicle theft idea
Afr0 Fri 13:12
Hols : New Site Design (Janice)
Cower Fri 10:57
Dev-Diary : Storyboard!
Afr0 Fri 08:58
Link : DirectDraw hack for older games
Jayenkai Fri 02:22
Woot : AGameAWeek Y2 : Note : Quite big!
CodersRule Wed 03:56
Link : Hahahaha, you're kidding?
Jayenkai Tue 03:32
Life : I've been spending the summer...
Afr0 Mon 09:34
Article : Half an Hour, DS Jumpstart
Jayenkai Mon 00:22
Showcase : SVG Tech Demo 2
Jayenkai Sun 01:19
More

Latest Uploads
ffsapple_185746.png

Jayenkai

Solstice E ... ine Test 1

waroffice

Birthday_Shroom.jpg

Jayenkai

plat.png

Jayenkai

54is25th.png

Jayenkai

Redneck Fish

Cower


Who's Online
JL235
Fri, at 14:03
Cower
Fri, at 14:03
Stealth
Fri, at 14:03
Jayenkai
Fri, at 14:02
Teasy
Fri, at 13:50
spinal
Fri, at 13:49
Afr0
Fri, at 13:40
lawandcontradiction
Fri, at 13:09
blanko1324
Fri, at 12:51
Tikihead
Fri, at 12:16
Link to this page
Site : Jayenkai 2006-2009 | Page took 0.300848 |
MudChat's origins, BBCode's former life, Image Scaler.