diff --git a/examples/asm.v b/examples/asm.v index de861a4614..88c75ec318 100644 --- a/examples/asm.v +++ b/examples/asm.v @@ -2,13 +2,15 @@ fn main() { a := 100 b := 20 mut c := 0 - asm amd64 { - mov eax, a - add eax, b - mov c, eax - ; =r (c) // output - ; r (a) // input - r (b) + $if amd64 { + asm amd64 { + mov eax, a + add eax, b + mov c, eax + ; =r (c) // output + ; r (a) // input + r (b) + } } println('a: $a') // 100 println('b: $b') // 20