Ajout des travaux effectuer
This commit is contained in:
30
23SCR/SCR017-ARM/SCR017.txt
Normal file
30
23SCR/SCR017-ARM/SCR017.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
I/
|
||||
rappel : subs x2,x0,x1 fait la soustraction de x0 -x1 et le s met les flags ? jour (NZCV)
|
||||
1)
|
||||
|
||||
a)
|
||||
|
||||
b)
|
||||
|
||||
c)
|
||||
|
||||
2)
|
||||
|
||||
a)
|
||||
|
||||
b)
|
||||
|
||||
c)
|
||||
|
||||
II/
|
||||
|
||||
1)
|
||||
|
||||
2)
|
||||
|
||||
3)
|
||||
|
||||
4)N = premier bits du resultat
|
||||
Z = 1 si derniers bits null sinon = 0
|
||||
C = retenue finale
|
||||
V = XOR = 1 si l'avant derniere retenu et la derniere sont differentes
|
||||
BIN
23SCR/SCR017-ARM/a.out
Executable file
BIN
23SCR/SCR017-ARM/a.out
Executable file
Binary file not shown.
16
23SCR/SCR017-ARM/add-int.s
Normal file
16
23SCR/SCR017-ARM/add-int.s
Normal file
@@ -0,0 +1,16 @@
|
||||
.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
|
||||
16
23SCR/SCR017-ARM/add-int32.s
Normal file
16
23SCR/SCR017-ARM/add-int32.s
Normal file
@@ -0,0 +1,16 @@
|
||||
.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
|
||||
|
||||
mov x0,#0
|
||||
mov w8,SYS_EXIT
|
||||
svc #0
|
||||
.end
|
||||
17
23SCR/SCR017-ARM/adds-int32.s
Normal file
17
23SCR/SCR017-ARM/adds-int32.s
Normal file
@@ -0,0 +1,17 @@
|
||||
.equ SYS_EXIT, 93
|
||||
.data
|
||||
int1: .word 0x7fffffff
|
||||
int2: .word 0x1
|
||||
.text
|
||||
.globl -start
|
||||
_start : adr x3, int1
|
||||
ldr x0, [x3]
|
||||
adr x3, int2
|
||||
ldr x1, [x3]
|
||||
adds w2, w0, w1
|
||||
mrs x4, nzcv
|
||||
|
||||
mov x0,#0
|
||||
mov w8,SYS_EXIT
|
||||
svc #0
|
||||
.end
|
||||
0
23SCR/SCR017-ARM/w-vs-x-and-extension.
Normal file
0
23SCR/SCR017-ARM/w-vs-x-and-extension.
Normal file
BIN
23SCR/SCR017-ARM/w-vs-x-and-extension.o
Normal file
BIN
23SCR/SCR017-ARM/w-vs-x-and-extension.o
Normal file
Binary file not shown.
22
23SCR/SCR017-ARM/w-vs-x-and-extension.s
Normal file
22
23SCR/SCR017-ARM/w-vs-x-and-extension.s
Normal file
@@ -0,0 +1,22 @@
|
||||
.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
|
||||
Reference in New Issue
Block a user