fork(2) download
  1. ; Listing generated by Microsoft (R) Optimizing Compiler Version 17.00.50727.1
  2.  
  3. TITLE c:\Users\Ivan\documents\visual studio 2012\Projects\OEVM3_CPP\OEVM3_CPP\Source.cpp
  4. .686P
  5. .XMM
  6. include listing.inc
  7. .model flat
  8.  
  9. INCLUDELIB MSVCRTD
  10. INCLUDELIB OLDNAMES
  11.  
  12. PUBLIC _main
  13. EXTRN @__security_check_cookie@4:PROC
  14. EXTRN ___security_cookie:DWORD
  15. ; Function compile flags: /Ogsp
  16. ; File c:\users\ivan\documents\visual studio 2012\projects\oevm3_cpp\oevm3_cpp\source.cpp
  17. ; COMDAT _main
  18. _TEXT SEGMENT
  19. _g$1$ = -56 ; size = 4
  20. _tmp$1$ = -52 ; size = 4
  21. _c$1$ = -45 ; size = 1
  22. _arr$ = -44 ; size = 40
  23. __$ArrayPad$ = -4 ; size = 4
  24. _main PROC ; COMDAT
  25.  
  26. ; 2 : int main() {
  27.  
  28. push ebp
  29. mov ebp, esp
  30. sub esp, 56 ; 00000038H
  31. mov eax, DWORD PTR ___security_cookie
  32. xor eax, ebp
  33. mov DWORD PTR __$ArrayPad$[ebp], eax
  34.  
  35. ; 3 : int arr[10] = {4,9,2,0,1,5,3,8,7,6};
  36.  
  37. and DWORD PTR _arr$[ebp+12], 0
  38. push 5
  39. pop eax
  40. push ebx
  41. push esi
  42. mov DWORD PTR _arr$[ebp], 4
  43. mov DWORD PTR _arr$[ebp+4], 9
  44. mov DWORD PTR _arr$[ebp+8], 2
  45. mov DWORD PTR _arr$[ebp+16], 1
  46. mov DWORD PTR _g$1$[ebp], eax
  47. mov DWORD PTR _arr$[ebp+20], eax
  48. mov DWORD PTR _arr$[ebp+24], 3
  49. mov DWORD PTR _arr$[ebp+28], 8
  50. mov DWORD PTR _arr$[ebp+32], 7
  51. mov DWORD PTR _arr$[ebp+36], 6
  52. push edi
  53. $LL12@main:
  54.  
  55. ; 4 : int n = 10;
  56. ; 5 :
  57. ; 6 : bool c;
  58. ; 7 : int g;
  59. ; 8 : int i;
  60. ; 9 : int j;
  61. ; 10 : int tmp;
  62. ; 11 :
  63. ; 12 : n = n - 1;
  64. ; 13 : g = (n + 1) / 2;
  65. ; 14 : do {
  66. ; 15 : i = g;
  67.  
  68. lea edi, DWORD PTR _arr$[ebp]
  69. mov edx, eax
  70. xor esi, esi
  71. lea edi, DWORD PTR [edi+eax*4]
  72. $LL9@main:
  73.  
  74. ; 16 : do {
  75. ; 17 : j = i - g;
  76.  
  77. mov ecx, esi
  78.  
  79. ; 18 : c = true;
  80.  
  81. mov BYTE PTR _c$1$[ebp], 1
  82. mov ebx, edi
  83. $LL6@main:
  84.  
  85. ; 19 : do {
  86. ; 20 : if (arr[j] <= arr[j+g]) {
  87.  
  88. mov eax, DWORD PTR _arr$[ebp+ecx*4]
  89. mov DWORD PTR _tmp$1$[ebp], eax
  90. mov eax, DWORD PTR [ebx]
  91. cmp DWORD PTR _tmp$1$[ebp], eax
  92. jg SHORT $LN3@main
  93.  
  94. ; 21 : c = false;
  95.  
  96. mov BYTE PTR _c$1$[ebp], 0
  97.  
  98. ; 22 : } else {
  99.  
  100. jmp SHORT $LN2@main
  101. $LN3@main:
  102.  
  103. ; 23 : tmp = arr[j];
  104. ; 24 : arr[j] = arr[j+g];
  105.  
  106. mov DWORD PTR _arr$[ebp+ecx*4], eax
  107.  
  108. ; 25 : arr[j+g] = tmp;
  109.  
  110. mov eax, DWORD PTR _tmp$1$[ebp]
  111. mov DWORD PTR [ebx], eax
  112. $LN2@main:
  113.  
  114. ; 26 : }
  115. ; 27 : j = j - 1;
  116.  
  117. sub ebx, 4
  118. dec ecx
  119.  
  120. ; 28 : }
  121. ; 29 : while (j >= 0 && c);
  122.  
  123. js SHORT $LN1@main
  124. cmp BYTE PTR _c$1$[ebp], 0
  125. jne SHORT $LL6@main
  126. $LN1@main:
  127.  
  128. ; 30 : i = i + 1;
  129.  
  130. inc edx
  131. inc esi
  132. add edi, 4
  133.  
  134. ; 31 : }
  135. ; 32 : while (i <= n);
  136.  
  137. cmp edx, 9
  138. jle SHORT $LL9@main
  139.  
  140. ; 33 : g = g / 2;
  141.  
  142. mov eax, DWORD PTR _g$1$[ebp]
  143. cdq
  144. sub eax, edx
  145. sar eax, 1
  146. mov DWORD PTR _g$1$[ebp], eax
  147.  
  148. ; 34 : }
  149. ; 35 : while (g > 0);
  150.  
  151. test eax, eax
  152. jg SHORT $LL12@main
  153.  
  154. ; 36 :
  155. ; 37 : return 0;
  156. ; 38 : }
  157.  
  158. mov ecx, DWORD PTR __$ArrayPad$[ebp]
  159. pop edi
  160. pop esi
  161. xor ecx, ebp
  162. xor eax, eax
  163. pop ebx
  164. call @__security_check_cookie@4
  165. leave
  166. ret 0
  167. _main ENDP
  168. _TEXT ENDS
  169. END
  170.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.s: Assembler messages:
