We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
STB (Super FX): Difference between revisions
From SnesLab
(linkify B) |
(→See Also: LDB) |
||
(16 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
!colspan="8"|Basic Info | !colspan="8"|Basic Info | ||
|+ | |+ | ||
|'''Addressing Mode''' | |||
|'''Opcode''' | |'''Opcode''' | ||
|'''Length''' | |'''Length''' | ||
Line 8: | Line 9: | ||
|'''Cache Speed''' | |'''Cache Speed''' | ||
|+ | |+ | ||
|[[Implied Indirect]] | |||
|3D3m | |3D3m | ||
|2 bytes | |2 bytes | ||
Line 24: | Line 26: | ||
|[[Sign Flag|S]] | |[[Sign Flag|S]] | ||
|[[CY]] | |[[CY]] | ||
|Z | |[[Zero Flag|Z]] | ||
|+ | |+ | ||
|0 | |0 | ||
Line 35: | Line 37: | ||
|} | |} | ||
'''STB''' (Store Byte) is a [[Super FX]] instruction that stores | '''STB''' (Store Byte) is a [[Super FX]] instruction that stores the low byte of the [[source register]] to the [[Game Pak]]. STB expects the target address to be in the R<sub>m</sub> register. The bank must be specified with [[RAMB]]. | ||
The operand may be any register from R<sub>0</sub> to R<sub>11</sub>. The number of cycles can vary because of the [[RAM buffer]]. | |||
The source register should be specified in advance using [[WITH]] or [[FROM]]. Otherwise, R<sub>0</sub> serves as the default. | |||
The [[ALT0]] state is restored. | |||
==== Syntax ==== | |||
<pre> | |||
STB (Rm) | |||
</pre> | |||
==== Example ==== | |||
Let: | |||
S<sub>reg</sub> : R<sub>5</sub> | |||
R<sub>5</sub> = 216ch | |||
R<sub>8</sub> = 9a34h | |||
RAMBR = 70h | |||
After STB (R<sub>8</sub>) is executed: | |||
(70:9A34h) = 6ch | |||
=== See Also === | === See Also === | ||
* [[STW]] | * [[STW]] | ||
* [[LDB]] | |||
* [[ALT1]] | |||
=== External Links === | === External Links === | ||
* Official Super Nintendo development manual on STB: [https://archive.org/details/SNESDevManual/book2/page/n271 | * Official Super Nintendo development manual on STB: 9.83 on [https://archive.org/details/SNESDevManual/book2/page/n271 page 2-9-115] | ||
[[Category:ASM]] | [[Category:ASM]] | ||
[[Category:Super FX]] | [[Category:Super FX]] | ||
[[Category:Data Transfer Instructions]] | [[Category:Data Transfer Instructions]] | ||
[[Category:Expects Sreg/Dreg Prearranged]] |
Latest revision as of 05:20, 16 July 2024
Basic Info | |||||||
---|---|---|---|---|---|---|---|
Addressing Mode | Opcode | Length | ROM Speed | RAM Speed | Cache Speed | ||
Implied Indirect | 3D3m | 2 bytes | 6 to 9 cycles | 8 to 14 cycles | 2 to 5 cycles |
Flags Affected | ||||||||
---|---|---|---|---|---|---|---|---|
B | ALT1 | ALT2 | O/V | S | CY | Z | ||
0 | 0 | 0 | . | . | . | . |
STB (Store Byte) is a Super FX instruction that stores the low byte of the source register to the Game Pak. STB expects the target address to be in the Rm register. The bank must be specified with RAMB.
The operand may be any register from R0 to R11. The number of cycles can vary because of the RAM buffer.
The source register should be specified in advance using WITH or FROM. Otherwise, R0 serves as the default.
The ALT0 state is restored.
Syntax
STB (Rm)
Example
Let:
Sreg : R5 R5 = 216ch R8 = 9a34h RAMBR = 70h
After STB (R8) is executed:
(70:9A34h) = 6ch
See Also
External Links
- Official Super Nintendo development manual on STB: 9.83 on page 2-9-115