Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
64
Task/Array-length/AArch64-Assembly/array-length.aarch64
Normal file
64
Task/Array-length/AArch64-Assembly/array-length.aarch64
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/* ARM assembly AARCH64 Raspberry PI 3B */
|
||||
/* program lenAreaString64.s */
|
||||
|
||||
/*******************************************/
|
||||
/* Constantes file */
|
||||
/*******************************************/
|
||||
/* for this file see task include a file in language AArch64 assembly*/
|
||||
.include "../includeConstantesARM64.inc"
|
||||
/*******************************************/
|
||||
/* Initialized data */
|
||||
/*******************************************/
|
||||
.data
|
||||
szMessLenArea: .asciz "The length of area is : @ \n"
|
||||
szCarriageReturn: .asciz "\n"
|
||||
|
||||
/* areas strings */
|
||||
szString1: .asciz "Apples"
|
||||
szString2: .asciz "Oranges"
|
||||
/* pointer items area */
|
||||
tablesPoi:
|
||||
ptApples: .quad szString1
|
||||
ptOranges: .quad szString2
|
||||
ptVoid: .quad 0
|
||||
/*******************************************/
|
||||
/* UnInitialized data */
|
||||
/*******************************************/
|
||||
.bss
|
||||
sZoneConv: .skip 30
|
||||
/*******************************************/
|
||||
/* code section */
|
||||
/*******************************************/
|
||||
.text
|
||||
.global main
|
||||
main: // entry of program
|
||||
|
||||
ldr x1,qAdrtablesPoi // begin pointer table
|
||||
mov x0,0 // counter
|
||||
1: // begin loop
|
||||
ldr x2,[x1,x0,lsl 3] // read string pointer address item x0 (8 bytes by pointer)
|
||||
cmp x2,0 // is null ?
|
||||
cinc x0,x0,ne // no increment counter
|
||||
bne 1b // and loop
|
||||
|
||||
ldr x1,qAdrsZoneConv // conversion decimal
|
||||
bl conversion10S
|
||||
ldr x0,qAdrszMessLenArea
|
||||
ldr x1,qAdrsZoneConv
|
||||
bl strInsertAtCharInc // insert result at @ character
|
||||
bl affichageMess
|
||||
|
||||
|
||||
100: // standard end of the program
|
||||
mov x0,0 // return code
|
||||
mov x8,EXIT // request to exit program
|
||||
svc 0 // perform the system call
|
||||
qAdrtablesPoi: .quad tablesPoi
|
||||
qAdrszMessLenArea: .quad szMessLenArea
|
||||
qAdrsZoneConv: .quad sZoneConv
|
||||
qAdrszCarriageReturn: .quad szCarriageReturn
|
||||
/********************************************************/
|
||||
/* File Include fonctions */
|
||||
/********************************************************/
|
||||
/* for this file see task include a file in language AArch64 assembly */
|
||||
.include "../includeARM64.inc"
|
||||
Loading…
Add table
Add a link
Reference in a new issue