Created
July 17, 2013 15:03
-
-
Save AlexArchive/6021379 to your computer and use it in GitHub Desktop.
Demo: Basic For Loop in MSIL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.assembly extern mscorlib {} | |
.assembly Test | |
{ | |
.ver 1:0:1:0 | |
} | |
.module test.exe | |
.method static void main() cil managed | |
{ | |
.locals init (int32, int32) | |
.maxstack 2 | |
.entrypoint | |
ldc.i4 4 | |
stloc.0 | |
ldc.i4 0 | |
stloc.1 | |
Start: | |
ldloc.1 | |
ldloc.0 | |
bgt Exit | |
ldloc.1 | |
call void [mscorlib]System.Console::WriteLine(int32) | |
ldc.i4 1 | |
ldloc.1 | |
add | |
stloc.1 | |
br Start | |
Exit: | |
ret | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment