new version
[Chiptunes.git] / foo.c
diff --git a/foo.c b/foo.c
index 4edaa89c09d56ef77f5dc05870f303ae211cff57..06ff396e4838d7e6f9ad853555554167eaf8da66 100644 (file)
--- a/foo.c
+++ b/foo.c
@@ -49,7 +49,13 @@ int main(void) {
 
                //voice 2:
                MOV     (x, s)
-               t = n ^ (i2<<3 | i1>>5);
+               #define tmp o
+               MOV     (o, i2)
+               LSL     (o)
+               LSL     (o)
+               LSL     (o)
+               #undef tmp
+               t = n ^ (o | i1>>5);
                LDI     (o, 10)
                RCALL   g();
                ADD     (acc, t)
@@ -75,5 +81,6 @@ int main(void) {
                ADC     (i1, tmp, !i0)
                ADC     (i2, tmp, !i0&&!i1)
                ADC     (i3, tmp, !i0&&!i1&&!i2)
+               #undef tmp
        }
 }
Imprint / Impressum