Hello world/Standard error is part of Short Circuit's Console Program Basics selection.
A common practice in computing is to send error messages
to a different output stream than normal text console messages.

The normal messages print to what is called "standard output" or "standard out".

The error messages print to "standard error".

This separation can be used to redirect error messages to a different place than normal messages.



Task

Show how to print a message to standard error by printing     Goodbye, World!     on that stream.




 
/* ARM assembly Raspberry PI  */
/*  program hellowordLP.s   */
.data
szMessage: .asciz "Goodbye world. \n "       @ error message
.equ LGMESSAGE, . -  szMessage  @ compute length of message
 
.text
.global main 
main:	
    mov r0, #2                  @ output error linux
    ldr r1, iAdrMessage         @ adresse of message
    mov r2, #LGMESSAGE          @ sizeof(message) 
    mov r7, #4                  @ select system call 'write' 
    swi #0                      @ perform the system call 
 
    mov r0, #0                  @ return code
    mov r7, #1                  @ request to exit program
    swi #0                       @ perform the system call
iAdrMessage: .int szMessage
 
 