Skip to content

Commit a3d8f6b

Browse files
committed
Testing stuff
1 parent e3b6d6d commit a3d8f6b

File tree

8 files changed

+212
-0
lines changed

8 files changed

+212
-0
lines changed

hello.cs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System;
2+
3+
public class Program {
4+
5+
public static void Main(string[] args) {
6+
int i = 44;
7+
Console.WriteLine(i);
8+
}
9+
10+
}

hello.exe

3.5 KB
Binary file not shown.

hello.il

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
2+
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
3+
// Copyright (c) Microsoft Corporation. All rights reserved.
4+
5+
6+
7+
// Metadata version: v4.0.30319
8+
.assembly extern mscorlib
9+
{
10+
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
11+
.ver 4:0:0:0
12+
}
13+
.assembly hello
14+
{
15+
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
16+
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
17+
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
18+
19+
// --- The following custom attribute is added automatically, do not uncomment -------
20+
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 )
21+
22+
.hash algorithm 0x00008004
23+
.ver 0:0:0:0
24+
}
25+
.module hello.exe
26+
// MVID: {31FD3790-1362-468D-A274-F7BE1C5713F1}
27+
.imagebase 0x00400000
28+
.file alignment 0x00000200
29+
.stackreserve 0x00100000
30+
.subsystem 0x0003 // WINDOWS_CUI
31+
.corflags 0x00000001 // ILONLY
32+
// Image base: 0x00850000
33+
34+
35+
// =============== CLASS MEMBERS DECLARATION ===================
36+
37+
.class public auto ansi beforefieldinit Program
38+
extends [mscorlib]System.Object
39+
{
40+
.method public hidebysig static void Main(string[] args) cil managed
41+
{
42+
.entrypoint
43+
// Code size 12 (0xc)
44+
.maxstack 1
45+
.locals init (int32 V_0)
46+
IL_0000: nop
47+
IL_0001: ldc.i4.s 44
48+
IL_0003: stloc.0
49+
IL_0004: ldloc.0
50+
IL_0005: call void [mscorlib]System.Console::WriteLine(int32)
51+
IL_000a: nop
52+
IL_000b: ret
53+
} // end of method Program::Main
54+
55+
.method public hidebysig specialname rtspecialname
56+
instance void .ctor() cil managed
57+
{
58+
// Code size 8 (0x8)
59+
.maxstack 8
60+
IL_0000: ldarg.0
61+
IL_0001: call instance void [mscorlib]System.Object::.ctor()
62+
IL_0006: nop
63+
IL_0007: ret
64+
} // end of method Program::.ctor
65+
66+
} // end of class Program
67+
68+
69+
// =============================================================
70+
71+
// *********** DISASSEMBLY COMPLETE ***********************
72+
// WARNING: Created Win32 resource file hello.res

hello.res

1.1 KB
Binary file not shown.

loop.cs

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
3+
public class Program {
4+
public static void Main() {
5+
6+
for (int i = 1; i <= 100;i++) {
7+
if (i == 1) {
8+
Console.WriteLine(5);
9+
} else if (i == 2) {
10+
Console.WriteLine(4);
11+
}
12+
}
13+
}
14+
15+
}

loop.exe

3.5 KB
Binary file not shown.

loop.il

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
2+
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
3+
// Copyright (c) Microsoft Corporation. All rights reserved.
4+
5+
6+
7+
// Metadata version: v4.0.30319
8+
.assembly extern mscorlib
9+
{
10+
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
11+
.ver 4:0:0:0
12+
}
13+
.assembly loop
14+
{
15+
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
16+
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
17+
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
18+
19+
// --- The following custom attribute is added automatically, do not uncomment -------
20+
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 )
21+
22+
.hash algorithm 0x00008004
23+
.ver 0:0:0:0
24+
}
25+
.module loop.exe
26+
// MVID: {B4662CC7-D84F-4F3B-A648-089F03F07A3C}
27+
.imagebase 0x00400000
28+
.file alignment 0x00000200
29+
.stackreserve 0x00100000
30+
.subsystem 0x0003 // WINDOWS_CUI
31+
.corflags 0x00000001 // ILONLY
32+
// Image base: 0x03040000
33+
34+
35+
// =============== CLASS MEMBERS DECLARATION ===================
36+
37+
.class public auto ansi beforefieldinit Program
38+
extends [mscorlib]System.Object
39+
{
40+
.method public hidebysig static void Main() cil managed
41+
{
42+
.entrypoint
43+
// Code size 60 (0x3c)
44+
.maxstack 2
45+
.locals init (int32 V_0,
46+
bool V_1,
47+
bool V_2,
48+
bool V_3)
49+
IL_0000: nop
50+
IL_0001: ldc.i4.1
51+
IL_0002: stloc.0
52+
IL_0003: br.s IL_002f
53+
54+
IL_0005: nop
55+
IL_0006: ldloc.0
56+
IL_0007: ldc.i4.1
57+
IL_0008: ceq
58+
IL_000a: stloc.1
59+
IL_000b: ldloc.1
60+
IL_000c: brfalse.s IL_0019
61+
62+
IL_000e: nop
63+
IL_000f: ldc.i4.5
64+
IL_0010: call void [mscorlib]System.Console::WriteLine(int32)
65+
IL_0015: nop
66+
IL_0016: nop
67+
IL_0017: br.s IL_002a
68+
69+
IL_0019: ldloc.0
70+
IL_001a: ldc.i4.2
71+
IL_001b: ceq
72+
IL_001d: stloc.2
73+
IL_001e: ldloc.2
74+
IL_001f: brfalse.s IL_002a
75+
76+
IL_0021: nop
77+
IL_0022: ldc.i4.4
78+
IL_0023: call void [mscorlib]System.Console::WriteLine(int32)
79+
IL_0028: nop
80+
IL_0029: nop
81+
IL_002a: nop
82+
IL_002b: ldloc.0
83+
IL_002c: ldc.i4.1
84+
IL_002d: add
85+
IL_002e: stloc.0
86+
IL_002f: ldloc.0
87+
IL_0030: ldc.i4.s 100
88+
IL_0032: cgt
89+
IL_0034: ldc.i4.0
90+
IL_0035: ceq
91+
IL_0037: stloc.3
92+
IL_0038: ldloc.3
93+
IL_0039: brtrue.s IL_0005
94+
95+
IL_003b: ret
96+
} // end of method Program::Main
97+
98+
.method public hidebysig specialname rtspecialname
99+
instance void .ctor() cil managed
100+
{
101+
// Code size 8 (0x8)
102+
.maxstack 8
103+
IL_0000: ldarg.0
104+
IL_0001: call instance void [mscorlib]System.Object::.ctor()
105+
IL_0006: nop
106+
IL_0007: ret
107+
} // end of method Program::.ctor
108+
109+
} // end of class Program
110+
111+
112+
// =============================================================
113+
114+
// *********** DISASSEMBLY COMPLETE ***********************
115+
// WARNING: Created Win32 resource file loop.res

loop.res

1.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)