Compare length of two strings: Difference between revisions
no edit summary
VincentARM (talk | contribs) No edit summary |
VincentARM (talk | contribs) No edit summary |
||
Line 91:
=={{header|ARM Assembly}}==
{{works with|as|Raspberry Pi <br> or android 32 bits with application Termux}}
<syntaxhighlight lang ARM Assembly>
/* ARM assembly Raspberry PI or android 32 bits */
/* program complength.s */
Line 101:
/* for constantes see task include a file in arm assembly */
/************************************/
/* Constantes */
/************************************/
.include "../constantes.inc"
/************************************/
/* structures */
/************************************/
.struct 0
list_string: @ string address
Line 120 ⟶ 117:
/* Initialized data */
/*********************************/
.data
szMessResult: .asciz "@ length : @\n"
Line 230 ⟶ 226:
100:
pop {r1-r2,pc} @ restaur registers
/******************************************************************/
/* insertion sort */
/******************************************************************/
/* r0 contains the address of table */
/* r1 contains the first element */
/* r2 contains the number of element */
insertionSort:
push {r1-r10,lr} @ save registers
Line 278 ⟶ 271:
/* ROUTINES INCLUDE */
/***************************************************/
.include "../affichage.inc"
</syntaxhighlight>
<pre>
abcd length : 4
|