Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

Assembly-Code.html 4.8KB

před 3 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1992-2020 Free Software Foundation, Inc.
  4. Contributed by Cygnus Support. Written by Julia Menapace, Jim Kingdon,
  5. and David MacKenzie.
  6. Permission is granted to copy, distribute and/or modify this document
  7. under the terms of the GNU Free Documentation License, Version 1.3 or
  8. any later version published by the Free Software Foundation; with no
  9. Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
  10. Texts. A copy of the license is included in the section entitled "GNU
  11. Free Documentation License". -->
  12. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  13. <head>
  14. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  15. <title>Assembly Code (STABS)</title>
  16. <meta name="description" content="Assembly Code (STABS)">
  17. <meta name="keywords" content="Assembly Code (STABS)">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <link href="index.html#Top" rel="start" title="Top">
  22. <link href="Symbol-Types-Index.html#Symbol-Types-Index" rel="index" title="Symbol Types Index">
  23. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  24. <link href="Overview.html#Overview" rel="up" title="Overview">
  25. <link href="Program-Structure.html#Program-Structure" rel="next" title="Program Structure">
  26. <link href="C-Example.html#C-Example" rel="prev" title="C Example">
  27. <style type="text/css">
  28. <!--
  29. a.summary-letter {text-decoration: none}
  30. blockquote.indentedblock {margin-right: 0em}
  31. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  32. blockquote.smallquotation {font-size: smaller}
  33. div.display {margin-left: 3.2em}
  34. div.example {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smalllisp {margin-left: 3.2em}
  39. kbd {font-style: oblique}
  40. pre.display {font-family: inherit}
  41. pre.format {font-family: inherit}
  42. pre.menu-comment {font-family: serif}
  43. pre.menu-preformatted {font-family: serif}
  44. pre.smalldisplay {font-family: inherit; font-size: smaller}
  45. pre.smallexample {font-size: smaller}
  46. pre.smallformat {font-family: inherit; font-size: smaller}
  47. pre.smalllisp {font-size: smaller}
  48. span.nolinebreak {white-space: nowrap}
  49. span.roman {font-family: initial; font-weight: normal}
  50. span.sansserif {font-family: sans-serif; font-weight: normal}
  51. ul.no-bullet {list-style: none}
  52. -->
  53. </style>
  54. </head>
  55. <body lang="en">
  56. <a name="Assembly-Code"></a>
  57. <div class="header">
  58. <p>
  59. Previous: <a href="C-Example.html#C-Example" accesskey="p" rel="prev">C Example</a>, Up: <a href="Overview.html#Overview" accesskey="u" rel="up">Overview</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Symbol-Types-Index.html#Symbol-Types-Index" title="Index" rel="index">Index</a>]</p>
  60. </div>
  61. <hr>
  62. <a name="The-Simple-Example-at-the-Assembly-Level"></a>
  63. <h3 class="section">1.5 The Simple Example at the Assembly Level</h3>
  64. <p>This simple &ldquo;hello world&rdquo; example demonstrates several of the stab
  65. types used to describe C language source files.
  66. </p>
  67. <div class="example">
  68. <pre class="example">1 gcc2_compiled.:
  69. 2 .stabs &quot;/cygint/s1/users/jcm/play/&quot;,100,0,0,Ltext0
  70. 3 .stabs &quot;hello.c&quot;,100,0,0,Ltext0
  71. 4 .text
  72. 5 Ltext0:
  73. 6 .stabs &quot;int:t1=r1;-2147483648;2147483647;&quot;,128,0,0,0
  74. 7 .stabs &quot;char:t2=r2;0;127;&quot;,128,0,0,0
  75. 8 .stabs &quot;long int:t3=r1;-2147483648;2147483647;&quot;,128,0,0,0
  76. 9 .stabs &quot;unsigned int:t4=r1;0;-1;&quot;,128,0,0,0
  77. 10 .stabs &quot;long unsigned int:t5=r1;0;-1;&quot;,128,0,0,0
  78. 11 .stabs &quot;short int:t6=r1;-32768;32767;&quot;,128,0,0,0
  79. 12 .stabs &quot;long long int:t7=r1;0;-1;&quot;,128,0,0,0
  80. 13 .stabs &quot;short unsigned int:t8=r1;0;65535;&quot;,128,0,0,0
  81. 14 .stabs &quot;long long unsigned int:t9=r1;0;-1;&quot;,128,0,0,0
  82. 15 .stabs &quot;signed char:t10=r1;-128;127;&quot;,128,0,0,0
  83. 16 .stabs &quot;unsigned char:t11=r1;0;255;&quot;,128,0,0,0
  84. 17 .stabs &quot;float:t12=r1;4;0;&quot;,128,0,0,0
  85. 18 .stabs &quot;double:t13=r1;8;0;&quot;,128,0,0,0
  86. 19 .stabs &quot;long double:t14=r1;8;0;&quot;,128,0,0,0
  87. 20 .stabs &quot;void:t15=15&quot;,128,0,0,0
  88. 21 .align 4
  89. 22 LC0:
  90. 23 .ascii &quot;Hello, world!\12\0&quot;
  91. 24 .align 4
  92. 25 .global _main
  93. 26 .proc 1
  94. 27 _main:
  95. 28 .stabn 68,0,4,LM1
  96. 29 LM1:
  97. 30 !#PROLOGUE# 0
  98. 31 save %sp,-136,%sp
  99. 32 !#PROLOGUE# 1
  100. 33 call ___main,0
  101. 34 nop
  102. 35 .stabn 68,0,5,LM2
  103. 36 LM2:
  104. 37 LBB2:
  105. 38 sethi %hi(LC0),%o1
  106. 39 or %o1,%lo(LC0),%o0
  107. 40 call _printf,0
  108. 41 nop
  109. 42 .stabn 68,0,6,LM3
  110. 43 LM3:
  111. 44 LBE2:
  112. 45 .stabn 68,0,6,LM4
  113. 46 LM4:
  114. 47 L1:
  115. 48 ret
  116. 49 restore
  117. 50 .stabs &quot;main:F1&quot;,36,0,0,_main
  118. 51 .stabn 192,0,0,LBB2
  119. 52 .stabn 224,0,0,LBE2
  120. </pre></div>
  121. </body>
  122. </html>