new version
[Chiptunes.git] / foo.c
diff --git a/foo.c b/foo.c
index f8703c351e36b1ba4f33e72f8617ab2bb286a625..6c1e73834f4ecc6d6923cf94f8b6c5412513405f 100644 (file)
--- a/foo.c
+++ b/foo.c
@@ -41,10 +41,21 @@ int main(void) {
                LSL     (n)
                #define tmp acc
                MOV     (tmp, i1)
-               tmp >>= 6;
+               SWAP    (tmp)
+               ANDI    (tmp, 0x0f)
+               LSR     (tmp)
+               LSR     (tmp)
                OR      (n, tmp)
                #undef tmp
-               s = (i3<<7 | i2>>1);
+               MOV     (s, i3)
+               ROR     (s)
+               ROR     (s)
+               ANDI    (s, 0x80)
+               #define tmp acc
+               MOV     (tmp, i2)
+               LSR     (tmp)
+               OR      (s, tmp)
+               #undef tmp
 
                //voice 1:
                LDI     (x, 1)
Imprint / Impressum