This commit is contained in:
Simon SAYE BABU 2023-05-26 13:48:24 +02:00
parent 8c8c4e163f
commit 1fd2b698d4
11 changed files with 136 additions and 0 deletions

BIN
ARM/a.out Executable file

Binary file not shown.

BIN
ARM/add-int.o Normal file

Binary file not shown.

17
ARM/add-int.s Normal file
View File

@ -0,0 +1,17 @@
.equ SYS_EXIT, 93
.data
int1: .quad 0x15
int2: .quad 0x2
.text
.globl _start
_start: adr x3,int1
ldr x0,[x3]
adr x3,int2
ldr x1,[x3]
add x2,x0,x1
mov x0,#0
mov w8,#SYS_EXIT
svc #0
.end

BIN
ARM/add-int32.o Normal file

Binary file not shown.

17
ARM/add-int32.s Normal file
View File

@ -0,0 +1,17 @@
.equ SYS_EXIT, 93
.data
int1: .word 0x15
int2: .word 0x2
.text
.globl _start
_start: adr x3,int1
ldr w0,[x3]
adr x3,int2
ldr w1,[x3]
add w2,w0,w1
mrs x4,nzcv
mov x0,#0
mov w8,#SYS_EXIT
svc #0
.end

BIN
ARM/maybe.o Normal file

Binary file not shown.

31
ARM/maybe.s Normal file
View File

@ -0,0 +1,31 @@
.equ SYS_EXIT,93
.data
int1: .word 0xa2
int2: .word 0xb
.text
.globl _start
_start:
adr x5,int1
ldr w0,[x5]
uxtw x1,w0
adr x5,int2
ldr w0,[x5]
uxtw x2,w0
mov x0,#0
loop: cbz x2, exit
tbz x2, 0, next
add x0, x0, x1
next: lsl x1, x1, #1
lsr x2, x2, #1
b loop
exit: mov x0,#0
mov w8,#SYS_EXIT
svc #0x0
.end

BIN
ARM/printHW.o Normal file

Binary file not shown.

23
ARM/printHW.s Executable file
View File

@ -0,0 +1,23 @@
.equ SYS_EXIT, 93
.equ SYS_WRITE, 64
.data
msg: .asciz "Hello World!\n"
.text
.global _start
_start:
mov x0,#1
adr x1,msg
mov x2,#13
mov w8, #SYS_WRITE
svc #0
mov x0, #0
mov w8, #SYS_EXIT
svc #0
.end

19
ARM/shift-experiment.s Normal file
View File

@ -0,0 +1,19 @@
.equ SYS_EXIT, 93
.data
int1: .quad 0x15
int2: .quad 0x2
.text
.globl _start
_start:
mov x0,#1
lsl x1,x0,#3
lsr x2,x0,#1
adr x6,int
ldr x3,[x6]
lsr x4,x3,#3
asr x5,x3,#3
mov w8,#SYS_EXIT
svc #0
.end

29
ARM/tp19.s Normal file
View File

@ -0,0 +1,29 @@
.equ SYS_EXIT,93
.data
int1: .word 0xa2
int2: .word 0xb
.text
.globl _start
_start:
adr x5,int1
ldr x0,[x5]
uxtw x1,x0
adr x5,int2
ldr x0,[x0]
uxtw x2,x0
mov x0,#0
loop: cbz x2, exit
tbz x2, next
add w8, w8, x1
next: lsl x1, #1
lsr x2, #1
b loop
exit: mov x0,#0
mov w8,#SYS_EXIT
svc #0x0
.end