prog.s:1: Error: no such instruction: `listing generated by Microsoft (R)Optimizing Compiler Version 17.00.50727.1'
prog.s:3: Error: no such instruction: `title c:\Users\Ivan\documents\visual studio 2012\Projects\OEVM3_CPP\OEVM3_CPP\Source.cpp'
prog.s:4: Error: unknown pseudo-op: `.686p'
prog.s:5: Error: unknown pseudo-op: `.xmm'
prog.s:6: Error: no such instruction: `include listing.inc'
prog.s:7: Error: unknown pseudo-op: `.model'
prog.s:9: Error: no such instruction: `includelib MSVCRTD'
prog.s:10: Error: no such instruction: `includelib OLDNAMES'
prog.s:12: Error: no such instruction: `public _main'
prog.s:13: Error: no such instruction: `extrn @__security_check_cookie@4:PROC'
prog.s:14: Error: no such instruction: `extrn ___security_cookie:DWORD'
prog.s:15: Error: no such instruction: `function compile flags:/Ogsp'
prog.s:16: Error: no such instruction: `file c:\users\ivan\documents\visual studio 2012\projects\oevm3_cpp\oevm3_cpp\source.cpp'
prog.s:17: Error: no such instruction: `comdat _main'
prog.s:18: Error: no such instruction: `_text SEGMENT'
prog.s:24: Error: no such instruction: `_main PROC'
prog.s:24: Error: no such instruction: `comdat'
prog.s:26: Error: unknown vector operation: `{'
prog.s:29: Error: too many memory references for `mov'
prog.s:30: Error: too many memory references for `sub'
prog.s:30: Error: junk at end of line, first unrecognized character is `0'
prog.s:31: Error: too many memory references for `mov'
prog.s:32: Error: too many memory references for `xor'
prog.s:33: Error: junk `PTR __$ArrayPad$[ebp]' after expression
prog.s:33: Error: too many memory references for `mov'
prog.s:35: Error: invalid character '=' in operand 1
prog.s:37: Error: junk `PTR _arr$[ebp+12]' after expression
prog.s:37: Error: too many memory references for `and'
prog.s:42: Error: junk `PTR _arr$[ebp]' after expression
prog.s:42: Error: too many memory references for `mov'
prog.s:43: Error: junk `PTR _arr$[ebp+4]' after expression
prog.s:43: Error: too many memory references for `mov'
prog.s:44: Error: junk `PTR _arr$[ebp+8]' after expression
prog.s:44: Error: too many memory references for `mov'
prog.s:45: Error: junk `PTR _arr$[ebp+16]' after expression
prog.s:45: Error: too many memory references for `mov'
prog.s:46: Error: junk `PTR _g$1$[ebp]' after expression
prog.s:46: Error: too many memory references for `mov'
prog.s:47: Error: junk `PTR _arr$[ebp+20]' after expression
prog.s:47: Error: too many memory references for `mov'
prog.s:48: Error: junk `PTR _arr$[ebp+24]' after expression
prog.s:48: Error: too many memory references for `mov'
prog.s:49: Error: junk `PTR _arr$[ebp+28]' after expression
prog.s:49: Error: too many memory references for `mov'
prog.s:50: Error: junk `PTR _arr$[ebp+32]' after expression
prog.s:50: Error: too many memory references for `mov'
prog.s:51: Error: junk `PTR _arr$[ebp+36]' after expression
prog.s:51: Error: too many memory references for `mov'
prog.s:53: Error: invalid character '$' in mnemonic
prog.s:55: Error: invalid character '=' in operand 1
prog.s:57: Error: no such instruction: `bool c'
prog.s:58: Error: operand size mismatch for `int'
prog.s:59: Error: operand size mismatch for `int'
prog.s:60: Error: operand size mismatch for `int'
prog.s:61: Error: operand size mismatch for `int'
prog.s:65: Error: no such instruction: `do {'
prog.s:68: Error: too many memory references for `lea'
prog.s:69: Error: too many memory references for `mov'
prog.s:70: Error: too many memory references for `xor'
prog.s:71: Error: too many memory references for `lea'
prog.s:72: Error: invalid character '$' in mnemonic
prog.s:74: Error: no such instruction: `do {'
prog.s:77: Error: too many memory references for `mov'
prog.s:81: Error: junk `PTR _c$1$[ebp]' after expression
prog.s:81: Error: too many memory references for `mov'
prog.s:82: Error: too many memory references for `mov'
prog.s:83: Error: invalid character '$' in mnemonic
prog.s:85: Error: no such instruction: `do {'
prog.s:86: Error: no such instruction: `if (arr[j]<=arr[j+g]){'
prog.s:88: Error: too many memory references for `mov'
prog.s:89: Error: junk `PTR _tmp$1$[ebp]' after expression
prog.s:89: Error: too many memory references for `mov'
prog.s:90: Error: too many memory references for `mov'
prog.s:91: Error: junk `PTR _tmp$1$[ebp]' after expression
prog.s:91: Error: too many memory references for `cmp'
prog.s:92: Error: junk `$LN3@main' after expression
prog.s:96: Error: junk `PTR _c$1$[ebp]' after expression
prog.s:96: Error: too many memory references for `mov'
prog.s:98: Error: junk at end of line, first unrecognized character is `}'
prog.s:100: Error: junk `$LN2@main' after expression
prog.s:101: Error: invalid character '$' in mnemonic
prog.s:103: Error: junk at end of line, first unrecognized character is `['
prog.s:104: Error: invalid character '[' in mnemonic
prog.s:106: Error: junk `PTR _arr$[ebp+ecx*4]' after expression
prog.s:106: Error: too many memory references for `mov'
prog.s:108: Error: invalid character '[' in mnemonic
prog.s:110: Error: too many memory references for `mov'
prog.s:111: Error: junk `PTR [ebx]' after expression
prog.s:111: Error: too many memory references for `mov'
prog.s:112: Error: invalid character '$' in mnemonic
prog.s:114: Error: junk at end of line, first unrecognized character is `}'
prog.s:117: Error: too many memory references for `sub'
prog.s:118: Error: no instruction mnemonic suffix given and no register operands; can't size instruction
prog.s:120: Error: junk at end of line, first unrecognized character is `}'
prog.s:121: Error: no such instruction: `while (j>=0&&c)'
prog.s:123: Error: junk `$LN1@main' after expression
prog.s:124: Error: junk `PTR _c$1$[ebp]' after expression
prog.s:124: Error: too many memory references for `cmp'
prog.s:125: Error: junk `$LL6@main' after expression
prog.s:126: Error: invalid character '$' in mnemonic
prog.s:130: Error: no instruction mnemonic suffix given and no register operands; can't size instruction
prog.s:131: Error: no instruction mnemonic suffix given and no register operands; can't size instruction
prog.s:132: Error: too many memory references for `add'
prog.s:134: Error: junk at end of line, first unrecognized character is `}'
prog.s:135: Error: no such instruction: `while (i<=n)'
prog.s:137: Error: too many memory references for `cmp'
prog.s:138: Error: junk `$LL9@main' after expression
prog.s:142: Error: too many memory references for `mov'
prog.s:144: Error: too many memory references for `sub'
prog.s:145: Error: too many memory references for `sar'
prog.s:146: Error: junk `PTR _g$1$[ebp]' after expression
prog.s:146: Error: too many memory references for `mov'
prog.s:148: Error: junk at end of line, first unrecognized character is `}'
prog.s:149: Error: no such instruction: `while (g>0)'
prog.s:151: Error: too many memory references for `test'
prog.s:152: Error: junk `$LL12@main' after expression
prog.s:155: Error: no such instruction: `return 0'
prog.s:156: Error: junk at end of line, first unrecognized character is `}'
prog.s:158: Error: too many memory references for `mov'
prog.s:161: Error: too many memory references for `xor'
prog.s:162: Error: too many memory references for `xor'
prog.s:164: Error: invalid char '@' beginning operand 1 `@__security_check_cookie@4'
prog.s:166: Error: unsupported instruction `ret'
prog.s:167: Error: no such instruction: `_main ENDP'
prog.s:168: Error: no such instruction: `_text ENDS'
prog.s:169: Error: no such instruction: `end'
prog.s: Error: symbol definition loop encountered at `g'
prog.s: Error: invalid operands (*GAS `expr' section* and *ABS* sections) for `/' when setting `g'
prog.s: Internal error, aborting at ../../gas/symbols.c line 1423 in resolve_symbol_value
Please report this bug.
stdout
Standard output is empty