The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 895 - File: showthread.php PHP 7.3.33 (Linux)
File Line Function
/showthread.php 895 errorHandler->error




Users browsing this thread: 1 Guest(s)
My Assembly Notes

#1
Posts: 1,261
Threads: 250
Thanks Received: 11
Thanks Given: 7
Joined: Jun 2009
Status
Traitor
Just a list of things I'm learning through assembly, starting on this page as the OPcode.
JSR works by pushing a pointer to the stack: The RTS repeals it.
JMP goes to an address and never comes back. JSR goes to an address, then comes back to the point where you called it by calling an RTS (Return from Subroutine)

Quote:<Zeemis> Is LDA usually A9 and A5?
<Zeemis> Here is an example: C0/AE0D: A5EB LDA $EB (load parameter, character)
<Zeemis> What are the differences between A9 and A5?
<Sliver-X> variants*
<Sliver-X> A9 loads a literal value, A5 is a memory address.
<Sliver-X> Zero page, IIRC.
<Zeemis> What do you m ean by literal value and memory address?
<Zeemis> Do you mind me asking you these questions?
<Sliver-X> A literal value means, well, you're loading a specific byte into A.
<Sliver-X> An address loads the value at whatever address into the accumulator.
<Sliver-X> JMP is 4D, JSR is 20. RTS is 60.
<Sliver-X> Branches like BNE, BEQ, etc are relative JMPs of sorts that are triggered on conditions.
Quote:<Sliver-X> LDX and LDY also have Zero Page, Memory and Literal functions.
<Sliver-X> If the SNES's CPU has more registers I guess those would too.
<Sliver-X> (The 6502 only has A, X and Y)
<Zeemis> I've been reading up on LDX and LDY: http://richardbowles.tripod.com/durham/c...htm#ldxldy
<Zeemis> LDX LDY and LDA are similar beacuse of what you just said?
<Sliver-X> Loading and Storing them? Yes, they behave the same.
<Sliver-X> However, you can only do math functions with A.
<Sliver-X> X and Y are index registers, not math ones.
<Sliver-X> LDX and LDY also have Zero Page, Memory and Literal functions.

LDA is either A5 or A9 and it stands for Load Acumulator. An accumulator is a register.
Quote:<Sliver-X> It's a register. A register is, in this case, a one byte (8 bit) cell of RAM inside the CPU itself.
<danke> It's like a pocket, that can fit one thing in it.
Quote:<danke> And if you LDA #$05, you're taking whatever byte is at 05, and putting it in that pocket. Then if you STA $FF00, you take it from the pocket, and put a copy of it at $FF00.
Quote:$ = address.
# = value.
#$ means Literal Hex value.

Quote:Zeemis> and TAX?
<danke> TAX takes what's in A, and copies it to X.
<danke> Transfer A to X.
  Find
Quote  



Messages In This Thread
My Assembly Notes - by Zeemis - 03-04-2011, 04:49 AM
RE: My Assembly Notes - by Angelo26 - 03-04-2011, 07:49 PM

Forum Jump:

Users browsing this thread: 1 Guest(s)


Theme by Madsiur2017Custom Graphics by JamesWhite