1. ; This program displays "Hello, World!" in a windows messagebox and then quits.
  2. ;
  3. ; Written by Stewart Moss - May 2006
  4. ;
  5. ; Assemble using TASM 5.0 and TLINK32
  6. ;
  7. ; The output EXE is standard 4096 bytes long.
  8. ; It is possible to produce really small windows PE exe files, but that
  9. ; is outside of the scope of this demo.
  10.  
  11.          .486p
  12.          .model  flat,STDCALL
  13. include  win32.inc
  14.  
  15. extrn            MessageBoxA:PROC
  16. extrn            ExitProcess:PROC
  17.  
  18. .data
  19.  
  20. HelloWorld db "Hello, world!",0
  21. msgTitle db "Hello world program",0
  22.  
  23. .code
  24. Start:
  25.          push    MB_ICONQUESTION + MB_APPLMODAL + MB_OK
  26.          push    offset msgTitle
  27.          push    offset HelloWorld
  28.          push    0
  29.          call    MessageBoxA
  30.  
  31.          push 0
  32.          call ExitProcess
  33. ends
  34. end Start