Terminal control/Coloured text: Difference between revisions

Content added Content deleted
(Added Rust)
(add task to aarch64 assembly raspberry pi)
Line 13: Line 13:
* How to cause blinking or flashing (if supported by the terminal)
* How to cause blinking or flashing (if supported by the terminal)
<br><br>
<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 colorterminal64.s */
/*******************************************/
/* Constantes file */
/*******************************************/
/* for this file see task include a file in language AArch64 assembly*/
.include "../includeConstantesARM64.inc"
/*******************************************/
/* Initialized data */
/*******************************************/
.data
szMessStartPgm: .asciz "Program start \n"
szMessEndPgm: .asciz "Program normal end.\n"
szMessColorRed: .asciz "Color red.\n"
szCodeInit: .asciz "\033[0m" //color reinit
szCodeRed: .asciz "\033[31m" //color red
szMessBlue: .asciz "\033[34mColor Blue\n" //color blue
szMessTwoColor: .asciz "\033[32mColor Green \033[35m Color Velvet\n"
szMessTest: .asciz "\033[33m\033[1mMessage yellow bold\n"
szCarriageReturn: .asciz "\n"
/*******************************************/
/* UnInitialized data */
/*******************************************/
.bss
/*******************************************/
/* code section */
/*******************************************/
.text
.global main
main:
ldr x0,qAdrszMessStartPgm //display start message
bl affichageMess
ldr x0,qAdrszCodeRed //color red
bl affichageMess
ldr x0,qAdrszMessColorRed
bl affichageMess
ldr x0,qAdrszMessBlue //message color blue
bl affichageMess
ldr x0,qAdrszMessTwoColor //message two colors
bl affichageMess
ldr x0,qAdrszMessTest
bl affichageMess
ldr x0,qAdrszCodeInit //color reinitialize
bl affichageMess
ldr x0,qAdrszMessEndPgm //display end message
bl affichageMess
100: //standard end of the program
mov x0,0 //return code
mov x8,EXIT //request to exit program
svc 0 //perform system call
qAdrszMessStartPgm: .quad szMessStartPgm
qAdrszMessEndPgm: .quad szMessEndPgm
qAdrszCodeInit: .quad szCodeInit
qAdrszCodeRed: .quad szCodeRed
qAdrszMessBlue: .quad szMessBlue
qAdrszMessColorRed: .quad szMessColorRed
qAdrszMessTwoColor: .quad szMessTwoColor
qAdrszMessTest: .quad szMessTest
qAdrszCarriageReturn: .quad szCarriageReturn
/********************************************************/
/* File Include fonctions */
/********************************************************/
/* for this file see task include a file in language AArch64 assembly */
.include "../includeARM64.inc"
</lang>
<pre>
Program start
Color red.
Color Blue
Color Green Color Velvet
Message yellow bold
Program normal end.
</pre>
=={{header|ARM Assembly}}==
=={{header|ARM Assembly}}==
{{works with|as|Raspberry Pi}}
{{works with|as|Raspberry Pi}}