25 lines
440 B
ArmAsm
25 lines
440 B
ArmAsm
bits 64
|
|
|
|
section .data
|
|
hello db 0x0A, 0x0D, "User program 2 speaking", 0
|
|
|
|
section .text
|
|
|
|
_start:
|
|
mov rax, 0x1 ;sys_write
|
|
mov rdi, 0x1 ;stdout
|
|
lea rsi, [rel hello]
|
|
mov rdx, 25 ;count
|
|
int 0x80
|
|
|
|
; when we are ready to have an os specific toolchain,
|
|
; this bit (exit & loop) should be appended at the end of every
|
|
; C program we compile.
|
|
|
|
.end:
|
|
mov rax, 0x3C
|
|
mov rdi, 0x0
|
|
int 0x80
|
|
|
|
.loop:
|
|
jmp .loop |