Advertisement
Guest User

Untitled

a guest
Apr 14th, 2019
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     /*max(a,b)
  2.     _asm
  3.     {
  4.         mov eax, a
  5.         cmp eax, b
  6.         jge L
  7.         mov eax, b
  8.         L: mov max, eax
  9.        
  10.     }*/
  11.     /*
  12.     if(x>0) S
  13.     _asm
  14.     {
  15.         mov eax, a
  16.         cmp eax, 0
  17.         jg S
  18.         mov eax, 0
  19. S:      mov res, eax
  20.     }*/
  21.  
  22.     /*
  23.     if(x <= 0) S1 else S2
  24.     _asm
  25.     {
  26.         mov eax, a
  27.         cmp eax, 0
  28.         jle S1
  29.         jg S2
  30.  
  31. S1:     mov eax, 1
  32.         jmp END
  33.  
  34. S2:     mov eax, 0
  35.         jmp END
  36.  
  37. END:    mov res, eax
  38.     }*/
  39.     /*
  40.     if(a > 0 && b > 0)
  41.     _asm
  42.     {
  43.         mov eax, a
  44.         mov ebx, b
  45.         cmp eax, 0
  46.         jg COMP2
  47.         jmp S2
  48. COMP2:  cmp ebx, 0
  49.         jg S1
  50.         jmp S2
  51.  
  52. S1:     mov eax, 1
  53.         jmp END
  54.  
  55. S2:     mov eax, 0
  56.         jmp END
  57.  
  58. END:    mov res, eax
  59.     }*/
  60.     /*if(a > 0 || b > 0 && c > 0)
  61.     _asm
  62.         {
  63.         mov eax, a
  64.         mov ebx, b
  65.         cmp eax, 0
  66.         jle COMP2
  67.         jmp S1
  68. COMP2:  cmp ebx, 0
  69.         jle S2
  70.         jmp S1
  71.  
  72. S1:     mov eax, 1
  73.         jmp END
  74.  
  75. S2:     mov eax, 0
  76.         jmp END
  77.  
  78. END:    mov res, eax
  79.         }*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement