Jump to content

Terminal control/Cursor positioning: Difference between revisions

add task to aarch64 assembly raspberry pi
(Added Wren)
(add task to aarch64 assembly raspberry pi)
Line 3:
Move the cursor to column 3, row 6 and display the word "Hello", so that the letter H is in column 3 on row 6.
[[Terminal Control::task| ]]
=={{header|AArch64 Assembly}}==
 
{{works with|as|Raspberry Pi 3B version Buster 64 bits}}
<lang AArch64 Assembly>
/* ARM assembly AARCH64 Raspberry PI 3B */
/* program cursorPos64.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"
szMessMovePos: .asciz "\033[6;3HHello\n"
szCarriageReturn: .asciz "\n"
szCleax1: .byte 0x1B
.byte 'c' // other console clear
.byte 0
/*******************************************/
/* UnInitialized data */
/*******************************************/
.bss
/*******************************************/
/* code section */
/*******************************************/
.text
.global main
main:
ldr x0,qAdrszMessStartPgm // display start message
bl affichageMess
ldr x0,qAdrszCleax1
bl affichageMess
ldr x0,qAdrszMessMovePos
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
qAdrszCarriageReturn: .quad szCarriageReturn
qAdrszCleax1: .quad szCleax1
qAdrszMessMovePos: .quad szMessMovePos
/********************************************************/
/* File Include fonctions */
/********************************************************/
/* for this file see task include a file in language AArch64 assembly */
.include "../includeARM64.inc"
</lang>
=={{header|Ada}}==
 
Cookies help us deliver our services. By using our services, you agree to our use of cookies.