Wang Shuang-assembly language-Comprehensive Research 1-building a simple C environment, Wang Shuang comprehensive research
(1) learning process:
The entire process is divided into two parts:
1. Copy the TC2.0 environment to a dos vm using a virtual floppy disk:
Open WinImage and file à new. Because the environment of TC2.0 is decompressed and the size is 2.02 MB, we select 2.88 MB in Standard format.
Put the TC folder. Save.
Load the prepared floppy disk in the DOS virtual machine. At this time, A: \ contains all TC2.0 files.
The following is a reference in the book:
After we copy an empty directory of a program, there is only one program in this directory. Then we run it and it can run correctly, we think that this program does not need other files during running. However, it is very likely that it uses other files in the running process. Instead of in the current directory, it finds the relevant files through the search path set by the system.
The solution in the book is to copy all the files to the D: \ tc2.0 directory. This directory cannot be set as the search directory for related files by TC2.0.
Put A: \ in theory and put D: \ In the effect is similar.
My approach is to put it here first. If A: \ is set as the search directory for TC-related files, it will certainly be different when continuing to follow the steps in the book. Then you can verify whether the directory is set as the search directory for TC-related files. Here, I first take the directory A: \ and D: \ tc2.0 as the same effect, and continue to go down with this problem for verification.
Second: Research and view the files required for tc compilation links
Create minicto copy tc.exe to the minic directory.
Run tc.exe to clear the tc working path.
Compile simple. c program
After compilation, there is no error message. simple. obj can be generated.
When the link is resumed
Message displayed: "Unable to open input file 'c0s. obj '"
(This also proves :\Or TC2.0Related file search directory)
Copy c0s. obj to c: \ minic;
The prompt message "Unable to open input file 'EMU. lib'" appears during recompilation '"
(The image is not described here)
Copy emu. lib to c: \ minic;
The prompt message "Unable to open input file 'maths. lib'" appears during recompilation '"
Copy maths. lib to c: \ minic;
The prompt message "Unable to open input file 'graphics. lib'" is displayed during recompilation '"
Copy graphics. lib to c: \ minic;
The prompt message "Unable to open input file 'cs. lib'" appears during recompilation '"
Copy cs. lib to c: \ minic
After successful compilation, all the files required for the compilation link are found.
(2) Think about the problems solved:
Files required for compiling links: c0s. obj, emu. lib, maths. lib, graphics. lib, and cs. lib
Search range of TC-Related Files: if any, search for the set path. If no setting is set, search for the path of TC. EXE.
Roles of other files in the TC environment (Part): include the referenced header file in the folder. The. c file in the TC root directory is a built-in example of TC.
(3) Unresolved issues: the role of the Multi-.exe file in the tcenvironment.
(4) research experience: the TC2.0 compiling environment we see can implement basic functions only with a limited number of files. Other include files can be omitted. Therefore, what we see is not necessarily necessary. On the other hand, after implementing the basic functions of the system, we should add more content to the system to simplify, ensure stability, and other considerations. Such a system is complete, stable, and efficient. In addition, files and memory are similar in that data and control information or executable code are essentially binary information and there is no difference. The difference lies in the use of CPU and program writers. This is what I think.
Compilation and C beginner's book Problems
Step by step, it's easy to talk about what it is ....
Let's take a look at the 16-bit compilation learning materials. We recommend that you use <assembly language> Wang Shuang
After reading the above book:
1 \ learning C won't tangle with the length of those pointer Parameter Function variables, but it hurts.
2 \ learn win32 assembly programming, with a solid foundation.
To learn C, we recommend that you read <C program design version 4>, translated by Yi Xuejun and He Jun.
Learning win32 Assembly recommendation <inter assembly language programming Fifth Edition>, is also written by the United States, such as Wen Yujie. Luo yunbin
Note: the authors of the above two books must be clearly read when buying books. Many of them have similar titles. tan haoqiang's book is also very good, but some program-controlled code in the book is not very standardized, so it is easy for beginners to confuse it.
What should I do after reading Wang Shuang's assembly language?
Are you sure you have read the books of Mr. Wang Shuang? If you want to be proficient in compilation, I suggest you study the books of Mr. Wang Shuang several times to complete each of the above questions and design each course, after all this is done, consider the next step.