My Assembly Notes - Printable Version +- FF6 Hacking (https://www.ff6hacking.com/forums) +-- Forum: Discussion Forums (https://www.ff6hacking.com/forums/forum-5.html) +--- Forum: Magitek Research Facility (https://www.ff6hacking.com/forums/forum-9.html) +--- Thread: My Assembly Notes (/thread-928.html) |
My Assembly Notes - Zeemis - 03-04-2011 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? Quote:<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. 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. Quote:Zeemis> and TAX? RE: My Assembly Notes - Angelo26 - 03-04-2011 I can help a little here: JSR - Jump to Subroutine - uses the opcode "20", used to "jump" to any address in the same bank. Two bytes needed. Once the jump is done and the code is executed, a "RTS" (return from subroutine) is needed - opcode is "60". Example: 20 63 53 - go to address 5363. JSL - Jump to Subroutine LONG - uses the opcode "22". Can jump to any address in the ROM. After jumping and executing the code, needs a "6B" opcode to return. Example: 22 63 53 C2 - go to address C2/5363. JMP - "Jump", opcode "4C". I believe you cannot jump to other banks using this command. Example: 4C 93 22 - go to address 2293. ASL - opcode "0A", used as arithmetic to multiply a number by power of two each time it's called. Example: to multiply a variable by 16, you would need to use 4 consecutive 0A commands. |