Users browsing this thread: 1 Guest(s)
My Assembly Notes
03-04-2011, 07:49 PM
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.
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.
« Next Oldest | Next Newest »
|
||||
Users browsing this thread: 1 Guest(s)