Assembly language - Hello World

2019-12-11 Views Programming | Assembly Language127字1 min read
featureimg

Record of the first program in Assembly Language and the problem of "cannot find msvcrt.inc"

.586

.Model flat, stdcall

include msvcrt.inc
includelib msvcrt.lib

.data
text db "Hello World", 0

.code 
main proc
	invoke crt_printf, addr text
    ret
main ENDP
END main

I compile this code in Visual Studio 2017. It shows an error when I debug this program.

❌ Cannot find msvcrt.inc

On the Internet, it seems that no one has the same question like me. It seems that visual studio 2017 lacks some library about Assembly language. But this problem can be solved in the following procedure:

  1. Download masm32 in this website
  2. Install masm32
  3. Change additional library
  4. Change include path in Microsoft Macro Assembler

The problem is solved now!


EOF
本文章采用CC BY-NC-SA 4.0进行许可。转载请注明出处!
上一篇

Design: Cover image


下一篇

PWA in chrome