例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 // スタックに0をpush
     brfalse    LABEL1 // popした値がfalseならLABEL1へ。0はfalse。
 
     //実行されない
     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 // スタックに0をpush
     brtrue    LABEL1 // popした値がtrueならLABEL1へ。0はfalse。
 
     //実行される
     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 // if( 20>5 ) goto 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 //if( 20<5 ) goto 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.

}}


トップ 編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード 新規 一覧 単語検索 最終更新 リンク元 ヘルプ 最終更新のRSS xenowire
Last-modified: Mon, 27 Jul 2009 03:06:22 JST