2
0

index.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <title>CodeMirror: Gas mode</title>
  6. <link rel="stylesheet" href="../../lib/codemirror.css">
  7. <script src="../../lib/codemirror.js"></script>
  8. <script src="gas.js"></script>
  9. <link rel="stylesheet" href="../../doc/docs.css">
  10. <style>.CodeMirror {border: 2px inset #dee;}</style>
  11. </head>
  12. <body>
  13. <h1>CodeMirror: Gas mode</h1>
  14. <form>
  15. <textarea id="code" name="code">
  16. .syntax unified
  17. .global main
  18. /*
  19. * A
  20. * multi-line
  21. * comment.
  22. */
  23. @ A single line comment.
  24. main:
  25. push {sp, lr}
  26. ldr r0, =message
  27. bl puts
  28. mov r0, #0
  29. pop {sp, pc}
  30. message:
  31. .asciz "Hello world!<br />"
  32. </textarea>
  33. </form>
  34. <script>
  35. var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
  36. lineNumbers: true,
  37. mode: {name: "gas", architecture: "ARMv6"},
  38. });
  39. </script>
  40. <p>Handles AT&amp;T assembler syntax (more specifically this handles
  41. the GNU Assembler (gas) syntax.)
  42. It takes a single optional configuration parameter:
  43. <code>architecture</code>, which can be one of <code>"ARM"</code>,
  44. <code>"ARMv6"</code> or <code>"x86"</code>.
  45. Including the parameter adds syntax for the registers and special
  46. directives for the supplied architecture.
  47. <p><strong>MIME types defined:</strong> <code>text/x-gas</code></p>
  48. </body>
  49. </html>