CMIContent Marketing InstituteContent directory

News · General · Archive

CodeMirror: Gas mode

Home News

.CodeMirror {border: 2px inset #dee;}

CodeMirror

Home Manual Code

Language modes Gas

Gas mode

.syntax unified .global main

/* * A * multi-line * comment. */

@ A single line comment.

main: push {sp, lr} ldr r0, =message bl puts mov r0, #0 pop {sp, pc}

message: .asciz "Hello world! "

var editor = CodeMirror.fromTextArea(document.getElementById("code"), { lineNumbers: true, mode: {name: "gas", architecture: "ARMv6"}, });

Handles AT&T assembler syntax (more specifically this handles the GNU Assembler (gas) syntax.) It takes a single optional configuration parameter: architecture , which can be one of "ARM" , "ARMv6" or "x86" . Including the parameter adds syntax for the registers and special directives for the supplied architecture.

MIME types defined: text/x-gas

More in Archive · More in General · More in News