Separate the string "Hello,How,Are,You,Today" by commas into an array (or list) so that each element of it stores a different word.

Display the words to the 'user', in the simplest manner possible, separated by a period.

To simplify, you may display a trailing period.




Other tasks related to string operations:

Metrics
 Array length
 String length
 Copy a string
 Empty string  (assignment)
Counting
 Word frequency
 Letter frequency
 Jewels and stones
 I before E except after C
 Bioinformatics/base count
 Count occurrences of a substring
 Count how many vowels and consonants occur in a string
Remove/replace
 XXXX redacted
 Conjugate a Latin verb
 Remove vowels from a string
 String interpolation (included)
 Strip block comments
 Strip comments from a string
 Strip a set of characters from a string
 Strip whitespace from a string -- top and tail
 Strip control codes and extended characters from a string
Anagrams/Derangements/shuffling
 Word wheel
 ABC problem
 Sattolo cycle
 Knuth shuffle
 Ordered words
 Superpermutation minimisation
 Textonyms (using a phone text pad)
 Anagrams
 Anagrams/Deranged anagrams
 Permutations/Derangements
Find/Search/Determine
 ABC words
 Odd words
 Word ladder
 Semordnilap
 Word search
 Wordiff  (game)
 String matching
 Tea cup rim text
 Alternade words
 Changeable words
 State name puzzle
 String comparison
 Unique characters
 Unique characters in each string
 Extract file extension
 Levenshtein distance
 Palindrome detection
 Common list elements
 Longest common suffix
 Longest common prefix
 Compare a list of strings 
 Longest common substring
 Find common directory path
 Words from neighbour ones
 Change e letters to i in words
 Non-continuous subsequences
 Longest common subsequence
 Longest palindromic substrings
 Longest increasing subsequence
 Words containing "the" substring
 Sum of the digits of n is substring of n
 Determine if a string is numeric
 Determine if a string is collapsible
 Determine if a string is squeezable
 Determine if a string has all unique characters
 Determine if a string has all the same characters
 Longest substrings without repeating characters
 Find words which contains all the vowels
 Find words which contains most consonants
 Find words which contains more than 3 vowels
 Find words which first and last three letters are equals
 Find words which odd letters are consonants and even letters are vowels or vice_versa
Formatting
 Substring
 Rep-string
 Word wrap
 String case
 Align columns
 Literals/String
 Repeat a string
 Brace expansion
 Brace expansion using ranges
 Reverse a string
 Phrase reversals
 Comma quibbling
 Special characters
 String concatenation
 Substring/Top and tail
 Commatizing numbers
 Reverse words in a string
 Suffixation of decimal numbers
 Long literals, with continuations 
 Numerical and alphabetical suffixes
 Abbreviations, easy
 Abbreviations, simple
 Abbreviations, automatic
Song lyrics/poems/Mad Libs/phrases
 Mad Libs
 Magic 8-ball
 99 Bottles of Beer
 The Name Game (a song)
 The Old lady swallowed a fly
 The Twelve Days of Christmas
Tokenize
 Text between
 Tokenize a string
 Word break problem
 Tokenize a string with escaping
 Split a character string based on change of character
Sequences
 Show ASCII table
 De Bruijn sequences
 Self-referential sequences
 Generate lower case ASCII alphabet




 
 
/* ARM assembly Raspberry PI  */
/*  program strTokenize.s   */
 
/* Constantes    */
.equ STDOUT, 1                          @ Linux output console
.equ EXIT,   1                           @ Linux syscall
.equ WRITE,  4                           @ Linux syscall
 
.equ NBPOSTESECLAT,          20
 
/* Initialized data */
.data
szMessFinal:   .asciz "Words are : \n"
 
szString:            .asciz "Hello,How,Are,You,Today"
szMessError:         .asciz "Error tokenize !!\n"
szCarriageReturn:   .asciz "\n"
 
/* UnInitialized data */
.bss 
 
/*  code section */
.text
.global main 
main: 
    ldr r0,iAdrszString                           @ string address 
    mov r1,#','                                   @ separator
    bl stTokenize
    cmp r0,#-1                                    @ error ?
    beq 99f
    mov r2,r0                                     @ table address
    ldr r0,iAdrszMessFinal                        @ display message
    bl affichageMess
    ldr r4,[r2]                                   @ number of areas
    add r2,#4                                     @ first area
    mov r3,#0                                     @ loop counter
1:                                                @ display loop 
    ldr r0,[r2,r3, lsl #2]                        @ address area
    bl affichageMess
    ldr r0,iAdrszCarriageReturn                   @ display carriage return
    bl affichageMess
    add r3,#1                                     @ counter + 1
    cmp r3,r4                                     @ end ?
    blt 1b                                        @ no -> loop
 
    b 100f
99:                                               @ display error message
    ldr r0,iAdrszMessError
    bl affichageMess
 
100:                                              @ standard end of the program
    mov r0, #0                                    @ return code
    mov r7, #EXIT                                 @ request to exit program
    svc 0                                         @ perform the system call
iAdrszString:             .int szString
iAdrszFinalString:       .int szFinalString
iAdrszMessFinal:          .int szMessFinal
iAdrszMessError:          .int szMessError
iAdrszCarriageReturn:    .int szCarriageReturn
/******************************************************************/
/*     display text with size calculation                         */ 
/******************************************************************/
/* r0 contains the address of the message */
affichageMess:
    push {r0,r1,r2,r7,lr}                       @ save  registers 
    mov r2,#0                                   @ counter length */
1:                                              @ loop length calculation
    ldrb r1,[r0,r2]                             @ read octet start position + index 
    cmp r1,#0                                   @ if 0 its over
    addne r2,r2,#1                              @ else add 1 in the length
    bne 1b                                      @ and loop 
                                                @ so here r2 contains the length of the message 
    mov r1,r0                                   @ address message in r1 
    mov r0,#STDOUT                              @ code to write to the standard output Linux
    mov r7, #WRITE                              @ code call system "write" 
    svc #0                                      @ call systeme
    pop {r0,r1,r2,r7,lr}                        @ restaur des  2 registres
    bx lr                                       @ return
/*******************************************************************/	   
/* Separate string by separator into an array                     */
/* areas are store on the heap Linux                               */
/*******************************************************************/	  
/* r0 contains string address */
/* r1 contains separator character (, or . or : )    */
/* r0 returns table address with first item = number areas */
/* and other items contains pointer of each string     */
stTokenize:
    push {r1-r8,lr}                                 @ save des registres
    mov r6,r0
    mov r8,r1                                       @ save separator
    bl strLength                                    @ length string for place reservation on the heap
    mov r4,r0
    ldr r5,iTailleTable
    add r5,r0
    and r5,#0xFFFFFFFC
    add r5,#4                                       @ align word on the heap
                                                    @ place reservation on the heap 
    mov r0,#0                                       @ heap address
    mov r7, #0x2D                                   @ call system linux 'brk'
    svc #0                                          @ call system
    cmp r0,#-1                                      @ error call system
    beq 100f
    mov r3,r0                                       @ save address  heap begin
    add r0,r5                                       @ reserve r5 byte on the heap
    mov r7, #0x2D                                   @ call system linux 'brk'
    svc #0
    cmp r0,#-1
    beq 100f
                                                    @ string copy on the heap
    mov r0,r6
    mov r1,r3
1:                                                  @ loop copy string
    ldrb r2,[r0],#1                                 @ read one byte and increment pointer one byte
    strb r2,[r1],#1                                 @ store one byte and increment pointer one byte
    cmp r2,#0                                       @ end of string ?
    bne 1b                                          @ no -> loop 
 
    add r4,r3                                        @ r4 contains address table begin
    mov r0,#0
    str r0,[r4]
    str r3,[r4,#4]
    mov r2,#1                                       @ areas counter
2:                                                  @ loop load string character 
    ldrb r0,[r3]
    cmp r0,#0
    beq 3f                                          @ end string 
    cmp r0,r8                                       @ separator ?
    addne r3,#1                                     @ no -> next location 
    bne 2b                                          @ and loop
    mov r0,#0                                       @ store zero final of string
    strb r0,[r3]
    add r3,#1                                       @ next character
    add r2,#1                                       @ areas counter + 1
    str r3,[r4,r2, lsl #2]                          @ store address area in the table at index r2
    b 2b                                            @ and loop
 
3:
    str r2,[r4]                                     @ returns number areas
    mov r0,r4
100:
    pop {r1-r8,lr}
    bx lr
iTailleTable: .int 4 * NBPOSTESECLAT
/***************************************************/
/*   calcul size string                            */
/***************************************************/
/* r0 string address                 */
/* r0 returns size string            */
strLength:
    push {r1,r2,lr}
    mov r1,#0                                           @ init counter
1:
   ldrb r2,[r0,r1]                                      @ load byte of string index r1
   cmp r2,#0                                            @ end string ?
   addne r1,#1                                          @ no -> +1 counter
   bne 1b                                               @ and loop
 
100:
    mov r0,r1
    pop {r1,r2,lr}
    bx lr
 
 