         SetLocal(math)
       )
     }
+
+    /**
+     * Performs the operation <code>target = float(source)</code>.
+     *
+     * <p>Note that the source is treated like an integer and converted
+     * to float.</p>
+     *
+     * @param target Target address in domain memory.
+     * @param source Source address in domain memory.
+     */
+    public static function i2f(target: int, source: int): void {
+      __asm(
+        GetLocal(source),
+        GetInt,
+        ConvertDouble,
+        GetLocal(target),
+        SetFloat,
+
+        GetLocal(source),
+        PushByte(0x04),
+        AddInt,
+        GetInt,
+        ConvertDouble,
+        GetLocal(target),
+        PushByte(0x04),
+        AddInt,
+        SetFloat,
+
+        GetLocal(source),
+        PushByte(0x08),
+        AddInt,
+        GetInt,
+        ConvertDouble,
+        GetLocal(target),
+        PushByte(0x08),
+        AddInt,
+        SetFloat,
+
+        GetLocal(source),
+        PushByte(0x0c),
+        AddInt,
+        GetInt,
+        ConvertDouble,
+        GetLocal(target),
+        PushByte(0x0c),
+        AddInt,
+        SetFloat
+      )
+    }
+
+    /**
+     * Performs the operation <code>target = int(source)</code>.
+     *
+     * <p>Note that the source is treated like a float and converted
+     * to int.</p>
+     *
+     * @param target Target address in domain memory.
+     * @param source Source address in domain memory.
+     */
+    public static function f2i(target: int, source: int): void {
+      __asm(
+        GetLocal(source),
+        GetFloat,
+        ConvertInt,
+        GetLocal(target),
+        SetInt,
+
+        GetLocal(source),
+        PushByte(0x04),
+        AddInt,
+        GetFloat,
+        ConvertInt,
+        GetLocal(target),
+        PushByte(0x04),
+        AddInt,
+        SetInt,
+
+        GetLocal(source),
+        PushByte(0x08),
+        AddInt,
+        GetFloat,
+        ConvertInt,
+        GetLocal(target),
+        PushByte(0x08),
+        AddInt,
+        SetInt,
+
+        GetLocal(source),
+        PushByte(0x0c),
+        AddInt,
+        GetFloat,
+        ConvertInt,
+        GetLocal(target),
+        PushByte(0x0c),
+        AddInt,
+        SetInt
+      )
+    }
+
+    /**
+     * Performs the operation <code>target = int(source)</code>.
+     *
+     * <p>Note that the source is treated like an integer and converted
+     * to double. Remember also that the target registers are double based
+     * and 8b long whereas the source registers are integer based and only
+     * 4b long.</p>
+     *
+     * @param target Target address in domain memory.
+     * @param source Source address in domain memory.
+     */
+    public static function i2d(target: int, source: int): void {
+      __asm(
+        GetLocal(source),
+        GetInt,
+        ConvertDouble,
+        GetLocal(target),
+        SetDouble,
+
+        GetLocal(source),
+        PushByte(0x04),
+        AddInt,
+        GetInt,
+        ConvertDouble,
+        GetLocal(target),
+        PushByte(0x08),
+        AddInt,
+        SetDouble,
+
+        GetLocal(source),
+        PushByte(0x08),
+        AddInt,
+        GetInt,
+        ConvertDouble,
+        GetLocal(target),
+        PushByte(0x10),
+        AddInt,
+        SetDouble,
+
+        GetLocal(source),
+        PushByte(0x0c),
+        AddInt,
+        GetInt,
+        ConvertDouble,
+        GetLocal(target),
+        PushByte(0x18),
+        AddInt,
+        SetDouble
+      )
+    }
+
+    /**
+     * Performs the operation <code>target = int(source)</code>.
+     *
+     * <p>Note that the source is treated like a double and converted
+     * to int. Remember also that the target registers are integer based
+     * and 4b long whereas the source registers are double based and
+     * 8b long.</p>
+     *
+     * @param target Target address in domain memory.
+     * @param source Source address in domain memory.
+     */
+    public static function d2i(target: int, source: int): void {
+      __asm(
+        GetLocal(source),
+        GetDouble,
+        ConvertInt,
+        GetLocal(target),
+        SetInt,
+
+        GetLocal(source),
+        PushByte(0x08),
+        AddInt,
+        GetDouble,
+        ConvertInt,
+        GetLocal(target),
+        PushByte(0x04),
+        AddInt,
+        SetInt,
+
+        GetLocal(source),
+        PushByte(0x10),
+        AddInt,
+        GetDouble,
+        ConvertInt,
+        GetLocal(target),
+        PushByte(0x08),
+        AddInt,
+        SetInt,
+
+        GetLocal(source),
+        PushByte(0x18),
+        AddInt,
+        GetDouble,
+        ConvertInt,
+        GetLocal(target),
+        PushByte(0x0c),
+        AddInt,
+        SetInt
+      )
+    }
   }
 }
   *
   * <p>All instructions are performed four times with respect
   * to the size of the datatype. Methods prefixed with <em>d</em>
   * are double based (8b) and methods prefixed with <em>f</em>
   * are float based (4b).</p>
   *
   * <p>To illustrate this, here is an example of <code>dmov</code>
   * using the <code>Memory</code> class:</p>

   * <p>This code is implemented in SIMD as well with some special
   * optimizations applied. Although SIMD is a macro it will never
   * modify any incoming parameters besides in the <code>*get</code>
   * instructions and <code>initMath</code>.
   *
   * You also do not have to fear register pressure since all
   * instructions are implemented without adding any extra registers.</p>
   *
