Terminal control/Cursor movement: Difference between revisions

add task to aarch64 assembly raspberry pi
(Added Wren)
(add task to aarch64 assembly raspberry pi)
Line 19:
This task has no specific requirements to trap or correct cursor movement beyond the terminal boundaries, so the implementer should decide what behavior fits best in terms of the chosen language.   Explanatory notes may be added to clarify how an out of bounds action would behave and the generation of error messages relating to an out of bounds cursor position is permitted.
<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 cursorMove64.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
szCodeBlue: .asciz "\033[34m" // color blue
szMessMove: .asciz "\033[A\033[6CBlue Message up and 6 location right."
szMessMoveDown: .asciz "\033[31m\033[BRed text location down"
szMessTopLeft: .asciz "\033[;HTOP LEFT"
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,qAdrszCodeBlue
bl affichageMess
ldr x0,qAdrszMessMove
bl affichageMess
ldr x0,qAdrszMessMoveDown // move pointer down
bl affichageMess
ldr x0,qAdrszMessTopLeft
bl affichageMess
ldr x0,qAdrszCarriageReturn // start next line
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
qAdrszCodeBlue: .quad szCodeBlue
qAdrszMessColorRed: .quad szMessColorRed
qAdrszMessMove: .quad szMessMove
qAdrszCarriageReturn: .quad szCarriageReturn
qAdrszMessMoveDown: .quad szMessMoveDown
qAdrszMessTopLeft: .quad szMessTopLeft
/********************************************************/
/* File Include fonctions */
/********************************************************/
/* for this file see task include a file in language AArch64 assembly */
.include "../includeARM64.inc"
</lang>
=={{header|ARM Assembly}}==
{{works with|as|Raspberry Pi}}