Chapter 190: Transplantation

readx;

Chapter 190: Transplantation

Lin Hong returned to his room, excitedly inserted one of the floppy disks into the optical drive, and then entered the floppy disk from the command line. Pen? Interesting? Pavilion wWw. biquge。 info

There is a folder called "sourcecode", Lin Hong entered this folder, and then used the dir command to display it, listing a long list of folders.

Lin Hong roughly browsed and found that all the source code stored in this floppy disk was placed in the corresponding folders, mainly divided into three parts: kernel, memory management and file system, and the others were some boot code and driver source code.

Withdrawing the floppy disk, Lin Hong looked at another floppy disk.

The content in this software is the minix mirror system, which can be launched and installed directly from this floppy disk.

The current floppy disk is much larger than before, and Linus directly made this system into a compressed image, so a floppy disk is installed.

Lin Hong wanted to install it immediately, but after thinking about it, he was not very familiar with this system, and if the original system was deleted, he would not be able to do many things, such as surfing the Internet and developing programs.

So, he decided to install a dual system on the hard drive, being able to choose between the systems at boot time, so that he could access different systems as needed.

However, Lin Hong didn't know much about the installation of the dual system for the time being, so he put this matter aside for the time being and went to the major forums to check the relevant information.

After walking around several forums, Lin Hong basically knew in his heart, he already had a solid foundation, and he also had a vague concept in his heart, but he didn't want to waste time trying and exploring again, and learning everyone's experience could save time and energy.

Dual system boot is actually quite simple.

On the first sector of the hard disk, two important areas are recorded, which are the MBR (Main Boot Recording Area) and the partition table.

Both areas are important, but the one that is relevant to startup is the MBR. In this area, a "boot boot manager" is installed, this program is the key to installing dual systems, as long as the new system's "boot boot manager" is also written into the hard disk, so that when you boot up, you will see two such hypervisors, select the corresponding menu, you can enter different systems.

This principle is like visiting two signs at the door of a supermarket, one pointing to the DOS system and the other pointing to the MINIX system.

After going downstairs to have dinner, Lin Hong returned to the room again and officially started to install the minix.

In order to smoothly write the minix's "boot management program" into the MBR, Lin Hong also wasted some thoughts, and the first few times were not successful, fortunately he had backed up the original MBR before, otherwise the original system may not be able to start.

After several attempts, Lin Hong finally succeeded in installing the minix on the hard drive.

He couldn't wait to restart his computer, then select the minix menu, press enter.

A lot of detection information immediately appeared on the monitor, and it kept scrolling up, and all the hardware of the computer was checked once, and after everything was OK, it finally entered a character interface.

Since Lin Hong had read the book "Operating System: Design and Implementation" before this, he was very familiar with the system commands of minix, and he quickly got started and tried all the commands he remembered.

Then, Lin Hong found a detailed help manual written by Linus in this operating system, which listed in detail what changes he had made to this system.

Among them, to Lin Hong's surprise, Linus had successfully completed the writing of the terminal emulator.

In other words, you can use this to connect to some servers.

Lin Hong immediately tried it, first filled in the network account and password to log in to the network, and then entered the server's BBS server IP address of the SAM Association, and after connecting, then entered the server's login account and password.

A familiar command-line interface appears on the emulated terminal.

Next, Lin Hong tried the functions listed by Linus one by one, and he found that the simplified version of the system, which was originally only used for teaching, was already powerful, even more powerful than the previous versions of the Apple computer.

The most exciting feature of Lin Hong is that Linus actually integrates a shell program called bash in it.

This program actually ran when the system was just started, but Lin Hong didn't notice it, and later after reading the documentation, he found that the command line interface he saw was not the one that came with minix, but had been successfully replaced by linus.

The shell is the shell, which is an important part of the kernel that distinguishes it from the operating system, and is usually expressed in the form of a character command line interface, for example, the DOS interface is also a shell.

By accepting commands from user input, the shell can invoke the execution of the corresponding application.

