We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
BCS (Super FX): Difference between revisions
From SnesLab
(→External Links: hide archive URL) |
(note about delay slot) |
||
(9 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| class="wikitable" style="float:right;clear:right;width: | {| class="wikitable" style="float:right;clear:right;width:50%" | ||
!colspan="8"|Basic Info | !colspan="8"|Basic Info | ||
|+ | |+ | ||
|'''Addressing Mode''' | |||
|'''Opcode''' | |'''Opcode''' | ||
|'''Length''' | |'''Length''' | ||
Line 8: | Line 9: | ||
|'''Cache Speed''' | |'''Cache Speed''' | ||
|+ | |+ | ||
|[[Program Counter Relative]] | |||
|0D?? | |0D?? | ||
|2 bytes | |2 bytes | ||
Line 18: | Line 20: | ||
!colspan="9"|Flags Affected | !colspan="9"|Flags Affected | ||
|+ | |+ | ||
|B | |[[B Flag|B]] | ||
|[[ALT1]] | |[[ALT1]] | ||
|[[ALT2]] | |[[ALT2]] | ||
Line 24: | Line 26: | ||
|[[Sign Flag|S]] | |[[Sign Flag|S]] | ||
|[[CY]] | |[[CY]] | ||
|Z | |[[Zero Flag|Z]] | ||
|+ | |+ | ||
|. | |. | ||
Line 35: | Line 37: | ||
|} | |} | ||
'''BCS''' (Branch on | '''BCS''' (Branch on Carry Set) is a [[Super FX]] instruction that performs a conditional jump. The instruction after BCS is already in the pipeline and will run even if the branch occurs. | ||
If [[CY]] is clear, BCS does not jump. | If [[CY]] is clear, BCS does not jump. | ||
No flags are affected. | |||
==== Syntax ==== | |||
<pre> | |||
BCS e | |||
</pre> | |||
==== Example ==== | |||
Let the carry flag be set. This instruction jumps the program backward 1 byte: | |||
<pre> | |||
BCS $-1h | |||
</pre> | |||
=== See Also === | === See Also === | ||
Line 44: | Line 59: | ||
=== External Links === | === External Links === | ||
* Official Nintendo documentation on BCS: [https://archive.org/details/SNESDevManual/book2/page/n172 Page 2-9-16 of Book II] | * Official Nintendo documentation on BCS: 9.15 on [https://archive.org/details/SNESDevManual/book2/page/n172 Page 2-9-16 of Book II] | ||
* example: [https://archive.org/details/SNESDevManual/book2/page/n173 page 2-9-17], lbid. | * example: [https://archive.org/details/SNESDevManual/book2/page/n173 page 2-9-17], lbid. | ||
[[Category:Super FX]] | [[Category:Super FX]] | ||
[[Category:ASM]] | [[Category:ASM]] | ||
[[Category:Instructions with Delay Slots]] |
Latest revision as of 08:12, 14 July 2024
Basic Info | |||||||
---|---|---|---|---|---|---|---|
Addressing Mode | Opcode | Length | ROM Speed | RAM Speed | Cache Speed | ||
Program Counter Relative | 0D?? | 2 bytes | 6 cycles | 6 cycles | 2 cycles |
Flags Affected | ||||||||
---|---|---|---|---|---|---|---|---|
B | ALT1 | ALT2 | O/V | S | CY | Z | ||
. | . | . | . | . | . | . |
BCS (Branch on Carry Set) is a Super FX instruction that performs a conditional jump. The instruction after BCS is already in the pipeline and will run even if the branch occurs.
If CY is clear, BCS does not jump.
No flags are affected.
Syntax
BCS e
Example
Let the carry flag be set. This instruction jumps the program backward 1 byte:
BCS $-1h
See Also
External Links
- Official Nintendo documentation on BCS: 9.15 on Page 2-9-16 of Book II
- example: page 2-9-17, lbid.