We've just updated MediaWiki and its underlying software. If anything doesn't look or work quite right, please mention it to us. --RanAS
WDM: Difference between revisions
From SnesLab
(created page) |
(→External Links: hide archive URL for E&L) |
||
(27 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
''' | {| class="wikitable" style="float:right;clear:right;width:40%" | ||
!colspan="8"|Basic Info | |||
|+ | |||
|'''Addressing Mode''' | |||
|'''Opcode''' | |||
|'''Length''' | |||
|'''Speed''' | |||
|+ | |||
|[[Implied]] (type 3)<sup>[4]</sup> | |||
|42 | |||
|2 bytes | |||
|2 cycles | |||
|} | |||
{| class="wikitable" style="float:right;clear:right;width:30%" | {| class="wikitable" style="float:right;clear:right;width:30%" | ||
!colspan="8"|Flags | !colspan="8"|Flags Affected | ||
|+ | |+ | ||
|N | |[[N Flag|N]] | ||
|V | |[[V Flag|V]] | ||
|M | |[[M Flag|M]] | ||
|X | |[[X Flag|X]] | ||
|D | |[[D Flag|D]] | ||
|I | |[[I Flag|I]] | ||
|Z | |[[Z Flag|Z]] | ||
|C | |[[C Flag|C]] | ||
|+ | |+ | ||
|. | |. | ||
Line 22: | Line 34: | ||
|. | |. | ||
|} | |} | ||
'''WDM''' (the initials of [https://themenschfoundation.org/who-is-william-d-mensch-jr-aka-bill-mensch/ William David Mensch], the designer of the [[65c816]]) is an instruction that reserves its [[signature byte]] for future expansion of the instruction set. None of these extra 256 opcodes were ever implemented, so WDM functions essentially as a two-byte [[NOP]]. | |||
No flags are affected, but future expanded WDM opcodes may. | |||
WDM "works" even in [[emulation mode]]. | |||
==== Syntax ==== | |||
<pre> | |||
WDM | |||
WDM sig | |||
</pre> | |||
ca65 for example requires the signature byte to be specified in the assembly source. | |||
Directly specifying the opcode 42h can be used to skip the next instruction.<sup>[5]</sup> | |||
=== Trivia === | |||
* WDM is the only [[implied addressing]] instruction that is more than one byte long | |||
* The [[Labiak]] textbook does not describe the WDM instruction. | |||
=== See Also === | |||
* [[COP]] | |||
* [[BRK]] | |||
=== External Links === | |||
# [[Eyes & Lichty]], [https://archive.org/details/0893037893ProgrammingThe65816/page/523 page 523] on WDM | |||
# snes9x implementation of WDM: https://github.com/snes9xgit/snes9x/blob/master/cpuops.cpp#L3335 | |||
# undisbeliever on WDM: https://undisbeliever.net/snesdev/65816-opcodes.html#wdm-reserved-for-future-expansion | |||
# Table 5-4 Opcode Matrix of official 65c816 datasheet | |||
# Clark, Bruce. http://www.6502.org/tutorials/65c816opcodes.html#6.7 | |||
[[Category: ASM]] | [[Category: ASM]] | ||
[[Category:65c816 additions]] | |||
[[Category:Two-byte Instructions]] | |||
[[Category:Implied Instructions]] | |||
[[Category:Two-cycle Instructions]] |
Latest revision as of 16:18, 6 August 2024
Basic Info | |||||||
---|---|---|---|---|---|---|---|
Addressing Mode | Opcode | Length | Speed | ||||
Implied (type 3)[4] | 42 | 2 bytes | 2 cycles |
Flags Affected | |||||||
---|---|---|---|---|---|---|---|
N | V | M | X | D | I | Z | C |
. | . | . | . | . | . | . | . |
WDM (the initials of William David Mensch, the designer of the 65c816) is an instruction that reserves its signature byte for future expansion of the instruction set. None of these extra 256 opcodes were ever implemented, so WDM functions essentially as a two-byte NOP.
No flags are affected, but future expanded WDM opcodes may.
WDM "works" even in emulation mode.
Syntax
WDM WDM sig
ca65 for example requires the signature byte to be specified in the assembly source.
Directly specifying the opcode 42h can be used to skip the next instruction.[5]
Trivia
- WDM is the only implied addressing instruction that is more than one byte long
- The Labiak textbook does not describe the WDM instruction.
See Also
External Links
- Eyes & Lichty, page 523 on WDM
- snes9x implementation of WDM: https://github.com/snes9xgit/snes9x/blob/master/cpuops.cpp#L3335
- undisbeliever on WDM: https://undisbeliever.net/snesdev/65816-opcodes.html#wdm-reserved-for-future-expansion
- Table 5-4 Opcode Matrix of official 65c816 datasheet
- Clark, Bruce. http://www.6502.org/tutorials/65c816opcodes.html#6.7