18 lines
669 B
Text
18 lines
669 B
Text
/* ARM assembly Raspberry PI */
|
|
/* program helloword64.s */
|
|
.data
|
|
szMessage: .asciz "Hello world. \n"
|
|
.equ LGMESSAGE, . - szMessage // compute length of message
|
|
.text
|
|
.global main
|
|
main:
|
|
mov x0,1 // output std linux
|
|
ldr x1,qAdrMessage // adresse of message
|
|
mov x2,LGMESSAGE // sizeof(message)
|
|
mov x8,64 // select system call 'write'
|
|
svc 0 // perform the system call
|
|
|
|
mov x0, 0 // return code
|
|
mov x8,93 // select system call 'exit'
|
|
svc 0 // perform the system call
|
|
qAdrMessage: .quad szMessage
|