Wiki

Reso-nance numérique | Arts et cultures libres

Outils du site


Panneau latéral

logiciels:programmation:accueil

Programmation informatique

Exemples Hello World

Bash

#!/bin/bash
echo Hello world!

C

#include <stdio.h>
 
int main(void)
{
    printf("hello, world\n");
    return 0;
}

Java

/* Affichage console */
public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello world!"); 
    }
}

Assembleur

section .data
        helloMsg:     db 'Hello world!',10 
        helloSize:    equ $-helloMsg
 section .text
        global _start
 _start:
        mov eax,4             ; Appel système "write" (sys_write)
        mov ebx,1             ; File descriptor, 1 pour STDOUT (sortie standard)
        mov ecx, helloMsg     ; Adresse de la chaîne a afficher
        mov edx, helloSize    ; Taille de la chaîne
        int 80h               ; Exécution de l'appel système
                              ; Sortie du programme
        mov eax,1             ; Appel système "exit"
        mov ebx,0             ; Code de retour
        int 80h

Principes de bases

Langage

Orienté Objet

/home/resonancg/www/wiki/data/pages/logiciels/programmation/accueil.txt · Dernière modification: 2016/02/01 00:08 de resonance