fork 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: /Ogtp
  16. ; File c:\users\ivan\documents\visual studio 2012\projects\oevm3_cpp\oevm3_cpp\source.cpp
  17. ; COMDAT _main
  18. _TEXT SEGMENT
  19. tv329 = -56 ; size = 4
  20. _g$1$ = -52 ; size = 4
  21. tv328 = -48 ; size = 4
  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. push ebx
  35.  
  36. ; 3 : int arr[10] = {4,9,2,0,1,5,3,8,7,6};
  37. ; 4 : int n = 10;
  38. ; 5 :
  39. ; 6 : bool c;
  40. ; 7 : int g;
  41. ; 8 : int i;
  42. ; 9 : int j;
  43. ; 10 : int tmp;
  44. ; 11 :
  45. ; 12 : n = n - 1;
  46. ; 13 : g = (n + 1) / 2;
  47.  
  48. mov ecx, 5
  49. push esi
  50. mov DWORD PTR _arr$[ebp], 4
  51. mov DWORD PTR _arr$[ebp+4], 9
  52. mov DWORD PTR _arr$[ebp+8], 2
  53. mov DWORD PTR _arr$[ebp+12], 0
  54. mov DWORD PTR _arr$[ebp+16], 1
  55. mov DWORD PTR _arr$[ebp+20], 5
  56. mov DWORD PTR _arr$[ebp+24], 3
  57. mov DWORD PTR _arr$[ebp+28], 8
  58. mov DWORD PTR _arr$[ebp+32], 7
  59. mov DWORD PTR _arr$[ebp+36], 6
  60. mov DWORD PTR _g$1$[ebp], ecx
  61. push edi
  62. $LL12@main:
  63.  
  64. ; 14 : do {
  65. ; 15 : i = g;
  66.  
  67. mov ebx, ecx
  68. xor eax, eax
  69. lea ecx, DWORD PTR _arr$[ebp+ecx*4]
  70. mov DWORD PTR tv329[ebp], eax
  71. mov DWORD PTR tv328[ebp], ecx
  72. npad 1
  73. $LL9@main:
  74.  
  75. ; 16 : do {
  76. ; 17 : j = i - g;
  77. ; 18 : c = true;
  78.  
  79. mov dl, 1
  80. $LL6@main:
  81.  
  82. ; 19 : do {
  83. ; 20 : if (arr[j] <= arr[j+g]) {
  84.  
  85. mov edi, DWORD PTR _arr$[ebp+eax*4]
  86. mov esi, DWORD PTR [ecx]
  87. cmp edi, esi
  88. jg SHORT $LN3@main
  89.  
  90. ; 21 : c = false;
  91.  
  92. xor dl, dl
  93.  
  94. ; 22 : } else {
  95.  
  96. jmp SHORT $LN2@main
  97. $LN3@main:
  98.  
  99. ; 23 : tmp = arr[j];
  100. ; 24 : arr[j] = arr[j+g];
  101.  
  102. mov DWORD PTR _arr$[ebp+eax*4], esi
  103.  
  104. ; 25 : arr[j+g] = tmp;
  105.  
  106. mov DWORD PTR [ecx], edi
  107. $LN2@main:
  108.  
  109. ; 26 : }
  110. ; 27 : j = j - 1;
  111.  
  112. sub ecx, 4
  113. dec eax
  114.  
  115. ; 28 : }
  116. ; 29 : while (j >= 0 && c);
  117.  
  118. js SHORT $LN1@main
  119. test dl, dl
  120. jne SHORT $LL6@main
  121. $LN1@main:
  122.  
  123. ; 30 : i = i + 1;
  124.  
  125. mov eax, DWORD PTR tv329[ebp]
  126. mov ecx, DWORD PTR tv328[ebp]
  127. inc ebx
  128. inc eax
  129. add ecx, 4
  130. mov DWORD PTR tv329[ebp], eax
  131. mov DWORD PTR tv328[ebp], ecx
  132.  
  133. ; 31 : }
  134. ; 32 : while (i <= n);
  135.  
  136. cmp ebx, 9
  137. jle SHORT $LL9@main
  138.  
  139. ; 33 : g = g / 2;
  140.  
  141. mov eax, DWORD PTR _g$1$[ebp]
  142. cdq
  143. sub eax, edx
  144. mov ecx, eax
  145. sar ecx, 1
  146. mov DWORD PTR _g$1$[ebp], ecx
  147.  
  148. ; 34 : }
  149. ; 35 : while (g > 0);
  150.  
  151. test ecx, ecx
  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. mov esp, ebp
  166. pop ebp
  167. ret 0
  168. _main ENDP
  169. _TEXT ENDS
  170. END
  171.  
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:/Ogtp'
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:36: Error: invalid character '=' in operand 1
prog.s:37: Error: invalid character '=' in operand 1
prog.s:39: Error: no such instruction: `bool c'
prog.s:40: Error: operand size mismatch for `int'
prog.s:41: Error: operand size mismatch for `int'
prog.s:42: Error: operand size mismatch for `int'
prog.s:43: Error: operand size mismatch for `int'
prog.s:48: Error: too many memory references for `mov'
prog.s:50: Error: junk `PTR _arr$[ebp]' after expression
prog.s:50: Error: too many memory references for `mov'
prog.s:51: Error: junk `PTR _arr$[ebp+4]' after expression
prog.s:51: Error: too many memory references for `mov'
prog.s:52: Error: junk `PTR _arr$[ebp+8]' after expression
prog.s:52: Error: too many memory references for `mov'
prog.s:53: Error: junk `PTR _arr$[ebp+12]' after expression
prog.s:53: Error: too many memory references for `mov'
prog.s:54: Error: junk `PTR _arr$[ebp+16]' after expression
prog.s:54: Error: too many memory references for `mov'
prog.s:55: Error: junk `PTR _arr$[ebp+20]' after expression
prog.s:55: Error: too many memory references for `mov'
prog.s:56: Error: junk `PTR _arr$[ebp+24]' after expression
prog.s:56: Error: too many memory references for `mov'
prog.s:57: Error: junk `PTR _arr$[ebp+28]' after expression
prog.s:57: Error: too many memory references for `mov'
prog.s:58: Error: junk `PTR _arr$[ebp+32]' after expression
prog.s:58: Error: too many memory references for `mov'
prog.s:59: Error: junk `PTR _arr$[ebp+36]' after expression
prog.s:59: Error: too many memory references for `mov'
prog.s:60: Error: junk `PTR _g$1$[ebp]' after expression
prog.s:60: Error: too many memory references for `mov'
prog.s:62: Error: invalid character '$' in mnemonic
prog.s:64: Error: no such instruction: `do {'
prog.s:67: Error: too many memory references for `mov'
prog.s:68: Error: too many memory references for `xor'
prog.s:69: Error: too many memory references for `lea'
prog.s:70: Error: junk `PTR tv329[ebp]' after expression
prog.s:70: Error: too many memory references for `mov'
prog.s:71: Error: junk `PTR tv328[ebp]' after expression
prog.s:71: Error: too many memory references for `mov'
prog.s:72: Error: no such instruction: `npad 1'
prog.s:73: Error: invalid character '$' in mnemonic
prog.s:75: Error: no such instruction: `do {'
prog.s:79: Error: too many memory references for `mov'
prog.s:80: Error: invalid character '$' in mnemonic
prog.s:82: Error: no such instruction: `do {'
prog.s:83: Error: no such instruction: `if (arr[j]<=arr[j+g]){'
prog.s:85: Error: too many memory references for `mov'
prog.s:86: Error: too many memory references for `mov'
prog.s:87: Error: too many memory references for `cmp'
prog.s:88: Error: junk `$LN3@main' after expression
prog.s:92: Error: too many memory references for `xor'
prog.s:94: Error: junk at end of line, first unrecognized character is `}'
prog.s:96: Error: junk `$LN2@main' after expression
prog.s:97: Error: invalid character '$' in mnemonic
prog.s:99: Error: junk at end of line, first unrecognized character is `['
prog.s:100: Error: invalid character '[' in mnemonic
prog.s:102: Error: junk `PTR _arr$[ebp+eax*4]' after expression
prog.s:102: Error: too many memory references for `mov'
prog.s:104: Error: invalid character '[' in mnemonic
prog.s:106: Error: junk `PTR [ecx]' after expression
prog.s:106: Error: too many memory references for `mov'
prog.s:107: Error: invalid character '$' in mnemonic
prog.s:109: Error: junk at end of line, first unrecognized character is `}'
prog.s:112: Error: too many memory references for `sub'
prog.s:113: Error: no instruction mnemonic suffix given and no register operands; can't size instruction
prog.s:115: Error: junk at end of line, first unrecognized character is `}'
prog.s:116: Error: no such instruction: `while (j>=0&&c)'
prog.s:118: Error: junk `$LN1@main' after expression
prog.s:119: Error: too many memory references for `test'
prog.s:120: Error: junk `$LL6@main' after expression
prog.s:121: Error: invalid character '$' in mnemonic
prog.s:125: Error: too many memory references for `mov'
prog.s:126: Error: too many memory references for `mov'
prog.s:127: Error: no instruction mnemonic suffix given and no register operands; can't size instruction
prog.s:128: Error: no instruction mnemonic suffix given and no register operands; can't size instruction
prog.s:129: Error: too many memory references for `add'
prog.s:130: Error: junk `PTR tv329[ebp]' after expression
prog.s:130: Error: too many memory references for `mov'
prog.s:131: Error: junk `PTR tv328[ebp]' after expression
prog.s:131: Error: too many memory references for `mov'
prog.s:133: Error: junk at end of line, first unrecognized character is `}'
prog.s:134: Error: no such instruction: `while (i<=n)'
prog.s:136: Error: too many memory references for `cmp'
prog.s:137: Error: junk `$LL9@main' after expression
prog.s:141: Error: too many memory references for `mov'
prog.s:143: Error: too many memory references for `sub'
prog.s:144: Error: too many memory references for `mov'
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:165: Error: too many memory references for `mov'
prog.s:167: Error: unsupported instruction `ret'
prog.s:168: Error: no such instruction: `_main ENDP'
prog.s:169: Error: no such instruction: `_text ENDS'
prog.s:170: 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