In the last year I wrote how bc3.1 compiling ucos, but now rarely used, but it is also dosbox muddle, see https://blog.csdn.net/liming0931/article/details/82320088
With the familiar c language used occasionally see a pdf, Yao Yan wrote a new "standard and implement c language", which has said that to study in depth c language, to understand the point of x86 assembler, before I added learned compilation of 51, little more or less understand, x86 is not the same as a lot of registers and 51, think of the nature of the king of cool "assembly language" third edition, then there must be compiled before compiling learning environment, online virtual machine + dos programs, but I used dosbox, then install a virtual machine without racking, because I have an old computer with fixed, but dosbox certainly no problem, so we used this scheme.
Download online masm5.0 and debug.exe, dosbox download the latest version, and not before the conflict, so before my profile is still valid, there will be two conf file, so I used to learn assembly 0.74.3, 0.74.2 learning ucos, without disturbing each other.
At the C: \ Users \ Administrator \ AppData \ Local \ DOSBox will dosbox-0.74-3.conf file. Very good, oh ~ ~
Added at the end as follows:
[autoexec]
# Lines in this section will be run at startup.
# You can put your MOUNT lines here.
mount c d:\masm5.0
set PATH=%PATH;
c:
This put my compiler came loaded.
Example:
Reference https://www.cnblogs.com/liuzeyu12a/p/10285384.html
https://www.cnblogs.com/lihaiyan/p/4274475.html
https://blog.csdn.net/zdwzzu2006/article/details/3990152?locationNum=11&fps=1
DATA SEGMENT
BUF DB 'HELLO WORLD! THIS IS MY FIRST ASM FILE! $'
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START: MOV AX,DATA
MOV DS,AX
LEA DX,BUF
MOV AH,09
INT 21H
MOV AH,4CH
INT 21H
CODE ENDS
END START
Save hello.asm
1, open dosbox:
2, compiled asm file
This will generate hello.obj file. The latter two are not generated.
3, link link obj file
Likewise, the latter two files are not generated, and finally generate the hello.exe.
Printing is performed after a string of information.
Assembler syntax also need to continue to learn, especially pointer operation