We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
BGE (Super FX): Difference between revisions
From SnesLab
m (Jeffythedragonslayer moved page BGE to BGE (Super FX): Super FX in title) |
(negative flag -> sign flag) |
||
(21 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| class="wikitable" style="float:right;clear:right;width:40%" | {| class="wikitable" style="float:right;clear:right;width:40%" | ||
!colspan="8"|Basic Info | !colspan="8"|Basic Info | ||
|+ | |+ | ||
|'''Addressing Mode''' | |||
|'''Opcode''' | |'''Opcode''' | ||
|'''Length''' | |'''Length''' | ||
Line 10: | Line 9: | ||
|'''Cache Speed''' | |'''Cache Speed''' | ||
|+ | |+ | ||
|[[Program Counter Relative]] | |||
|07 | |07 | ||
|2 bytes | |2 bytes | ||
Line 18: | Line 18: | ||
{| class="wikitable" style="float:right;clear:right;width:30%" | {| class="wikitable" style="float:right;clear:right;width:30%" | ||
!colspan="9"|Flags | !colspan="9"|Flags Affected | ||
|+ | |+ | ||
|B | |[[B Flag|B]] | ||
|ALT1 | |[[ALT1]] | ||
|ALT2 | |[[ALT2]] | ||
|O/V | |[[O/V]] | ||
|S | |[[Sign Flag|S]] | ||
|CY | |[[CY]] | ||
|Z | |[[Zero Flag|Z]] | ||
|+ | |+ | ||
| | |. | ||
| | |. | ||
| | |. | ||
|. | |. | ||
|. | |. | ||
Line 36: | Line 36: | ||
|. | |. | ||
|} | |} | ||
'''BGE''' (Branch if Greater or Equal) is a [[Super FX]] opcode that performs a jump if the [[sign flag]] is equal to the [[O/V]] flag, effectively checking for a signed greater-equal comparison (compare [[BCS]] which is an unsigned greater-equal comparison). | |||
According to [[fullsnes]], the official documentation has BGE exchanged with [[BLT]]. <sup>[2]</sup> | |||
No flags are affected. | |||
==== Syntax ==== | |||
<pre> | |||
BGE e | |||
</pre> | |||
==== Example ==== | |||
Let the sign flag and O/V flag be set. This instruction jumps the program backward 3 bytes: | |||
<pre> | |||
BGE $-3h | |||
</pre> | |||
=== See also === | === See also === | ||
* [[BLT]] | * [[BLT]] | ||
* [[BCS]] | * [[BCS]] | ||
=== References === | |||
# Official Nintendo dev manual on BGE: 9.17 on [https://archive.org/details/SNESDevManual/book2/page/n176 page 2-9-20 of Book II] | |||
# https://problemkaputt.de/fullsnes.htm#snescartgsuncpumisc | |||
# example: [https://archive.org/details/SNESDevManual/book2/page/n177 page 2-9-21], lbid. | |||
[[Category:ASM]] | [[Category:ASM]] | ||
[[Category:Super FX]] | [[Category:Super FX]] | ||
[[Category:GSU Control Instructions]] | [[Category:GSU Control Instructions]] | ||
[[Category:Instructions with Delay Slots]] |
Latest revision as of 19:17, 4 August 2024
Basic Info | |||||||
---|---|---|---|---|---|---|---|
Addressing Mode | Opcode | Length | ROM Speed | RAM Speed | Cache Speed | ||
Program Counter Relative | 07 | 2 bytes | 6 cycles | 6 cycles | 2 cycles |
Flags Affected | ||||||||
---|---|---|---|---|---|---|---|---|
B | ALT1 | ALT2 | O/V | S | CY | Z | ||
. | . | . | . | . | . | . |
BGE (Branch if Greater or Equal) is a Super FX opcode that performs a jump if the sign flag is equal to the O/V flag, effectively checking for a signed greater-equal comparison (compare BCS which is an unsigned greater-equal comparison).
According to fullsnes, the official documentation has BGE exchanged with BLT. [2]
No flags are affected.
Syntax
BGE e
Example
Let the sign flag and O/V flag be set. This instruction jumps the program backward 3 bytes:
BGE $-3h
See also
References
- Official Nintendo dev manual on BGE: 9.17 on page 2-9-20 of Book II
- https://problemkaputt.de/fullsnes.htm#snescartgsuncpumisc
- example: page 2-9-21, lbid.