例1 †
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
-
!
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
.assembly x {
}
.method static void main() {
.entrypoint
ldstr "I'm"
call void class [mscorlib]System.Console::WriteLine(string)
ldc.i4.0 brfalse LABEL1
ldstr "smashy "
call void class [mscorlib]System.Console::WriteLine(string)
LABEL1:
ldstr "hungry."
call void class [mscorlib]System.Console::WriteLine(string)
ret
}
|
実行結果:
I'm
hungry.
例2 †
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
-
!
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
.assembly x {
}
.method static void main() {
.entrypoint
ldstr "I'm"
call void class [mscorlib]System.Console::WriteLine(string)
ldc.i4.0 brtrue LABEL1
ldstr "smashy "
call void class [mscorlib]System.Console::WriteLine(string)
LABEL1:
ldstr "hungry."
call void class [mscorlib]System.Console::WriteLine(string)
ret
}
|
実行結果:
I'm
smashy
hungry.
例3 †
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
-
!
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
.assembly x {
}
.method static void main() {
.entrypoint
ldstr "I'm hurting"
call void class [mscorlib]System.Console::WriteLine(string)
ldc.i4 20
ldc.i4 5
bgt LABEL1
ldstr "no"
call void class [mscorlib]System.Console::WriteLine(string)
LABEL1:
ldstr "one."
call void class [mscorlib]System.Console::WriteLine(string)
ret
}
|
実行結果:
I'm hurting
one.
例4 †
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
-
!
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
|
.assembly x {
}
.method static void main() {
.entrypoint
ldstr "I'm hurting"
call void class [mscorlib]System.Console::WriteLine(string)
ldc.i4 20
ldc.i4 5
blt LABEL1
ldstr "no"
call void class [mscorlib]System.Console::WriteLine(string)
LABEL1:
ldstr "one."
call void class [mscorlib]System.Console::WriteLine(string)
ret
}
|
実行結果:
I'm hurting
no
one.
}}
|
Last-modified: Mon, 27 Jul 2009 03:06:22 JST