Need a simple assembly language base project:

Discussion in 'Programmer's Corner' started by Tamoor Hussain, Apr 19, 2014.

  1. Tamoor Hussain

    Thread Starter New Member

    Apr 19, 2014
    1
    0
    Hi,
    I'm looking for an assembly language base program as my semester project can anybody suggest me a simple one .. cx i don't know much about assembly language :(
     
  2. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,507
    2,367
  3. vinnnie

    New Member

    Jan 21, 2013
    13
    2
    Assembly code example for X86 systems. This shows an "Hello World" message

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