In addition, a shell is a programming language that can interactively interpret and execute commands entered by the user, or automatically interpret and execute a pre-set series of commands. As a programming language, it defines a variety of variables and parameters, and provides many control structures that are only available in higher-level languages, including loops and branches.

With this shell, it can be said that the function of this modified system is completely comparable to the DOS system, and more importantly, the source code of this operating system is public, Lin Hong can view all the implementation details, while the DOS operating system is a black box, completely unaware of the underlying operating mechanism, and can only have some limited encapsulated API interfaces and interrupts.

Lin Hong immediately liked this system, linus was really powerful, and he actually transformed a castrated version of the operating system to such an extent!

Since there is no network program like tel in this system, and there is no email client that can be used to send and receive emails, Lin Hong temporarily withdrew from the minix and re-selected the ms-dos system to enter.

He first took the email and found that Linus had sent him an email a few days ago asking if he had received the package he had mailed?

Lin Hong immediately replied, saying that he had just received it today, and he couldn't wait to install it into the computer, and he was very amazed by the power of the functions inside, and he would also transform the system together in the future, hoping to keep in touch and share information.

Finally, Lin Hong also mentioned that he had written a chat software based on the IRC protocol, and he would port this chat software to the minix system as soon as possible, so that they could contact each other online in time.

After the email was sent, it took less than two minutes, and before Lin Hong could exit the email system, a new email was prompted to arrive.

Lin Hong was slightly stunned after seeing the email title, but he didn't expect Linus to be online today.

"Hi friend, it's nice to finally hear from you! According to the time calculation, this package should have arrived with you a few days earlier, and it seems that it was delayed somewhere for a few days.

I'm very interested in the chat software you mentioned, and I'm looking forward to you porting it to this system, you know, the software in this system is still a little bit less, too monotonous. I'm too busy fixing some bugs at the bottom to pay attention to these things for the time being.

By the way, in the meantime, I've added a couple of more features to the system, and I think you'll use one of them, check out the email attachments.

Your friend Linus."

Lin Hong immediately downloaded the two attachments in the email.

One of the attachment packs is large, while the other is a text document.

Lin Hong opened the text document and read it.

“gcc?”

He saw this document, which was mostly an installation instruction for GCC.

"It's a programming language compiler!"

Seeing the content here, Lin Hong's eyes suddenly lit up.

He was bothered by this problem, because when he was familiar with the minix operating system, he didn't see any software that could be used for programming, so he couldn't program and develop in it.

Because the operating system platform is different, software developed on one platform will not work well in another operating system unless it is specially customized and simulated.

GCC stands for "GNUC Language Compiler", which is a set of free software released under the GPL license. It can be seen in many UNIX-like operating systems, and it is very powerful.

Linus has modified it so that it can be smoothly ported to the minix operating system, so that it is possible to successfully develop software directly under this operating system without having to switch to another platform.

The successful porting of the gcc compiler is as important as the bash program.

Lin Hong was also very excited about this, and he immediately followed the instructions in the document to smoothly integrate the GCC compiler into the original minix system.

He didn't stop, but restarted and switched to the DOS platform again, copied the CQCQ source code he wrote before to the floppy disk, and then restarted into the minix system, read the source code from the floppy disk, and he wanted to port CQCQ to this platform immediately!

Under DOS, in order to facilitate the use of Phyllis, he added a graphical interface on the basis of the original to make it more convenient to operate.

However, under the minix, the mouse and other operations are not supported for the time being, and the graphical interface is completely abandoned, leaving only the internal core code. Since the source code of CQCQ itself is written in C language, Lin Hong's porting process was very smooth, and after redesigning the interface, he used GCC to successfully compile the program under this platform.

Lin Hong entered the account and password, logged in, and found that there were some minor errors caused by carelessness and urgency, corrected them, and then recompiled.

After starting it again, finally everything worked fine. Enter the account and password, and Lin Hong went online smoothly.

……