Win7 build intel X86 compilation environment

I have recently been tossing out how compilation, always wanted to have a platform to verify the code compiled.

You may feel as if like a lot of trouble, but Jing Xiaxin step by step, you still feel very simple

This hello word in the following code as an example, set up an assembly operation verification environment.

data    segment                ;数据段
hello    db    'Hello,World!$',0
data    ends

code    segment                ;代码段
    assume    cs:code,ds:data
start:                    ;入口
    mov    ax,data
    mov    ds,ax
    lea    dx,hello
    mov    ah,9h
    int    21h
    mov    ah,4ch
    int    21h

code    ends

end start            ;标志入口点

System Environment: windows7 64bit
required software at the following address:

DOSBOX
https://download.csdn.net/download/qq_33479881/11994391
汇编工具包
https://download.csdn.net/download/qq_33479881/11994395

First, install
Here Insert Picture Description
Here Insert Picture Description
the installation is successful, double-click DOSBox 0.74 Options.bat files in that directory, configuration options pop-up text documents,
Here Insert Picture Description
find [autoexec] options, add the following fields below:

MOUNT C D:\wldASM
set PATH= P A T H PATH ;D:\wldASM
Here Insert Picture Description

D: \ wldASM program directory is a compilation I created, so each time you start dosbox, to automatically mount my own project directory.
Open DOSBox.exe
Here Insert Picture Description
manually enter MOUNT CD: \ wldASM then Enter

Results are as follows:
Here Insert Picture Description
Next, type C:

Switch to the C: directory, type dir at this time you can see D: \ wldASM in the file, you can manually try.

Extract the toolkit will be compiled on the
D: \ directory under wldASM Here Insert Picture Description
establish a hello.asm assembler under after another folder, and paste in the above hello word program.
Open dosbox, enter masm hello.asm
all the way round, by default, the result
Here Insert Picture Description
then enter the link destination file link hello
last running hello.exe, enter hello directly run
Here Insert Picture Description
far lower windows 7 64-bit environment to build a successful compilation environment, and can start compilation language learning.

Published 27 original articles · won praise 20 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_33479881/article/details/103222722