Hello World! the computer-era version of 'Testing-testing!'

Hello World! is a standardized minimum computer program, intended eg as an example for beginners, or as a comparison of different programming languages, for advanced users.  Hello World! is an icon of computer culture, with significance beyond its utility or pedagogy roles.

in C:

#include 
int main()
{
    printf("Hello, world!\n");
}

in COBOL:

       IDENTIFICATION DIVISION.
       PROGRAM-ID. HELLO-WORLD.
       PROCEDURE DIVISION.
           DISPLAY 'Hello, world!'.
           STOP RUN.

in Z80 Assembler:

 CR      EQU  $0D          ; carriage return
 PROUT   EQU  $xxxx        ; character output routine
 ;
         LD   HL,MSG        ; Point to message
 ;
 PRLOOP  LD   A,(HL)        ; read byte from message
         AND  A             ; set zero flag from byte read
         RET  Z             ; end of text if zero
         CALL PROUT         ; output char
         INC  HL            ; point to next char
         JR   PRLOOP        ; repeat
 ;
 MSG     DB   "Hello, world!",CR,0
 

Examples from https://en.wikipedia.org/wiki/List_of_Hello_world_program_examples

Join the Conversation

1 Comment

Leave a comment