We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS

SBK (Super FX): Difference between revisions

From SnesLab
Jump to: navigation, search
m (Jeffythedragonslayer moved page SBK to SBK (Super FX): Super FX in title)
(implied admode)
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''SBK''' is a [[Super FX]] instruction that uses bulk processing.
{| class="wikitable" style="float:right;clear:right;width:50%"
 
{| 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'''
|+
|+
|[[Implied]] (type 1)
|90
|90
|1 byte
|1 byte
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 Clobbered
!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]]
|+
|+
|0
|0
Line 36: Line 36:
|.
|.
|}
|}
'''SBK''' is a [[Super FX]] instruction that uses [[bulk processing]]. It stores the value in the [[source register]] to the address in the [[Ram Address Cache (Super FX)|ram address cache]].
The [[ALT0]] state is restored.
The source register should be specified in advance using [[WITH]] or [[FROM]].  Otherwise, R<sub>0</sub> serves as the default.
==== Syntax ====
<pre>
SBK
</pre>
==== Example ====
Let:
(70:3230h) = 51h
(70:3231h) = 49h
RAMBR = 70h
After executing this program:
LM  R<sub>1</sub>, (3230h)
INC  R<sub>1</sub>
SBK
We have:
R<sub>1</sub> = 4952h
(70:3230h) = 52h
(70:3231h) = 49h


=== External Links ===
=== External Links ===
* Official Nintendo documentation on SBK: https://archive.org/details/SNESDevManual/book2/page/n265
* Official Super Nintendo development manual on SBK: 9.79 on [https://archive.org/details/SNESDevManual/book2/page/n265 page 2-9-109 of Book II]


[[Category:ASM]]
[[Category:ASM]]
[[Category:Super FX]]
[[Category:Super FX]]
[[Category:Data Transfer Instructions]]
[[Category:Data Transfer Instructions]]
[[Category:One-byte Instructions]]
[[Category:Expects Sreg/Dreg Prearranged]]

Latest revision as of 05:18, 16 July 2024

Basic Info
Addressing Mode Opcode Length ROM Speed RAM Speed Cache Speed
Implied (type 1) 90 1 byte 3 to 8 cycles 7 to 11 cycles 1 to 6 cycles
Flags Affected
B ALT1 ALT2 O/V S CY Z
0 0 0 . . . .

SBK is a Super FX instruction that uses bulk processing. It stores the value in the source register to the address in the ram address cache.

The ALT0 state is restored.

The source register should be specified in advance using WITH or FROM. Otherwise, R0 serves as the default.

Syntax

SBK

Example

Let:

(70:3230h) = 51h
(70:3231h) = 49h
RAMBR = 70h

After executing this program:

LM   R1, (3230h)
INC  R1
SBK

We have:

R1 = 4952h
(70:3230h) = 52h
(70:3231h) = 49h

External Links