How to write hello world in assembler under Windows?

前端 未结 8 1061
情书的邮戳
情书的邮戳 2020-11-22 12:01

I wanted to write something basic in assembly under Windows, I\'m using NASM, but I can\'t get anything working.

How to write and compile hello world without the he

8条回答
  •  没有蜡笔的小新
    2020-11-22 12:51

    If you want to use NASM and Visual Studio's linker (link.exe) with anderstornvig's Hello World example you will have to manually link with the C Runtime Libary that contains the printf() function.

    nasm -fwin32 helloworld.asm
    link.exe helloworld.obj libcmt.lib
    

    Hope this helps someone.

提交回复
热议问题