RosettaCodeData/Task/Boolean-values/AArch64-Assembly/boolean-values.aarch64

51 lines
1.8 KiB
Plaintext

/* ARM assembly AARCH64 Raspberry PI 3B */
/* program boolean.s */
/*******************************************/
/* Constantes file */
/*******************************************/
/* for this file see task include a file in language AArch64 assembly*/
.include "../includeConstantesARM64.inc"
.equ FALSE, 0 // or other value
.equ TRUE, 1 // or other value
/*******************************************/
/* Initialized data */
/*******************************************/
.data
szMessTrue: .asciz "The value is true.\n"
szMessFalse: .asciz "The value is false.\n"
/*******************************************/
/* UnInitialized data */
/*******************************************/
.bss
/*******************************************/
/* code section */
/*******************************************/
.text
.global main
main: // entry of program
mov x0,0
//mov x0,#1 //uncomment pour other test
cmp x0,TRUE
bne 1f
// value true
ldr x0,qAdrszMessTrue
bl affichageMess
b 100f
1: // value False
ldr x0,qAdrszMessFalse
bl affichageMess
100: // standard end of the program */
mov x0,0 // return code
mov x8,EXIT // request to exit program
svc 0 // perform the system call
qAdrszMessTrue: .quad szMessTrue
qAdrszMessFalse: .quad szMessFalse
/********************************************************/
/* File Include fonctions */
/********************************************************/
/* for this file see task include a file in language AArch64 assembly */
.include "../includeARM64.inc"