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

SLEEP (SPC700): Difference between revisions

From SnesLab
Jump to: navigation, search
(→‎References: Table C-20)
(EI/DI have no effect)
 
(9 intermediate revisions by the same user not shown)
Line 14: Line 14:


{| class="wikitable" style="float:right;clear:right;width:30%"
{| class="wikitable" style="float:right;clear:right;width:30%"
!colspan="8"|Flags Clobbered
!colspan="8"|Flags Affected
|+
|+
|N
|[[Negative Flag|N]]
|V
|[[Overflow Flag|V]]
|P
|[[Direct Page Flag|P]]
|B
|[[Break Flag|B]]
|H
|[[Half-Carry Flag|H]]
|I
|[[Interrupt Enable Flag|I]]
|Z
|[[Zero Flag|Z]]
|C
|[[Carry Flag|C]]
|+
|+
|.
|.
Line 35: Line 35:
|}
|}


'''SLEEP''' is an [[SPC700]] standby instruction.  It hangs the [[S-SMP]] until reset.<sup>[2]</sup>
'''SLEEP''' is an [[SPC700]] standby instruction.  It hangs the [[S-SMP]] until reset.<sup>[2]</sup> Nintendo does not want you to use this instruction.<sup>[3]</sup>
 
[[EI]] and [[DI]] have no effect on the behavior of SLEEP.
 
No flags are affected.
 
==== Syntax ====
<pre>
SLEEP
</pre>
 
Perhaps SLEEP would have been more useful if the APU supported hardware interrupts.


=== See Also ===
=== See Also ===
Line 45: Line 56:
# Official Super Nintendo development manual on SLEEP: Table C-20 in [https://archive.org/details/SNESDevManual/book1/page/n235 Appendix C-10 of Book I]
# Official Super Nintendo development manual on SLEEP: Table C-20 in [https://archive.org/details/SNESDevManual/book1/page/n235 Appendix C-10 of Book I]
# https://problemkaputt.de/fullsnes.htm#snesapuspc700cpujumpcontrolcommands
# https://problemkaputt.de/fullsnes.htm#snesapuspc700cpujumpcontrolcommands
# [https://archive.org/details/SNESDevManual/book1/page/n226 Appendix C-1]
# anomie: https://github.com/yupferris/TasmShiz/blob/master/spc700.txt#L584


[[Category:ASM]]
[[Category:ASM]]
[[Category:SPC700]]
[[Category:SPC700]]
[[Category:Other SPC700 Commands]]
[[Category:Other SPC700 Commands]]
[[Category:One-byte Instructions]]

Latest revision as of 06:03, 22 July 2024

Basic Info
Addressing Mode Opcode Length Speed
Implied (type 3) EF 1 byte 3 cycles
Flags Affected
N V P B H I Z C
. . . . . . . .

SLEEP is an SPC700 standby instruction. It hangs the S-SMP until reset.[2] Nintendo does not want you to use this instruction.[3]

EI and DI have no effect on the behavior of SLEEP.

No flags are affected.

Syntax

SLEEP

Perhaps SLEEP would have been more useful if the APU supported hardware interrupts.

See Also

References

  1. Official Super Nintendo development manual on SLEEP: Table C-20 in Appendix C-10 of Book I
  2. https://problemkaputt.de/fullsnes.htm#snesapuspc700cpujumpcontrolcommands
  3. Appendix C-1
  4. anomie: https://github.com/yupferris/TasmShiz/blob/master/spc700.txt#L584