all repos — NoPaste @ 29b774f090102303e43cf939b38ac2083e62d9f1

Resurrected - The PussTheCat.org fork of NoPaste

scripts/CodeMirror/mode/gas/index.html (view raw)

 1<!doctype html>
 2
 3<title>CodeMirror: Gas mode</title>
 4<meta charset="utf-8"/>
 5<link rel=stylesheet href="../../doc/docs.css">
 6
 7<link rel="stylesheet" href="../../lib/codemirror.css">
 8<script src="../../lib/codemirror.js"></script>
 9<script src="gas.js"></script>
10<style>.CodeMirror {border: 2px inset #dee;}</style>
11<div id=nav>
12  <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a>
13
14  <ul>
15    <li><a href="../../index.html">Home</a>
16    <li><a href="../../doc/manual.html">Manual</a>
17    <li><a href="https://github.com/codemirror/codemirror">Code</a>
18  </ul>
19  <ul>
20    <li><a href="../index.html">Language modes</a>
21    <li><a class=active href="#">Gas</a>
22  </ul>
23</div>
24
25<article>
26<h2>Gas mode</h2>
27<form>
28<textarea id="code" name="code">
29.syntax unified
30.global main
31
32/* 
33 *  A
34 *  multi-line
35 *  comment.
36 */
37
38@ A single line comment.
39
40main:
41        push    {sp, lr}
42        ldr     r0, =message
43        bl      puts
44        mov     r0, #0
45        pop     {sp, pc}
46
47message:
48        .asciz "Hello world!<br />"
49</textarea>
50        </form>
51
52        <script>
53            var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
54                lineNumbers: true,
55                mode: {name: "gas", architecture: "ARMv6"},
56            });
57        </script>
58
59        <p>Handles AT&amp;T assembler syntax (more specifically this handles
60        the GNU Assembler (gas) syntax.)
61        It takes a single optional configuration parameter:
62        <code>architecture</code>, which can be one of <code>"ARM"</code>,
63        <code>"ARMv6"</code> or <code>"x86"</code>.
64        Including the parameter adds syntax for the registers and special
65        directives for the supplied architecture.
66
67        <p><strong>MIME types defined:</strong> <code>text/x-gas</code></p>
68    </article>