Skip to content

Instantly share code, notes, and snippets.

@DavidSouther
Created May 26, 2021 00:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DavidSouther/4ca8f0bf7cd2d64fefa3fc6b0264296f to your computer and use it in GitHub Desktop.
Save DavidSouther/4ca8f0bf7cd2d64fefa3fc6b0264296f to your computer and use it in GitHub Desktop.
.assembly extern mscorlib {}
.assembly addnums {}
.method static void main()
{
.entrypoint
.maxstack 11
.locals init ( int32 )
ldc.i4.s 10
stloc.0
ldloc.0
ldloc.0
ldc.i4.1
sub
stloc.0
ldloc.0
ldloc.0
ldc.i4.1
sub
stloc.0
ldloc.0
ldloc.0
ldc.i4.1
sub
stloc.0
ldloc.0
ldloc.0
ldc.i4.1
sub
stloc.0
ldloc.0
ldloc.0
ldc.i4.1
sub
stloc.0
ldloc.0
ldloc.0
ldc.i4.1
sub
stloc.0
ldloc.0
ldloc.0
ldc.i4.1
sub
stloc.0
ldloc.0
ldloc.0
ldc.i4.1
sub
stloc.0
ldloc.0
ldloc.0
ldc.i4.1
sub
stloc.0
ldloc.0
add // 1 + 2
add // + 3
add // + 4
add // + 5
add // + 6
add // + 7
add // + 8
add // + 9
add // + 10
call void [mscorlib]System.Console::WriteLine(int32)
ret
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment