     "opcodes_base.dat":   "opcodes_base.c: unshifted Z80 opcodes",
 ]
 
+
+//Function Map, because Swift reflection is weird
+let funcTable : [String : (String, String) -> Void] = [
+    "ADC":   ADC,
+    "ADD":   ADD,
+    "AND ":   AND ,
+    "BIT":   BIT,
+    "CALL":   CALL,
+    "CCF":   CCF,
+    "CP":   CP,
+    "CPD":   CPD,
+    "CPDR":   CPDR,
+    "CPI":   CPI,
+    "CPIR":   CPIR,
+    "CPL":   CPL,
+    "DAA":   DAA,
+    "DEC":   DEC,
+    "DI":   DI,
+    "DJNZ":   DJNZ,
+    "EI":   EI,
+    "EX":   EX,
+    "EXX":   EXX,
+    "HALT":   HALT,
+    "IM":   IM,
+    "IN":   IN,
+    "INC":   INC,
+    "IND":   IND,
+    "INDR":   INDR,
+    "INI":   INI,
+    "INIR":   INIR,
+    "JP":   JP,
+    "JR":   JR,
+    "LD":   LD,
+    "LDD":   LDD,
+    "LDDR":   LDDR,
+    "LDI":   LDI,
+    "LDIR":   LDIR,
+    "NEG":   NEG,
+    "NOP":   NOP,
+    "OR":   OR,
+    "OTDR":   OTDR,
+    "OTIR":   OTIR,
+    "OUT":   OUT,
+    "OUTD":   OUTD,
+    "OUTI":   OUTI,
+    "POP":   POP,
+    "PUSH":   PUSH,
+    "RES":   RES,
+    "RET":   RET,
+    "RETN":   RETN,
+    "RL":   RL,
+    "RLC":   RLC,
+    "RLCA":   RLCA,
+    "RLA":   RLA,
+    "RLD":   RLD,
+    "RR":   RR,
+    "RRA":   RRA,
+    "RRC":   RRC,
+    "RRCA":   RRCA,
+    "RRD":   RRD,
+    "RST":   RST,
+    "SBC":   SBC,
+    "SCF":   SCF,
+    "SET ":   SET ,
+    "SLA":   SLA,
+    "SLL":   SLL,
+    "SRA":   SRA,
+    "SRL":   SRL,
+    "SUB":   SUB,
+    "XOR":   XOR,
+    "SLTTRAP":   SLTTRAP,
+]
+
+//Remove invalid characters
+func turnIntoIdentifier (inStr : String) -> String{
+    var out = inStr
+    
+    //Replaces Spaces and ,
+    out = out.replacingOccurrences(of: " ", with: "_")
+    out = out.replacingOccurrences(of: ",", with: "_")
+    
+    //Replace Brackets
+    out = out.replacingOccurrences(of: "(", with: "i")
+    out = out.replacingOccurrences(of: ")", with: "")
+    
+    //Replace plus signs and '
+    out = out.replacingOccurrences(of: "+", with: "p")
+    out = out.replacingOccurrences(of: "'", with: "")
+    
+    //Return result
+    return out
+}
+
+

    } else {
        exit(10)
    }

}

func EXX(_ a : String, _ b : String) {


func RLC(_ a : String, _ b : String) { rotate_shift(opcode: "RLC", register: a)}

func RLCA(_ a : String, _ b : String) {
    ln(sList : ["z80.A = ( z80.A << 1 ) | ( z80.A >> 7 )"])
    ln(sList : ["z80.F = ( z80.F & ( FLAG_P | FLAG_Z | FLAG_S ) ) |"])
    ln(sList : ["        ( z80.A & ( FLAG_C | FLAG_3 | FLAG_5 ) )"])
}


func RLA(_ a : String, _ b : String) {
    ln(sList : ["var bytetemp : UInt8 = z80.A"])
    ln(sList : ["z80.A = ( z80.A << 1 ) | ( z80.F & FLAG_C )"])
