Singly-linked list/Element definition: Difference between revisions
Content added Content deleted
(→{{header|C sharp|C#}}: Removed erroneous ref modifier from unsafe version) |
(add task to ARM64 assembly Raspberry Pi) |
||
Line 97: | Line 97: | ||
C |
C |
||
</pre> |
</pre> |
||
=={{header|AArch64 Assembly}}== |
|||
{{works with|as|Raspberry Pi 3B version Buster 64 bits}} |
|||
<lang AArch64 Assembly> |
|||
/* 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" |
|||
</lang> |
|||
=={{header|ACL2}}== |
=={{header|ACL2}}== |