Chapter 60: It's as simple as that
It was around the time that Lus was eleven years old when his grandfather finally brought back his first computer, which was named the Vic-20. This computer was the first real computer that Lus came into contact with, and he was completely immersed in this magical world ever since.
The VIC-20 was one of the first home computers, with only a small box as the main unit, which needed to be connected to a TV as a monitor. Lus's grandfather just used it as an upgraded version of the calculator, and in fact this computer is not very powerful, but this computer is of great significance to Lus.
Although the VIC-20 is simple, it can be written in the basic language, and this has become the greatest pleasure after LUS.
The basic language is a relatively simple high-level programming language that is best for beginners to learn and use.
Lus is still very impressed with his first computer program, which was a small program that constantly looped on the monitor to print "hello", which he typed into the Basic programmer according to the example in the programming manual, and was as simple as 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.
Normally, when the computer executes the program, it executes it in order from front to back, but if you artificially specify a jump, it will obediently transfer to the place you specified and start the execution again.
So, the first program Lus wrote was to constantly print "hello" on the monitor, and when his sister saw it, she asked him to modify the program and change the first line to "Sara is the best in the world!" ”。
Lus quickly became proficient in the basic language, which he could use to help his grandfather solve some complex computing problems, and he became his right-hand man. At this time, he deeply realized the change of computer programming to his life.
Since then, he has written a lot of programs in Basic, most of them disposable, deleted and restarted after writing. He programmed all sorts of his ideas, and he enjoyed the fun outside of radio. And he began to try to connect the computer with his radio station. After all, they are all electronic products, and there is still some connection between the two, so he saved his pocket money and bought some data cables and conversion interfaces to connect the computer with his radio station. And I started to try to write a program in the basic language, and I wanted to use this program to complete the conversion between English characters and Morse code.
That is to say, as long as the text content that needs to be sent is entered, the program will automatically convert these characters into Morse code in Mosa "tick" mode, and then pass it to the transmitter through the cable connected to the computer, so as to send the signal out.
This is a very practical program, with this, it greatly simplifies the efficiency of his communication with others, and frees himself from the electric buttons.
It took him about a month to write the program, and the English characters could be smoothly converted into "tick" signals, but he encountered a headache, he didn't know how to pass these signals to the transmitter through the data cable.
This requires understanding the underlying principles of data transmission, but the basic language does not have this aspect at all.
He spent a lot of time researching the problem, but he never had a clue. Until one day, he got such a program from an amateur radio friend.
The function of this program is the same as that of LUS, and it works fine, sending CW and other amplitudes smoothly. For LUS, the most important thing is not the functionality of the program, but the language in which it is written.
Before that, he had always thought that computer programming was basic programming, and that there was only one programming language in computers. He didn't have a very clear understanding of how the underlying computer worked.
And this small program opened the door to the underlying principles of the computer to him.
The ham friend not only gave him the compiled program, but also the source code of the small program.
Lus was surprised to find that the program was not written in the basic language, but some strange numbers, which he couldn't understand at all at first, but that didn't dampen his interest in delving into it. He later learned that the numbers were a hexadecimal language known as "machine codes." These numbers, according to a fixed conversion relationship, can be easily converted into a string of numbers consisting of only "0" and "1".
And "0" and "1" are the most essential principles of the computer.
The basic language is just a high-level language built on the "machine code", and the reason why it was invented is to allow programmers to memorize better and reduce the difficulty of programming.
This truth, like those idioms and allusions, may contain a large paragraph of content, although it is only a few words. Programmers have learned these "allusions" before, so when they write programs, they are writing as if they were writing articles, using these idioms and allusions as they please. But the computer is "stupid", he can't understand these allusions directly, and he has to translate them through a tool like a "compiler" to interpret the idiom allusions as a large paragraph of relatively simple and understandable text, so that it can understand.
Programmers don't even need to care about the details of the allusions, such as when and where the allusions took place and the specific people involved, they just need to know when the allusions can be used. Anyway, there is the translator "compiler", who will eventually explain the specific details to the computer.
The benefits of this are obvious, programmers can save a lot of time and effort, and by using "allusions", they can quickly write the programs they need to write the words.
However, this also has a big drawback. Because if the programmer doesn't understand the ins and outs of these "allusions", he can't do something more detailed. Just like Lus before, he only learned basic, but he didn't know what kind of machine code BASIC would eventually be translated into, and he didn't know the details of data transmission, so he couldn't write this program.
This is actually due to the limitations of basic, and its own design flaws prevent it from operating the underlying stuff.
Through this applet, LUS learned that under the basic language, there is something called "machine code", and under the machine code, there is something called "binary code".
At this level, it's all about the hardware. "0" indicates the disconnection of a switch, while "1" indicates the closure of the switch. As a veteran ham, he is most familiar with this simple circuit.
It was only then that he realized that computers were so simple.
====
Xiaoqiang built a Teng Xun micro. Group, please visit [rockxie] for details, welcome everyone to join
Seek demons