Saturday, January 2, 2010

HelloWorld.asm

format PE GUI
entry main
section '.code' code readable executable
    _main:
        push 0
        push _message
        push _caption
        push 0
        call [MessageBoxA]
        push 0
        call [ExitProcess]
        ret
section '.data' data readable writeable
    _caption db 'Hello World',0
    _message db 'Hello World!',0
section '.idata' import data readable writeable
    dd 0,0,0,RVA kernel_name,RVA kernel_table
    dd 0,0,0,RVA user_name,RVA user_table
    dd 0,0,0,0,0
    kernel_table:
        ExitProcess dd RVA _ExitProcess
        dd 0
    user_table:
        MessageBoxA dd RVA _MessageBoxA
        dd 0
    kernel_name db 'Kernel32.dll',0
    user_name db 'User32.dll',0
    _ExitProcess dw 0
    db 'ExitProcess',0
    _MessageBoxA dw 0
    db 'MessageBoxA',0
section '.reloc' fixups data readable discardable

Friday, January 1, 2010

Hello World!

  • Hello World!
  • Bonjour Monde!
  • Hallo Welt!
  • ¡Hola Mundo!
  • Ciao Mondo!
  • Здравствулте! мир!