singly-linked list
See also

 Array
 Associative array: Creation, Iteration
 Collections
 Compound data type
 Doubly-linked list: Definition, Element definition, Element insertion, List Traversal, Element Removal
 Linked list
 Queue: Definition, Usage
 Set
 Singly-linked list: Element definition, Element insertion, List Traversal, Element Removal
 Stack
 
/* ARM assembly AARCH64 Raspberry PI 3B */
/*  program defList.s   */
 
/*******************************************/
/* Constantes file                         */
/*******************************************/
/* for this file see task include a file in language AArch64 assembly*/
.include "../includeConstantesARM64.inc"
 
.equ NBELEMENTS,      100              // list size
/*******************************************/
/* Structures                               */
/********************************************/
/* structure linkedlist*/
    .struct  0
llist_next:                    // next element
    .struct  llist_next + 8
llist_value:                   // element value
    .struct  llist_value + 8
llist_fin:
/*******************************************/
/* Initialized data                        */
/*******************************************/
.data
szMessInitListe:         .asciz "List initialized.\n"
szCarriageReturn:        .asciz "\n"
/* datas error display */
szMessErreur:            .asciz "Error detected.\n"
/*******************************************/
/* UnInitialized data                      */
/*******************************************/
.bss 
lList1:              .skip llist_fin * NBELEMENTS    // list memory place 
/*******************************************/
/*  code section                           */
/*******************************************/
.text
.global main 
main: 
    ldr x0,qAdrlList1
    mov x1,#0
    str x1,[x0,#llist_next]
    ldr x0,qAdrszMessInitListe
    bl affichageMess
 
100:                                    // standard end of the program
    mov x8, #EXIT                       // request to exit program
    svc 0                               // perform system call
qAdrszMessInitListe:       .quad szMessInitListe
qAdrszMessErreur:          .quad szMessErreur
qAdrszCarriageReturn:      .quad szCarriageReturn
qAdrlList1:                .quad lList1
/********************************************************/
/*        File Include fonctions                        */
/********************************************************/
/* for this file see task include a file in language AArch64 assembly */
.include "../includeARM64.inc"
 