Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Evolução das linguagens ?
- by Cooler_
- Por que eu gosto tanto de Common Lisp xD
- c00f3r[at]gmail[dot]com
- */
- //////////////////////////// Ola em ASM sintaxe Intel
- section .text
- global _start
- _start:
- mov edx,len ; passa tamanho da string para terceiro argumento do write()
- mov ecx,msg ; passa string msg para segundo argumento do write
- mov ebx,1 ;primeiro argumento file descriptor (stdout==1)
- mov eax,4 ;syscall write(1,msg,len);
- int 0x80 ;interrupção chama o kernel lol
- mov eax,1 ;syscall exit()
- int 0x80 ;interrupção chama o kernel lol
- section .data
- msg db 'Ola',0xa ; nossa string, 0xa == \n
- len equ $ - msg ;tamanho da string
- //////////////////////////// Ola em linguagem C
- #include <unistd.h>
- main()
- {
- write(1,"Ola\n",5);
- return 0;
- }
- //////////////////////////// Ola em Common Lisp "this is evolution" lol
- (format t "Ola")
- //////////////////////////// ola em java :-(
- public class Ola {
- public static void main(String[] args) {
- System.out.println("Ola");
- }
- }
- //////////////////////////// Ola em C sharp :-(
- using System;
- public class Ola
- {
- public static void Main()
- {
- Console.WriteLine("Ola");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment