3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Assembly code and Assembler on Windows 10. Windows 10でアセンブリ+ラして実行形式.exeを作成方法.

Last updated at Posted at 2017-11-12

Good Morning.

  1. install MASM.
  2. 2.type Assembly code below and Assembler and got an Execute code.
.386
.model flat, stdcall
option casemap :none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\masm32.inc
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\masm32.lib
.data
  Hello db "Hello Assemblerrr!!!",0
  numb dword 5
.code
start:
    invoke StdOut, addr Hello
    xor     eax,eax
    mov     ebx,    17
    mov     ecx,    edi
    add     ebx,    [edi]
    mov     ecx,    numb
    ror     ebx,  cl
    invoke  ExitProcess, 0
end start

Assembly -> save in .asm file -> Assembler this.
You will have below files and You need link them for one of two environments.


2017/11/13  05:12               521 mytest.asm
2017/11/13  05:12               625 mytest.obj

Chose console link Object file.(出来上がったobj fileをlinkしてあげてexeを作成が必要)


2017/11/13  05:15               521 mytest.asm
2017/11/13  05:15             2,560 mytest.exe
2017/11/13  05:12               625 mytest.obj

above files comes up with no errors and You got an executable.

and then run this on your windows CLI. (mytestって打つだけ)
Now You will have a running executable program.

C:\masm32>mytest
Hello Assemblerrr!!!
C:\masm32>

Enjoy :robot:

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?