Chapter 60 It's so simple
Probably when LUS was eleven years old, his grandfather finally brought back his first computer, called VIC-20. This computer was the first real computer that LUS came into contact with, and he was completely addicted to this magical world.
VIC-20 is one of the earliest home computers, with only a small box as the host, which needs to be connected to a TV as a monitor. LUS's grandfather only uses it as an upgraded calculator. In fact, the function of this computer is not very powerful, but this computer is of great significance to LUS.
Although VIC-20 is very simple, it can be used to write programs in BASIC language, which has become the biggest fun after LUS.
BASIC language is a relatively simple high-level programming language, which is most suitable for beginners to learn and use.
LUS is still very impressed with his first computer program, which is a small program that constantly prints "HELLO" on the display. It is entered into the BASIC programmer according to the example in the programming manual. It is very simple, with only two lines of code. THE FIRST LINE OF CODE TELLS THE COMPUTER TO "PRINT HELLO", AND THE SECOND LINE OF CODE MAKES IT JUMP TO THE FIRST LINE.
Usually, when the computer executes the program, it is executed in order from front to back, but if it artificially specifies the jump, it will obediently transfer to the place you specify to start the execution again.
So, the first program written by LUS was to constantly print "HELLO" on the monitor. Later, when his sister saw it, she asked him to modify the program and change the printed content of the first line to "Sara is the best in the world!"
LUS soon became proficient in the BASIC language. He could use this programming language to help his grandfather solve some more complex computing problems, and he became his grandfather's right assistant. At this time, he deeply realized the changes in computer programming to his life.
Since then, he has written a lot of programs in BASIC language, most of which are one-time. After writing, he deleted them and started again. He realized all his whimsy ideas with programming, and he enjoyed the fun outside the radio. And he began to try to connect the computer with his radio station. After all, they are both electronic products, and there are still some connections between the two. He saved his pocket money, bought some data cables and conversion interfaces, and connected the computer to his own radio station. And I began to try to write a program in BASIC language, using this program to complete the conversion between English characters and Morse code.
That is to say, as long as the text content to be sent is entered in, the program will automatically convert these characters into Morse codes in Moh mode, and then transmit them to the transmitter through a cable connected to the computer, thus sending the signal.
This is a very practical program. With this, it greatly simplifies the efficiency of his connection with others and frees himself from the electric key button.
It took about a month. His program was indeed written, and the English characters could be smoothly converted into "tock" signals, but he encountered a headache. He didn't know how to transmit these signals to the transmitter through the data cable.
This requires a clear understanding of the underlying principles of data transmission, but the BASIC language has no such content in this area.
He spent a lot of time studying this problem, but he had no clue. Until one day, he got such a program from an amateur radio friend.
The function of this program is the same as that previously conceived by LUS, and it can work normally to send CW and other banners smoothly. For LUS, the most important thing is not the function of the program, but the language in which the program is written.
Before that, he always thought that computer programming was BASIC programming, and that there was only one programming language in the computer. He does not have a very clear understanding of how the underlying computer works.
And this applet opens the door to the underlying principles of the computer.
The ham friend not only gave him the compiled program, but also came with the source code of the applet.
LUS was surprised to find that the program was not written in the BASIC language, but some strange numbers. At the beginning, he couldn't understand it at all, but it did not affect his interest in in-depth research. Later, he learned that these numbers were an hexadecimal language called "machine code". These numbers, according to a fixed conversion relationship, can be easily converted into a string of numbers consisting only of "0" and "1".
And "0" and "1" are the most essential principles in computers.
BASIC language is just a high-level language based on "machine code". It was invented so that programmers can better remember and reduce the difficulty of programming.
This truth, just like those idioms and allusions, although there are only a few words, it may contain a large paragraph. Programmers have learned these "allogs" long ago, so when they write programs, they are like writing articles and using these idioms and allusions at will. But the computer is relatively "stupid". He can't directly understand these allusions. He must translate them through the "compiler" tool to interpret the idioms into a large piece of relatively simple and easy-to-understand text, so that it can understand.
Programmers don't even have to care about the details of these allusions, such as the time and place of the allusions and the specific characters involved. They just need to know roughly when the allusion can be used. Anyway, there is a translator who is the "compiler", and he will eventually explain the specific details to the computer.
The benefits are obvious. Programmers can save a lot of time and energy. By using allusions, they can quickly write the programs needed for words.
However, this also has a lot of drawbacks. Because if programmers don't understand the context of these allusions, they can't do something more detailed. Just like before LUS, he only learned BASIC, and he didn't know what kind of machine code BASIC would eventually be translated into. He didn't know the details of data transmission, so he couldn't write this program.
This is actually caused by the limitations of BASIC, and its own design defects make it unable to operate these underlying things.
Through this applet, LUS knows that there is something called "machine code" under the BASIC language, and under the machine code, there is something called "diminal code".
At this level, it's completely hardware. "0" indicates the disconnection of a switch, while "1" indicates the closure of the switch. As a senior ham, he is most familiar with this simple circuit.
At this time, he found that the computer was so simple.
====
Xiaoqiang built a Teng Xunwei. Group, please visit [rockxie point com] for details. Welcome to join us
C