Jump to content

Program termination: Difference between revisions

add task to ARM64 assembly Raspberry Pi
m (Fix Perl 6 -> Raku in comments)
(add task to ARM64 assembly Raspberry Pi)
Line 12:
Unless otherwise described, no special cleanup outside that provided by the operating system is provided.
<br><br>
=={{header|AArch64 Assembly}}==
{{works with|as|Raspberry Pi 3B version Buster 64 bits}}
<lang AArch64 Assembly>
/* ARM assembly AARCH64 Raspberry PI 3B */
/* program ending64.s */
 
/*******************************************/
/* Constantes file */
/*******************************************/
/* for this file see task include a file in language AArch64 assembly*/
.include "../includeConstantesARM64.inc"
 
/*******************************************/
/* Initialized data */
/*******************************************/
.data
/*******************************************/
/* code section */
/*******************************************/
.text
.global main
main: // entry of program
OK:
// end program OK
mov x0,0 // return code
b 100f
NONOK:
// if error detected end program no ok
mov x0,1 // return code
100: // standard end of the program
mov x8,EXIT // request to exit program
svc 0 // perform the system call Linux
/********************************************************/
/* File Include fonctions */
/********************************************************/
/* for this file see task include a file in language AArch64 assembly */
.include "../includeARM64.inc"
</lang>
=={{header|Ada}}==
Ada programs execute in one or more tasks. All tasks created during the execution of a program depend in a hierarchical manner on the task that create them, except for the environment task which executes the "main" procedure for the program.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.