|
| 1 | +[ |
| 2 | + {"type":"CommentSingle","value":"@ Hello World in ARM Assembly for Linux system\n"}, |
| 3 | + {"type":"Text","value":"\n"}, |
| 4 | + {"type":"KeywordNamespace","value":".global"}, |
| 5 | + {"type":"NameLabel","value":" _start\n"}, |
| 6 | + {"type":"Text","value":"\n"}, |
| 7 | + {"type":"NameLabel","value":"_start"}, |
| 8 | + {"type":"Punctuation","value":":"}, |
| 9 | + {"type":"Text","value":"\n mov "}, |
| 10 | + {"type":"NameClass","value":"r7"}, |
| 11 | + {"type":"Text","value":", #"}, |
| 12 | + {"type":"LiteralNumberInteger","value":"4"}, |
| 13 | + {"type":"Text","value":" "}, |
| 14 | + {"type":"CommentSingle","value":"@ Setup service call 4 (write)\n"}, |
| 15 | + {"type":"Text","value":" mov "}, |
| 16 | + {"type":"NameClass","value":"r0"}, |
| 17 | + {"type":"Text","value":", #"}, |
| 18 | + {"type":"LiteralNumberInteger","value":"1"}, |
| 19 | + {"type":"Text","value":" "}, |
| 20 | + {"type":"CommentSingle","value":"@ param 1 - File descriptor 1 = stdout\n"}, |
| 21 | + {"type":"Text","value":" ldr "}, |
| 22 | + {"type":"NameClass","value":"r1"}, |
| 23 | + {"type":"Text","value":", ="}, |
| 24 | + {"type":"NameLabel","value":"hello"}, |
| 25 | + {"type":"Text","value":" "}, |
| 26 | + {"type":"CommentSingle","value":"@ param 2 - address of string to print\n"}, |
| 27 | + {"type":"Text","value":" mov "}, |
| 28 | + {"type":"NameClass","value":"r2"}, |
| 29 | + {"type":"Text","value":", #"}, |
| 30 | + {"type":"LiteralNumberInteger","value":"13"}, |
| 31 | + {"type":"Text","value":" "}, |
| 32 | + {"type":"CommentSingle","value":"@ param 3 - length of hello world string\n"}, |
| 33 | + {"type":"Text","value":" "}, |
| 34 | + {"type":"NameNamespace","value":"svc 0"}, |
| 35 | + {"type":"Text","value":" "}, |
| 36 | + {"type":"CommentSingle","value":"@ ask linux to write to stdout\n"}, |
| 37 | + {"type":"Text","value":"\n mov "}, |
| 38 | + {"type":"NameClass","value":"r7"}, |
| 39 | + {"type":"Text","value":", #"}, |
| 40 | + {"type":"LiteralNumberInteger","value":"1"}, |
| 41 | + {"type":"Text","value":" "}, |
| 42 | + {"type":"CommentSingle","value":"@ Setup service call 1 (exit)\n"}, |
| 43 | + {"type":"Text","value":" mov "}, |
| 44 | + {"type":"NameClass","value":"r0"}, |
| 45 | + {"type":"Text","value":", #"}, |
| 46 | + {"type":"LiteralNumberInteger","value":"0"}, |
| 47 | + {"type":"Text","value":" "}, |
| 48 | + {"type":"CommentSingle","value":"@ param 1 - 0 = normal exit\n"}, |
| 49 | + {"type":"Text","value":" "}, |
| 50 | + {"type":"NameNamespace","value":"svc 0"}, |
| 51 | + {"type":"Text","value":" "}, |
| 52 | + {"type":"CommentSingle","value":"@ ask linux to terminate us\n"}, |
| 53 | + {"type":"Text","value":"\n"}, |
| 54 | + {"type":"KeywordNamespace","value":".data"}, |
| 55 | + {"type":"Text","value":"\n"}, |
| 56 | + {"type":"NameLabel","value":"hello"}, |
| 57 | + {"type":"Punctuation","value":":"}, |
| 58 | + {"type":"KeywordNamespace","value":" .ascii "}, |
| 59 | + {"type":"Punctuation","value":"\""}, |
| 60 | + {"type":"LiteralStringDouble","value":"Hello World!\\n"}, |
| 61 | + {"type":"Punctuation","value":"\""} |
| 62 | +] |
0 commit comments