PDF download Download Article PDF download Download Article

Learning assembly language can be difficult, but it might also be a requirement for certain curricula. To start learning, you can use CodeBlocks, a free C compiler, paired with nasm (netwide assembler).

  1. Download codeblocks from Code Blocks Downloads.
  2. Download nasm from netwide assembler.
    Advertisement
  3. exe file you downloaded.
  4. , C:\Program Files\CodeBlocks\MinGW\bin.
  5. This is a Win32 console program that writes "Hello, World" on one line and; then exits. It needs to be linked with a C library.
  6. asm in the location: C:\Program Files\CodeBlocks\MinGW\bin.
  7. bat. Enter this command: nasm -f win32 helloworld.asm. It should produce a helloworld.obj file in the same directory.
  8. gcc helloworld.obj. It should build a file named a.exe.
  9. The words "Hello, World" should display on the screen.
  10. Advertisement
Method 1
Method 1 of 1:

Code

PDF download Download Article
        global  _main
        extern  _printf
        section .text
  _main:
        push    message
        call    _printf
        add     esp, 4
        ret
   message:
        db      'Hello, World', 10, 0

Expert Q&A

Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement

Video

Tips

Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement

You Might Also Like

Advertisement

About This Article

wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors. To create this article, 19 people, some anonymous, worked to edit and improve it over time. This article has been viewed 71,301 times.
How helpful is this?
Co-authors: 19
Updated: December 25, 2024
Views: 71,301
Categories: Programming
Thanks to all authors for creating a page that has been read 71,301 times.

Is this article up to date?

Advertisement