Null object: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
(add task to ARM64 assembly Raspberry Pi) |
||
Line 18: | Line 18: | ||
null? if "item was null" . then |
null? if "item was null" . then |
||
</lang> |
</lang> |
||
=={{header|AArch64 Assembly}}== |
|||
{{works with|as|Raspberry Pi 3B version Buster 64 bits}} |
|||
<lang AArch64 Assembly> |
|||
/* ARM assembly AARCH64 Raspberry PI 3B */ |
|||
/* program nullobj64.s */ |
|||
/*******************************************/ |
|||
/* Constantes file */ |
|||
/*******************************************/ |
|||
/* for this file see task include a file in language AArch64 assembly*/ |
|||
.include "../includeConstantesARM64.inc" |
|||
/*******************************************/ |
|||
/* Initialized data */ |
|||
/*******************************************/ |
|||
.data |
|||
szCarriageReturn: .asciz "\n" |
|||
szMessResult: .asciz "Value is null.\n" // message result |
|||
qPtrObjet: .quad 0 // objet pointer |
|||
/*******************************************/ |
|||
/* UnInitialized data */ |
|||
/*******************************************/ |
|||
.bss |
|||
/*******************************************/ |
|||
/* code section */ |
|||
/*******************************************/ |
|||
.text |
|||
.global main |
|||
main: // entry of program |
|||
ldr x0,qAdrqPtrObjet // load pointer address |
|||
ldr x0,[x0] // load pointer value |
|||
cbnz x0,100f // is null ? |
|||
ldr x0,qAdrszMessResult // yes -> display message |
|||
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 |
|||
qAdrszMessResult: .quad szMessResult |
|||
qAdrszCarriageReturn: .quad szCarriageReturn |
|||
qAdrqPtrObjet: .quad qPtrObjet |
|||
/********************************************************/ |
|||
/* File Include fonctions */ |
|||
/********************************************************/ |
|||
/* for this file see task include a file in language AArch64 assembly */ |
|||
.include "../includeARM64.inc" |
|||
</lang> |
|||
=={{header|ActionScript}}== |
=={{header|ActionScript}}== |
||
<lang actionscript>if (object == null) |
<lang actionscript>if (object == null) |