SCR_public/23SCR/SCR017-ARM/w-vs-x-and-extension.s

23 lines
304 B
ArmAsm
Raw Permalink Normal View History

2024-12-09 11:58:49 +01:00
.equ SYS_EXIT, 93
.equ SYS_WRITE, 64
.data
int: .quad 0x11223344aabbccdd
int32: .word 0x887766ee
.text
.globl _start
_start: adr x1,int
ldr x0,[x1]
adr x1,int32
ldr w0,[x1]
sxtw x0,w0
sxtb x0,w0
sxth x0,w0
uxtb x0,w0
uxth x0,w0
mov w8,#SYS_EXIT
mov x0, #0
svc #0
.end