/*

Copyright (c) 2010 Andrea Fazzi

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

*/

//
// Automatically generated file -- DO NOT EDIT
//

package spectrum

func initOpcodes() {

// BEGIN of non shifted opcodes

<%= opcodes_base.gsub("setSPHSPL", "setSP") %>

// END of non shifted opcodes

// BEGIN of 0xcb shifted opcodes

<%= opcodes_cb %>

// END of 0xcb shifted opcodes

// BEGIN of 0xed shifted opcodes

<%= opcodes_ed %>

// END of 0xed shifted opcodes

// BEGIN of 0xdd shifted opcodes

<%= opcodes_dd.\
    gsub(/REGISTER/i, "ix").\
    gsub("ix()", "IX()").\
    gsub("setixHixL", "setIX").\
    gsub("incixH", "incIXH").\
    gsub("decixH", "decIXH").
    gsub("incixL", "incIXL").\
    gsub("decixL", "decIXL").\
    gsub("z80.ix()", "z80.IX()").\
    gsub("ixH", "z80.IXH()").\
    gsub("ixL", "z80.IXL()")
%>

// END of 0xdd shifted opcodes

// BEGIN of 0xfd shifted opcodes

<%= opcodes_fd.\
    gsub(/REGISTER/i, "iy").\
    gsub("iy()", "IY()").\
    gsub("setiyHiyL", "setIY").\
    gsub("inciyH", "incIYH").\
    gsub("deciyH", "decIYH").
    gsub("inciyL", "incIYL").\
    gsub("deciyL", "decIYL").\
    gsub("z80.iy()", "z80.IY()").\
    gsub("iyH", "z80.IYH()").\
    gsub("iyL", "z80.IYL()").\
    gsub("shift0xdd", "shift0xfd")
%>

// END of 0xfd shifted opcodes

// BEGIN of 0xddfdcb shifted opcodes

<%= opcodes_ddfdcb %>

// END of 0xddfdcb shifted opcodes

}
