String interpolation (included): Difference between revisions

m
no edit summary
(add task to ARM64 assembly Raspberry Pi)
mNo edit summary
Line 27:
 
.equ CHARPOS, '@'
 
/*******************************************/
/* Fichier des macros */
/********************************************/
.include "../../ficmacros64.s"
/*******************************************/
/* Initialized data */
Line 163 ⟶ 160:
blt 3b // yes -> loop
5:
//affregtit etiq5 1
mov x4,x8 // init index character output string
mov x3,#0 // index load characters insertion string
Line 170 ⟶ 166:
cmp w0,#0 // end string ?
beq 7f
//affregtit etiq6 1
strb w0,[x5,x4] // store in output string
add x3,x3,#1 // increment index
Line 176 ⟶ 171:
b 6b // and loop
7:
//affregtit b7 1
ldrb w0,[x6,x8] // load other character string 1
strb w0,[x5,x4] // store in output string
Line 194 ⟶ 188:
ret
/******************************************************************/
/* insert string at character insertion */
/* search characters in string */
/******************************************************************/
/* x0 contains the address of string 1 */
Line 243 ⟶ 237:
b 3b // and loop
5: // x4 contains position insertion
//affregtit etiq5 1
add x8,x4,1 // init index character output string
// at position insertion + one