Gitly
English
Русский
Español
日本語
中文
Português
Log in
Register
v2
/
vlib
/
v
/
checker
/
tests
/
asm_immutable_err.vv
16
lines
·
16
sloc
·
226 bytes
·
0c8ce3bcb9fd4a2e5bd5f991a5a07da976d780d7
Raw
1
fn main() {
2
a := 100
3
b := 20
4
c := 0
5
asm amd64 {
6
mov eax, a
7
add eax, b
8
mov c, eax
9
; =r (c) // output
10
; r (a) // input
11
r (b)
12
}
13
println('a: ${a}') // 100
14
println('b: ${b}') // 20
15
println('c: ${c}') // 120
16
}
17