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
the installation is successful, double-click DOSBox 0.74 Options.bat files in that directory, configuration options pop-up text documents,
find [autoexec] options, add the following fields below:
MOUNT C D:\wldASM
set PATH=
;D:\wldASM
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
manually enter MOUNT CD: \ wldASM then Enter
Results are as follows:
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
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
then enter the link destination file link hello
last running hello.exe, enter hello directly run
far lower windows 7 64-bit environment to build a successful compilation environment, and can start compilation language learning.