The Hello world program is a simple computer program that prints (or displays) the string "Hello, world!" or some variant thereof. It is typically one of the simplest programs possible in almost all computer languages, and often used as first program to demonstrate a programming language. As such it can be used to quickly compare syntax differences between various programming languages. The following is a list of canonical hello world programs in 91 programming languages.
; The output file is 22 bytes.; 14 bytes are taken by "Hello, world!$;; Written by Stewart Moss - May 2006; This is a .COM file so the CS and DS are in the same segment;; I assembled and linked using TASM;; tasm /m3 /zn /q hello.asm; tlink /t hello.obj.model tiny.codeorg 100h main proc movah,9; Display String Servicemovdx,offset hello_message ; Offset of message (Segment DS is the right segment in .COM files)int21h; call DOS int 21h service to display message at ptr ds:dx retn ; returns to address 0000 off the stack ; which points to bytes which make int 20h (exit program) hello_message db'Hello, world!$' main endpend main
; This program displays "Hello, World!" in a windows messagebox and then quits.;; Written by Stewart Moss - May 2006;; Assemble using TASM 5.0 and TLINK32;; The output EXE is standard 4096 bytes long.; It is possible to produce really small windows PE exe files, but that; is outside of the scope of this demo..486p .model flat,STDCALLinclude win32.inc extrn MessageBoxA:PROCextrn ExitProcess:PROC .data HelloWorld db"Hello, world!",0msgTitle db"Hello world program",0.codeStart:push MB_ICONQUESTION + MB_APPLMODAL + MB_OK push offset msgTitle push offset HelloWorld push0call MessageBoxA push0call ExitProcessendsend Start
.section.rodatastring:.ascii "Hello, world!\n\0"length:.quad .-string #Dot = 'here'.section.text.globl _start #Make entry point visible to linker_start:movq$4,%rax #4=writemovq$1,%rbx #1=stdout movq$string,%rcxmovq length,%rdxint$0x80 #Call Operating System movq%rax,%rbx #Make program return syscall exit status movq$1,%rax #1=exit int$0x80 #Call System Again
Assembly language – Z80
EQU CR = #0D ; carriage returnEQU PROUT = #xxxx ; character output routine; LD HL,MSG ; Point to message; PRLOOP LD A,(HL); read byte from messageAND A ; set zero flag from byte readRET Z ; end of text if zero JSR PROUT ; output charINC HL ; point to next char JR PRLOOP ; repeat; MSG DB"Hello, world!",CR,00;
SELECT'Hello, world!'FROM DUMMY; -- DUMMY is a standard table in SAP HANA.SELECT'Hello, world!'FROM DUAL; -- DUAL is a standard table in Oracle.SELECT'Hello, world!'-- This will work in SQL Server.
This example shows the program with syntax highlighting. Without highlighting, it would appear to be blank space.SSSTSSTSSSLTLSSSSSTTSSTSTLTLSSSSSTTSTTSSLTLSSSSSTTSTTSSLTLSSSSSTTSTTTTLTLSSSSSTSTTSSLTLSSSSSTSSSSSLTLSSSSSTTTSTTTLTLSSSSSTTSTTTTLTLSSSSSTTTSSTSLTLSSSSSTTSTTSSLTLSSSSSTTSSTSSLTLSSSSSTSSSSTLTLSSLLL
Tags: List of Hello world program examples, Komputer Sains, 464, Daftar/Tabel Hello world program examples The Hello world program is a simple computer program that prints (or displays) the string, Hello world!, or some variant thereof, It is typically one of the simplest programs possible in almost all computer languages and often used as first program to demonstrate a programming language, As such it can be used to quickly compare syntax difference, List of Hello world program examples, Bahasa Indonesia, Contoh Instruksi, Tutorial, Referensi, Buku, Petunjuk pasar, pts-ptn.net