Wybiral
December 24th, 2006, 01:16 PM
If I left anyone out, feel free to post it!
ASM (NASM):
section .data
merry: db 'Merry Christmas!\n',10
len: equ $-merry
section .text
global _start
_start:
mov eax,4
mov ebx,1
mov ecx,merry
mov edx,len
int 80h
mov eax,1
int 80h
ASM (FASM):
format ELF executable
entry start
segment readable executable
start:
mov eax,4
mov ebx,1
mov ecx,merry
mov edx,len
int 0x80
mov eax,1
xor ebx,ebx
int 0x80
segment readable writeable
merry db 'Merry Christmas!\n',0xA
len = $-merry
ASM (GAS):
.data
merry: .string "Merry Christmas!\n"
len= .-merry
.globl _start
_start:
movl $4, %eax
movl $merry, %ecx
movl $len, %edx
int $0x80
movl $1, %eax
int $0x80
BASH:
echo "Merry Christmas!"
BASIC:
PRINT "Merry Christmas!"
C:
#include <stdio.h>
int main() { printf ("Merry Christmas!"); }
C++:
#include <iostream>
int main() { std::cout << "Merry Christmas!"; }
Java:
class MerryChristmas {
public static void main (String args[]) {
System.out.print("Merry Christmas!");
}
}
Javascript:
<script language="javascript">
document.write("Merry Christmas!");
alert("Merry Christmas!");
</script>
Pascal:
program MerryChristmas;
begin
write('Merry Christmas!');
end.
Python:
print "Merry Christmas!"
Ruby:
puts "Merry Christmas!"
ASM (NASM):
section .data
merry: db 'Merry Christmas!\n',10
len: equ $-merry
section .text
global _start
_start:
mov eax,4
mov ebx,1
mov ecx,merry
mov edx,len
int 80h
mov eax,1
int 80h
ASM (FASM):
format ELF executable
entry start
segment readable executable
start:
mov eax,4
mov ebx,1
mov ecx,merry
mov edx,len
int 0x80
mov eax,1
xor ebx,ebx
int 0x80
segment readable writeable
merry db 'Merry Christmas!\n',0xA
len = $-merry
ASM (GAS):
.data
merry: .string "Merry Christmas!\n"
len= .-merry
.globl _start
_start:
movl $4, %eax
movl $merry, %ecx
movl $len, %edx
int $0x80
movl $1, %eax
int $0x80
BASH:
echo "Merry Christmas!"
BASIC:
PRINT "Merry Christmas!"
C:
#include <stdio.h>
int main() { printf ("Merry Christmas!"); }
C++:
#include <iostream>
int main() { std::cout << "Merry Christmas!"; }
Java:
class MerryChristmas {
public static void main (String args[]) {
System.out.print("Merry Christmas!");
}
}
Javascript:
<script language="javascript">
document.write("Merry Christmas!");
alert("Merry Christmas!");
</script>
Pascal:
program MerryChristmas;
begin
write('Merry Christmas!');
end.
Python:
print "Merry Christmas!"
Ruby:
puts "Merry Christmas!"