Latest Uploads
Shields 64x64

Pakz

Ffs_Spam

Jayenkai

Hives Screen shot

rychan

Rpg Potion Sprites

Pakz

Super Shap ... ration Kit

Andy_A

Platdude Spotting

Jayenkai

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.

Homepage : http://spinalcode.co.uk
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.

Homepage : http://sticky.junkyardofcode.net/
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!

Homepage : http://spinalcode.co.uk
Posted : Monday, 08 March 2010, 09:43
Jayenkai


woot!
Well done!!

Homepage : http://AGameAWeek.com
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 724|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Latest Posts
Pokitto
Jayenkai Sun 02:00
Arduboy Owners Club
spinal Sun 01:35
Slow News
Jayenkai Sat 23:36
AGameAWeek : 2017 - Part One
Jayenkai Sat 08:31
Facebook Group
rskgames Fri 10:47
Possible LCD experimentation imminent.
steve_ancell Fri 10:30
1-2-...Never Mind
rockford Fri 07:12
Buy Zelda
rockford Wed 16:00
What Have You Done? - April 2017
rychan Wed 06:43
I Hear Voices
Jayenkai Tue 04:30
More

Latest Items
Showcase : Read Error A
Jayenkai Sat 08:28
Showcase : Hives
rockford Wed 12:53
Showcase : Quadoban
rskgames Fri 10:11
Blog : My Arduino experience.
steve_ancell Wed 17:02
Showcase : Roguelike Explorer
Pakz Fri 06:59
Showcase : Infinitron
Jayenkai Mon 07:50
News : Newsletter #311
Jayenkai Thu 17:27
Link : Super Shapes Exploration Kit
Andy_A Thu 11:09
Dev-Diary : Sensitive - Arduboy!
rychan Thu 17:27
Snippet : Skylines
steve_ancell Tue 14:25
Dev-Diary : PS2 to N64 Adapter
spinal Sun 10:49
Link : Vector Tutorials/Help page.
Pakz Thu 23:00
Blog : mini project
spinal Sun 10:13
Snippet : Wall Tracing on Random Maps (rpg)
rskgames Wed 22:48
More

Who's Online
Krakatomato
Sun, at 04:23
Jayenkai
Sun, at 04:03
spinal
Sun, at 03:15
rychan
Sun, at 02:55
Pakz
Sun, at 00:57
rskgames
Sun, at 00:07
steve_ancell
Sat, at 20:01
Evil Roy Ferguson
Sat, at 15:43
rockford
Sat, at 10:31
zzoom
Fri, at 16:24
Link to this page
Site : Jayenkai 2006-Infinity | MudChat's origins, BBCode's former life, Image Scaler.