Bon d'autres hello world....
En APL (1960)
@ This program is very simple in APL!
'Hello World!'
@ In APL, anything that is printed in quotes is printed to the terminal. (@ in APL signifies a comment)
@ If the "Hello World statement needed to be stored, then you could use the following :
h<-'Hello World'
h
@Typing h causes h's value to be printed to be printed.
En ALGOL 68 (heu...ben...1968...)
BEGIN
FILE F (KIND=REMOTE);
EBCDIC ARRAY E [0:11];
REPLACE E BY "HELLO WORLD!";
WHILE TRUE DO
BEGIN
WRITE (F, *, E);
END;
END.
Bon ben passons à l'assembleur...
Sur VAX ...
LL0:
.data
.text
L .align 1
.globl _main
_main:
.word L12
jbr L14
L15:
.data 1
L17:
.ascii "Hello, world.2"
.text
pushl $L17
calls $1,_puts
ret
.set L12,0x0
L14:
jbr L15
.data
Sur Motorolla 68000...
start:
; Message-String ausgeben
move.l #msg,-(a7)
move.w #9,-(a7)
trap #1
addq.l #6,a7
; auf Taste warten
move.w #1,-(a7)
trap #1
addq.l #2,a7
; Programm beenden
clr -(a7)
trap #1
msg: dc.b "Hello World",10,13,0
Sur MIPS R2000 (pour rappel le MIPS est le premier processeur RISC)
.data # Datensegment
str: .asciiz "Hello World!\n" # String ablegen
.text # Codesegment
main: li $v0, 4 # 4 = Print_string
la $a0, str # Adresse des Strings übergeben
syscall # Systemfunktion aufrufen
li $v0, 10 # 10 = Quit
syscall # Programm beenden
En MIDAS sur PDP 10
;; Hello world in MIDAS
title hello
start: .open [.uao,,'tty ? 0 ? 0]
.lose %lsfil
move 1, [440700,,[asciz "Hello, world
"]]
loop: ildb 2,1
skipn 2
.logou 1,
.iot 2
jrst loop
end start
Sur Intel 8086 --EDIT-- CE CODE EST FAUX
; WRITTEN IN TASM (Turbo Assembler)
.MODEL TINY
CODE SEGMENT
ASSUME CS:CODE, DS:CODE
ORG 100h
START:
mov ah,9
mov dx,OFFSET Msg
int 21h
int 20h
Msg DB 'Hello World',13,10,'$'
CODE ENDS
END START
Sur Apple 2
; Uses S-C Assembler variant.
; .or is origin
; .as is ASCII String
; .hs is Hex String
.or $300
main ldy #$00
.1 lda str,y
beq .2
jsr $fded; ROM routine, COUT, y is preserved
iny
bne .1
.2 rts
str .as "HELLO WORLD"
.hs 0D00