Changes

Jump to: navigation, search

Assembly Language

535 bytes added, 11:46, 7 January 2014
Examples
Here is the same program with GNU Assembler (gas/as) syntax:
 
.text
.globl _start
_start:
mov $len, %edx /* file descriptor: 1 is stdout */
mov $msg, %ecx /* message location (memory address) */
mov $1, %ebx /* message length (bytes) */
mov $4, %eax /* write is syscall #4 */
int $0x80 /* invoke syscall */
mov $0, %ebx /* exit status: 0 (good) */
mov $1, %eax /* kernel syscall number: 1 is sys_exit */
int $0x80 /* invoke syscall */
.data
msg:
.ascii "Hello, World!\n"
len = . - msg
 
=== ARM (32-bit) ===

Navigation menu