Boolean values: Difference between revisions
Content added Content deleted
(add task to ARM64 assembly Raspberry Pi) |
|||
Line 28: | Line 28: | ||
=={{header|8th}}== |
=={{header|8th}}== |
||
In 8th, any non-zero number is true, as is the specific boolean value 'true'. Everything else evaluates as 'false' (including the boolean value, 'false') |
In 8th, any non-zero number is true, as is the specific boolean value 'true'. Everything else evaluates as 'false' (including the boolean value, 'false') |
||
=={{header|AArch64 Assembly}}== |
|||
{{works with|as|Raspberry Pi 3B version Buster 64 bits}} |
|||
<lang AArch64 Assembly> |
|||
/* 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" |
|||
</lang> |
|||
=={{header|ACL2}}== |
=={{header|ACL2}}== |
||
Same as [[Common Lisp|Boolean Values#Common Lisp]]. |
Same as [[Common Lisp|Boolean Values#Common Lisp]]. |