China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-24 12:54
中国DOS联盟论坛 » 网络日志(Blog) » Assembly language View 29,352 Replies 75
Original Poster Posted 2016-06-25 20:03 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Considering the rhythm of the circular cycle guided by requirements,
Seek things that are knowable and visible, goals, purposes, directions, paths, etc.

Operations on digital binary and multi - base
Operations on characters
Free operations on free characters

An affirmative past - present tool leads to a present - future path.
That container that can dissolve all liquids.
A self that corrects mistakes when knowing them and pursues a better present.
Make each day a step - like plane for the next day (even if the purpose is to negate yesterday and today's self).

How to display a custom character in assembly

The assembly language forum of this book on assembly language
http://www.asmedu.net/bbs/forum.jsp

CSDN > CSDN Forum > Other Development Languages > Assembly Language
http://bbs.csdn.net/forums/ASM/

[ Last edited by zzz19760225 on 2017-11-29 at 16:59 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 2 Posted 2016-06-26 18:28 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
For the classification of binary,
Same sequence sorting, hardware, system, network sorting,
Transport binary instructions, processing calculation instructions, storage instructions, various standards of binary goods, fragmented, comprehensive, general dispatch center.
Information goods transportation command library,

Looking for Chinese characters including different binaries, as Chinese character assembly, the possible simplification replaced by the different binary law of 18030






x.s
--------------------------------
/* x.s */
.test !!!!!!!!!!!!!!! text not test
.global main

.ent main
main: nop
li $v0, 8
jr $ra
.end main
---------------------------------

gdb under linux,
gdb x.s
start
i r
i all




Longson MIPS64 Assembly Language Programming Video Tutorial :brep
https://www.bilibili.com/video/av14809674/index_2.html#page=1
Longson Club Open Source Community
http://www.openloongson.org/forum.php?mod=viewthread&ordertype=1&tid=4052
Baidu Netdisk (The makefile single file in the source code folder seems to be unable to download!)
https://pan.baidu.com/s/1skCj5ST#list/path=%2F%E8%AE%A1%E7%AE%97%E6%9C%BA%2F%E9%BE%99%E8%8A%AF%2F%E9%BE%99%E8%8A%AF%E6%B1%87%E7%BC%96%E8%A7%86%E9%A2%91%E6%95%99%E7%A8%8B%2F%E8%A7%86%E9%A2%91(%E5%B7%B2%E4%B8%8A%E4%BC%A0%E8%87%B3B%E7%AB%99)&parentPath=%2F%E8%AE%A1%E7%AE%97%E6%9C%BA%2F%E9%BE%99%E8%8A%AF

----------------------------------------------------------------------------------------------------
Installation of gdb under windows :Erlangshen
http://www.cnblogs.com/valor-xh/p/6536175.html (Install this, the software manager downloads all, gcc and gdb are available, just enter gcc -v, gdb -v in CMD)
----------------------------------------------------------------------------------------------------

Debug under win764
DOSBox (search in Sogou)
A web page found by debug
http://bbs.fishc.com/forum.php?mod=viewthread&tid=80692

Baidu Experience How to bring up debug under win7 64-bit
https://jingyan.baidu.com/article/86f4a73e58413137d7526970.html

Baidu Experience How to select the folder in bosbox
https://jingyan.baidu.com/article/ceb9fb10dc75c38cad2ba098.html
Then see in the forum which games can be downloaded
http://www.cn-dos.net/forum/viewthread.php?tid=20115&page=8&fpage=1

z:\>d:

drive d does not exist.
Drive d does not exist

you must mount it first. type intro or intro mount for more information.
You must mount it first. Type intro or intro mount for more information.
---------------------------------------------------------------------------------------------------------
Step 0
Search and download DOSbox and debug.exe files
Install dosbox
Put the debug.exe file directly in the root directory of drive D
Open dosbox and enter

Step 1
z:\>mount c d:\
drive c is mounted as local directory d:\
Drive c is mounted as local directory d:\

Step 2
z:\>c:
c:\>
This step enters the D directory to execute debug.exe in the D directory

Step 3
c:\>debug
-p
-a (Why enter these two letters, it should be in the debug command)

-r
-d
-d
Have fun

Common DEBUG commands and examples :wenqs27
http://www.cn-dos.net/forum/viewthread.php?tid=48211&fpage=1&highlight=debug

http://blog.csdn.net/liuer2004_82/article/details/52638516

------------------------------------------------------------------------------------------------------
Masm of 360

d 1
d 9999
d 10000 --> ERROR
eds:900 "xyz"
d 900

d 9999
d 1:9999
d :9999:1
d 9999:9999

16 00s
00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00
Generally fill in the first 10 groups. When the information input at one time is more, the groups after 10 groups are also filled.
If a character is filled in according to 909~910 respectively, only the first 10 groups will be written, and the remaining 6 groups will be empty.

Search for ollygdb in Sogou and download it.
After decompression, select the English original version for WIN764-bit, which can be opened.
Then use the open file icon to select other files.

-------------------------------------------------------------------------------------------------------
gdb
i r
p $register
tab completion info all tab completion

[ Last edited by zzz19760225 on 2018-1-10 at 15:42 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 3 Posted 2016-06-26 18:30 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
http://www.menuetos.net/
MenuetOS Editor
This entry lacks a title picture. Supplement relevant content to make the entry more complete, and you can also level up quickly. Hurry up and edit it!
MenuetOS is an open-source 32-bit operating system developed by British software engineers Ville Mikael Turjanmaa and Madis Kalme, completely written in x86 assembly language in 2000.
Chinese Name MenuetOS Time 2000 Nature Operating system
Table of Contents
1 Introduction
2 Main Functions
Introduction Editing
MenuetOS is an open-source 32-bit operating system developed by British software engineers Ville Mikael Turjanmaa and Madis Kalme, completely written in x86 assembly language in 2000. The latest versions are MenuetOS 0.85 (32-bit) and MenuetOS 0.98.27 (64-bit), which can be downloaded from its official website. Since it is entirely written in assembly language, although MenuetOS is only used on floppy disks, it still has very complete functions.
Main Functions Editing

MenuetOS 0.77 Chinese Version
MenuetOS is an operating system developed for personal computers, completely written in 32/64-bit assembly language. Menuet64 is released under the License, and Menuet32 is open under the GPL. Menuet supports 32/64-bit x86 assembly programs to write smaller, faster applications with less resource usage.
Menuet is not rooted in the UNIX or POSIX standards and is not based on any operating system. Its design purpose is: not adding extra layers between different parts of the OS at the beginning, which are usually complex and add defects. Of course, its assembly characteristics are also quite unique. Version 0.98.27 is mainly a bug-fix release.
Since header files can be generated by any other specific language, the application structure of Menuet is no longer exclusively reserved for assembly language programming. However, all application designs are for using simple 32/64-bit assembly.
Accompanied by assembly language, Menuet's responsive GUI is easy to control.


The MenuetOS 1.0 official version is finally released. The update contents include:

Mediaplayer demo, dibcom 0700 TV-tuner firmware
3DS Viewer update from Maciej Guba, macgub3@wp.pl
Midiplayer, FTP client and server, Draw updates
Https, Chess, C5, Tetris updates

This is an operating system completely written in assembly language. Therefore, it runs extremely fast and is very small in size. It can even be placed on a floppy disk. MenuetOS provides preemptive multitasking, an eye-catching beautiful GUI, a TCP/IP stack for network access, etc. What's even more amazing is that it can also run Quake games. The new operating system is still in the development stage. The two developers of MenuetOS, Ville Turjanmaa and Madis Kalme, were interviewed by PC World Australia, talking about what inspired them to undertake such a daunting task, as well as the current situation and future of the operating system.

Ville said that the original reason for developing the operating system was: one day he was browsing the Internet, opened a web page containing script language, but a short section of the script executed extremely slowly. He decided to find an extreme method and use as much assembly language as possible... The 32-bit version of MenuetOS is released under the GPL, but the 64-bit version does not use an open-source license, and personal or educational use is free. The developers have not formulated a release schedule for version 1.0. They still need to add new drivers, improve existing applications, and add new features.

[ Last edited by zzz19760225 on 2016-7-20 at 08:12 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 4 Posted 2016-06-26 18:30 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Verbs and static words. Verbs are in motion, static words' addresses are saved, and structural words are in sequence.

Verb commands.
Send 3 to No. 200, Xi'an Railway Station Street; bring 2 from No. 222, Dalian Street.
The relationship structure between movement and stillness should have a complete language pattern, which is structural words.
Command center. Command: Start from the processing plant; send - 3 to No. 200, Xi'an Railway Station Street; save.
Addresses are used for work, body, residence, study, expression, work warehouse, office, processing plant; body's mouth, stomach, intestines, blood vessels, heart, buttocks; residence's floor, table, cabinet; study's bookshelf, books, eyes, brain, thought space.
For the group that tries patterns for machine language and Chinese character operations, quickness should be basic. The amount of information should be limited and effective to avoid errors and circular structures. One-way, similar to one person waving different word cards to another person, but with no feedback and no continuous memory, only the existence of this moment to ensure accuracy.

[ Last edited by zzz19760225 on 2016-9-18 at 21:28 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 5 Posted 2016-06-26 18:31 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Assembly Language
(Programming Language Oriented to Machines)

This entry is reviewed by the "Science Popularization China" Encyclopedia Science Entry Compilation and Application Project.
Assembly language (assembly language) is a low-level language used for electronic computers, microprocessors, microcontrollers, or other programmable devices, also known as symbolic language. In assembly language, mnemonics are used to replace the operation codes of machine instructions, and address symbols (Symbol) or labels (Label) are used to replace the addresses of instructions or operands. In different devices, assembly language corresponds to different machine language instruction sets, and is converted into machine instructions through the assembly process. Generally speaking, a specific assembly language corresponds one - to - one with a specific machine language instruction set, and cannot be directly ported between different platforms.
Many assemblers provide additional support mechanisms for program development, assembly control, and auxiliary debugging. Some assembly language programming tools often provide macros, which are also called macro assemblers.
Assembly language is not widely used in programming like most other programming languages. In today's practical applications, it is usually applied in the occasions of underlying, hardware operation, and high - requirement program optimization. Device drivers, embedded operating systems, and real - time running programs all need assembly language.

Chinese Name
Assembly Language
English Name
Assembly Language

Discipline
Software Engineering
Era of Origin
1950s
Compilation Method
Assembly

Table of Contents

1. Development Process
2. Language Characteristics
▪ Overall Characteristics
▪ Advantages
▪ Disadvantages
3. Language Components

▪ Data Transfer Instructions
▪ Integer and Logical Operation Instructions
▪ Shift Instructions
▪ Bit - Operation Instructions
▪ Conditional Setting Instructions
▪ Control Transfer Instructions
▪ String Operation Instructions

▪ Input and Output Instructions
4. Related Technologies
▪ Assembler
▪ Compilation Environment
5. Development Prospect
6. Practical Applications

7. Classic Textbooks
▪ x86 Processors
▪ ARM and Microcontrollers

Development Process
When it comes to the emergence of assembly language, we should first talk about machine language. Machine language is a set of machine instructions. To expand, a machine instruction is a command that a machine can execute correctly. The machine instructions of an electronic computer are a series of binary digits. The computer converts them into a series of high - and low - level electrical levels to drive the electronic components of the computer to perform operations.
The above - mentioned computer refers to a machine that can execute machine instructions and perform operations. This is the concept of early computers. In the PC we commonly use, there is a chip to complete the functions of the above - mentioned computer. This chip is the CPU (Central Processing Unit) we often talk about. Each microprocessor needs different level pulses to control its work due to different hardware designs and internal structures. So each microprocessor has its own machine instruction set, that is, machine language.
Early program design all used machine language. Programmers typed the program code composed of 0 and 1 on paper tape or cards, with 1 being punched and 0 not being punched, and then input the program into the computer through a paper tape machine or card machine for operation. Such machine language is composed of pure 0s and 1s, which is very complex, not convenient for reading and modification, and also prone to errors. Programmers soon discovered the troubles brought by using machine language. They were difficult to distinguish and remember, which brought obstacles to the development of the entire industry. Then assembly language emerged.
The main body of assembly language is assembly instructions. The difference between assembly instructions and machine instructions lies in the way of instruction representation. Assembly instructions are an easy - to - remember writing format of machine instructions.

Operation: The content of register BX is sent to AX


1000100111011000 Machine instruction


mov ax,bx Assembly instruction


After that, programmers use assembly instructions to write source programs. However, what the computer can understand is only machine instructions. Then how to make the computer execute the programs written by programmers with assembly instructions? At this time, there needs to be a translation program that can convert assembly instructions into machine instructions. Such a program is called a compiler. Programmers write source programs in assembly language, and then use an assembly compiler to compile them into machine code, which is finally executed by the computer.
Language Characteristics
Assembly language is a program design language directly facing the processor (Processor). The processor works under the control of instructions, and each instruction that the processor can recognize is called a machine instruction. Each processor has its own set of instructions that it can recognize, called an instruction set. When the processor executes an instruction, it takes different actions according to different instructions to complete different functions. It can not only change its own internal working state but also control the working state of other peripheral circuits.
Another feature of assembly language is that the objects it operates on are not specific data, but registers or memory. That is to say, it directly deals with registers and memory. This is also why the execution speed of assembly language is faster than other languages, but at the same time, this also makes programming more complex. Since data is stored in registers or memory, there must be addressing modes, that is, the method used to find the required data. For example, in the above example, we cannot use data directly like in high - level languages, but first need to take out the data from the corresponding registers AX and BX. This also increases the complexity of programming, because in high - level languages, this part of addressing work is completed by the compilation system, while in assembly language, it is completed by the programmer himself, which virtually increases the complexity of programming and the readability of the program.
Moreover, assembly language instructions are a symbolic representation of machine instructions, and different types of CPUs have different machine instruction systems, so there are also different assembly languages. Therefore, assembly language programs are closely related to machines. So, except for a certain degree of portability of assembly language programs between CPUs of the same series and different models, assembly language programs between other different types of CPUs (such as minicomputers and microcomputers) cannot be ported. That is to say, the universality and portability of assembly language programs are lower than those of high - level language programs.
Because assembly language has the characteristic of "machine - relatedness", when programmers write programs in assembly language, they can fully arrange various resources inside the machine reasonably and keep them in the best use state all the time. The program code written in this way has short execution code and fast execution speed. Assembly language is the one that is most closely and directly related to hardware among various programming languages, and also the one with the highest efficiency in terms of time and space. It is one of the mandatory professional courses for computer application technology in colleges and universities, and is of great significance for training students to master program design technology, be familiar with the operation and program debugging technology on the computer.
Overall Characteristics
1. Machine - relatedness
This is a low - level language oriented to machines. Usually, it is specially designed for a specific computer or series of computers. Because it is a symbolic representation of machine instructions, different machines have different assembly languages. Using assembly language can face the machine and give full play to the characteristics of the machine, and obtain high - quality programs.
2. High speed and high efficiency
Assembly language retains the advantages of machine language, has the characteristics of directness and simplicity, can effectively access and control various hardware devices of the computer, such as disks, memory, CPU, I/O ports, etc., and occupies less memory and has fast execution speed. It is an efficient program design language.
3. Complexity of writing and debugging
Because it directly controls hardware, and even simple tasks need many assembly language statements, so when carrying out program design, one must consider everything possible problems and reasonably allocate and use various software and hardware resources. In this way, the burden on programmers is inevitably increased. Similarly, when debugging the program, once the operation of the program goes wrong, it is very difficult to find it.
Advantages
1. Because the program designed in assembly language is finally converted into machine instructions, it can maintain the consistency of machine language, be direct and simple, and can access and control various hardware devices of the computer, such as disks, memory, CPU, I/O ports, etc., just like machine instructions. Using assembly language, all accessible software and hardware resources can be accessed.
2. The object code is short, occupies less memory, and has fast execution speed. It is an efficient program design language. It is often used in combination with high - level languages to improve the execution speed and efficiency of the program, make up for the lack of high - level languages in hardware control, and is widely applied.
Disadvantages
1. Assembly language is oriented to machines and is at the bottom of the entire computer language hierarchy, so it is regarded as a low - level language. Usually, it is specially designed for a specific computer or series of computers. Different processors have different assembly language grammars and compilers, and the compiled programs cannot be executed on different processors, lacking portability.
2. It is difficult to understand the program design intention from the assembly language code, and the maintainability is poor. Even to complete a simple task, a large number of assembly language codes are needed, which is very easy to produce bugs and difficult to debug.
3. Using assembly language must have a very good understanding of a certain processor, and can only be optimized for a specific architecture and processor, with very low development efficiency, long cycle and tedious work.
Language Components
Data Transfer Instructions
This part of instructions includes general data transfer instructions MOV, conditional transfer instructions CMOVcc, stack operation instructions PUSH/PUSHA/PUSHAD/POP/POPA/POPAD, exchange instructions XCHG/XLAT/BSWAP, address or segment descriptor selector transfer instructions LEA/LDS/LES/LFS/LGS/LSS, etc. It should be noted that CMOVcc is not a specific instruction but an instruction cluster, including a large number of instructions, which are used to decide whether to perform the specified transfer operation according to certain bit states of the EFLAGS register.
Integer and Logical Operation Instructions
This part of instructions is used to perform arithmetic and logical operations, including addition instructions ADD/ADC, subtraction instructions SUB/SBB, increment instructions INC, decrement instructions DEC, comparison operation instructions CMP, multiplication instructions MUL/IMUL, division instructions DIV/IDIV, sign extension instructions CBW/CWDE/CDQE, decimal adjustment instructions DAA/DAS/AAA/AAS, logical operation instructions NOT/AND/OR/XOR/TEST, etc.
Shift Instructions
This part of instructions is used to move the register or memory operand for the specified number of times. Including logical left shift instructions SHL, logical right shift instructions SHR, arithmetic left shift instructions SAL, arithmetic right shift instructions SAR, circular left shift instructions ROL, circular right shift instructions ROR, etc.
Bit - Operation Instructions
This part of instructions includes bit test instructions BT, bit test and set instructions BTS, bit test and reset instructions BTR, bit test and invert instructions BTC, bit forward scan instructions BSF, bit backward scan instructions BSR, etc.
Conditional Setting Instructions
This is not a specific instruction but an instruction cluster, including about 30 instructions, which are used to set an 8 - bit register or memory operand according to certain bit states of the EFLAGS register. For example, SETE/SETNE/SETGE, etc.
Control Transfer Instructions
This part includes unconditional transfer instructions JMP, conditional transfer instructions Jcc/JCXZ, loop instructions LOOP/LOOPE/LOOPNE, procedure call instructions CALL, sub - procedure return instructions RET, interrupt instructions INTn, INT3, INTO, IRET, etc. It should be noted that Jcc is an instruction cluster, including many instructions, which are used to decide whether to transfer according to certain bit states of the EFLAGS register; INT n is a software interrupt instruction, where n can be a number between 0 and 255, which is used to indicate the interrupt vector number.
String Operation Instructions
This part of instructions is used to operate on data strings, including string transfer instructions MOVS, string comparison instructions CMPS, string scan instructions SCANS, string load instructions LODS, string save instructions STOS. These instructions can optionally use the prefixes REP/REPE/REPZ/REPNE and REPNZ to operate continuously.
Input and Output Instructions
This part of instructions is used to exchange data with peripheral devices, including port input instructions IN/INS, port output instructions OUT/OUTS.
High - Level Language Auxiliary Instructions
This part of instructions provides convenience for compilers of high - level languages, including instructions ENTER for creating stack frames and instructions LEAVE for releasing stack frames.
Control and Privilege Instructions
This part includes no - operation instructions NOP, halt instructions HLT, wait instructions WAIT/MWAIT, escape instructions ESC, bus lock instructions LOCK, memory range check instructions BOUND, global descriptor table operation instructions LGDT/SGDT, interrupt descriptor table operation instructions LIDT/SIDT, local descriptor table operation instructions LLDT/SLDT, descriptor segment limit value loading instructions LSR, descriptor access right reading instructions LAR, task register operation instructions LTR/STR, request privilege level adjustment instructions ARPL, task switch flag clearing instructions CLTS, control register and debug register data transfer instructions MOV, cache control instructions INVD/WBINVD/INVLPG, model - related register reading and writing instructions RDMSR/WRMSR, processor information acquisition instructions CPUID, timestamp reading instructions RDTSC, etc.
Floating - Point and Multimedia Instructions
This part of instructions is used to accelerate the operation of floating - point data and the single - instruction multiple - data (SIMD and its extension SSEx) instructions used to accelerate multimedia data processing. This part of instructions is very large and cannot be listed one by one. Please refer to the INTEL manual by yourself.
Virtual Machine Extension Instructions
This part of instructions includes INVEPT/INVVPID/VMCALL/VMCLEAR/VMLAUNCH/VMRESUME/VMPTRLD/VMPTRST/VMREAD/VMWRITE/VMXOFF/VMON, etc.
Related Technologies
Assembler
A typical modern assembler (assembler) constructs object code, interprets the mnemonics of the assembly language instruction set into operation codes (OpCode), and parses symbolic names (symbolic names) into memory addresses and other entities. Using symbolic references is an important feature of the assembler, which can save the tedious and time - consuming calculation of manual address transfer after modifying the program. Basically, it is to turn machine code into some letters, and when compiling, replace the input instruction letters with obscure machine code.
Compilation Environment
The symbolic program written in non - machine language such as assembly language is called a source program. The function of the assembly language compiler is to translate the source program into an object program. The object program is a machine language program. When it is placed in the pre - set position in the memory, it can be processed and executed by the CPU of the computer.
Generally speaking, there are relatively few debugging environments for assembly, and there are also very few very good compilers. The choice of compiler depends on the type of the target processor and the specific system platform. Generally speaking, a functional compiler should be very easy to use. For example, it should be able to automatically organize the format, have syntax highlighting, integrate compilation, linking, and debugging, and be convenient and practical.
For the widely used personal computer, the free - choice assembly language compilers include MASM, NASM, TASM, GAS, FASM, RADASM, etc., but most of them do not have debugging functions. If it is for learning assembly language, Easy Assembler is a very suitable compiler for beginners because it has a perfect integrated environment.
Development Prospect
Assembly language is the mnemonic of machine language. Compared with the boring machine code, it is easier to read, write, debug and modify. At the same time, excellent assembly language designers have made clever designs, making the code after assembly of assembly language have the advantages of faster execution speed and less memory space occupied than high - level languages. However, the running speed and space occupation of assembly language are relative to high - level languages and need to be cleverly designed. Moreover, the code execution efficiency of some high - level languages is also very high after compilation, so this advantage is gradually weakened. And it has obvious limitations when writing complex programs. Assembly language depends on the specific model and cannot be universal or ported between different models. It is often said that assembly language is a low - level language, which does not mean that assembly language should be discarded. On the contrary, assembly language is still a language that bottom - layer design programmers of computers (or microcomputers) must understand. In some industries and fields, assembly is indispensable and inapplicable without it. However, the largest field of computers today is IT software, which is also the computer application software programming we often talk about. In the hands of skilled programmers, the programs written in assembly language have relatively improved running efficiency and performance compared with programs written in other languages, but the price is that it takes a longer time to optimize. If the computer principle and programming foundation are not solid, it will instead increase the development difficulty, which is really not worth the loss. Compared with software development around 2010, it has been a market - oriented software industry. Plus the excellence and cross - platform of high - level languages, a company cannot let a team use assembly language to write everything, spending several times or even dozens of times the time. It is better to use other languages to complete it. As long as the final result is not much worse than that written in assembly language, it can be completed first. This is an inevitable result under the market economy.
However, so far, no programmer dares to assert that assembly language is unnecessary to learn. At the same time, assembly language (Assembly Language) is a program design language oriented to machines. Exquisitely designed assembly language programmers have partially deviated from software development and entered the industrial electronic programming. For the industries with relatively small functions but strict hardware requirements for language design, such as 4 - bit microcontrollers, due to their capacity and operation, the electronic engineers in this industry are generally responsible for the development and design of circuits and software control. The main development language is assembly, and the use of C language accounts for a very small part. And electronic development engineers are very hard to find. In some industrial companies, a core electronic engineer has a higher treatment than any other staff. In contrast, the treatment of general electronic engineers is more than ten times that of programmers. This situation is because since the 21st century, although there are also many people learning assembly, few can really learn it thoroughly. It is more difficult to learn and use than high - level languages, and the scope of application is small. Although it is simple, it is too flexible. It is much more difficult for people who have learned high - level languages to learn assembly than those who start learning assembly first. But people who have learned assembly can learn high - level languages very easily. Simple from complex is easy, complex from simple is difficult. For a programmer who has a comprehensive understanding of the microcomputer principle, assembly language is a required language.
Practical Applications
With the increasing complexity of modern software systems, a large number of newly emerged high - level languages such as C/C++, Pascal/Object Pascal have also emerged. These new languages enable programmers to be simpler and more efficient in the development process, and enable software developers to meet the requirements of rapid software development. And the complexity of assembly language makes its applicable fields gradually decrease. But this does not mean that assembly has no place. Because assembly is closer to machine language and can directly operate on hardware, the generated programs have higher running speed and occupy smaller memory than other languages. Therefore, it is widely used in some programs with high time - sensitivity requirements, the core modules of many large programs, and industrial control.
In addition, although there are many programming languages to choose from, assembly is still a required course for students majoring in computer science in various universities to enable students to deeply understand the operation principle of computers.
Historically, assembly language was once one of the very popular program design languages. With the growth of software scale and the subsequent requirements for software development progress and efficiency, high - level languages gradually replaced assembly language. But even so, high - level languages cannot completely replace the role of assembly language. Take the Linux kernel as an example. Although most of the code is written in C language, it is still inevitable to use assembly code in some key places. Because this part of the code is very closely related to hardware, even C language will be powerless, and assembly language can give full play to its advantages and maximize the performance of hardware.
First of all, most statements in assembly language directly correspond to machine instructions, have fast execution speed, high efficiency, and small code volume. They are relatively useful in occasions where memory capacity is limited but fast and real - time response is required, such as in instrument meters and industrial control equipment.
Secondly, in the core part of the system program and the part that frequently interacts with the system hardware, assembly language can be used. For example, the core program segment of the operating system, the initialization program of the I/O interface circuit, the low - level driver program of external equipment, and frequently called sub - programs, dynamic link libraries, some advanced drawing programs, video game programs, etc.
Thirdly, assembly language can be used in various aspects such as software encryption and decryption, analysis and prevention of computer viruses, and program debugging and error analysis.
Finally, by learning assembly language, one can deepen the understanding of courses such as computer principle and operating system. By learning and using assembly language, one can perceive, experience, and understand the logical function of the machine, lay a technical theoretical foundation for understanding the principles of various software systems upward, and lay a practical application foundation for mastering the principles of the hardware system downward.
Classic Textbooks
There are many textbooks on assembly language, involving various processors. There are roughly no less than 100 kinds. Among so many textbooks, the more commonly used ones can be listed in categories as follows:
x86 Processors
1. "x86 Assembly Language: From Real - Mode to Protected Mode", written by Li Zhong, published by Publishing House of Electronics Industry, 2013 - 1.
Based on the INTEL x86 processor, NASM compiler, and BOCHS virtual machine. Assembly language is the language of the processor. In this sense, since learning assembly language, one must directly program for hardware, not use inexplicable DOS interrupts and API calls. This is an interesting book. It does not spend space on calculating some boring math problems. On the contrary, it teaches you how to directly control hardware, such as displaying characters, reading hard disk data, and controlling other hardware without the support of BIOS, DOS, Windows, Linux, or any other software.
We know that 32 - bit and 64 - bit are the mainstream, and real - mode and DOS operating systems have become history. Linux and Windows both work in protected mode. This book talks about real - mode to 32 - bit protected mode, especially focusing on 32 - bit protected mode. Reading this book is of great help for understanding the working principles of modern computers and modern operating systems.
2. "Assembly Language" (2nd Edition), written by Wang Shuang, published by Tsinghua University Press, 2013 - 4 - 1
Based on the INTEL 8086 processor, MASM compiler, and DOS platform assembly textbook, completely focusing on the real - mode of the 8086 processor, not involving common 32 - bit and 64 - bit modes. But because it is easy to understand, the readers' feedback is very good.
3. "80X86 Assembly Language Programming Tutorial", compiled by Yang Jiwen et al., published by Tsinghua University Press, 1999 - 3 - 1
Based on the INTEL x86 processor, MASM and TASM compilers, including the content of 16 - bit real - mode and 32 - bit protected mode, and the latter is described in more detail.
4. "32 - Bit Assembly Language Programming", compiled by Qian Xiaojie, published by China Machine Press, 2011 - 8 - 1
Based on the INTEL x86 processor, MASM compiler, and WINDOWS platform assembly textbook.
5. "16/32 - Bit Microcomputer Principle, Assembly Language and Interface Technology", compiled by Qian Xiaojie and Chen Tao, published by China Machine Press, 2005 - 2 - 1
Based on the INTEL x86 processor, it discusses the basic principles, assembly language, and interface technology of 16 - bit microcomputers, and introduces the relevant technologies of 32 - bit microcomputer systems.
6. "Intel Assembly Language Programming" (5th Edition), written by (US) Irving, published by Publishing House of Electronics Industry, 2012 - 7 - 1
Based on the INTEL x86 processor, MASM compiler, and DOS/WINDOWS platform assembly textbook, it has the content of 16 - bit real - mode and 32 - bit protected mode.
7. "The Art of Assembly Language Programming" (2nd Edition), written by (US) Hyde, published by Tsinghua University Press, 2011 - 12 - 1
Based on the INTEL x86 processor, the author's self - made advanced language assembler (High Level Assembler, HLA) is used as a teaching tool to partially obtain the advantages and functions of high - level languages.
8. "x86 PC Assembly Language, Design and Interface" (5th Edition), written by (US) Mazidi and Kaush, published by Publishing House of Electronics Industry, 2011 - 1 - 1
Based on the INTEL x86 processor, it not only talks about the content of 16 - bit real - mode but also talks about the content of 32 - bit protected mode, and also has some introduction to 64 - bit.
ARM and Microcontrollers
1. "Assembly Language Programming -- Based on ARM Architecture" (2nd Edition), edited by Wen Quangang et al., published by Beijing University of Aeronautics and Astronautics Press, 2010 - 8 - 1
Based on the processor of the ARM architecture, it is an introductory textbook for learning embedded technology.
2. "Learn AVR Microcontroller from Scratch", compiled by Xu Yimin et al., published by China Machine Press, 2011 - 1 - 1
It includes microcontroller overview, development tools of avr microcontroller, avr microcontroller C language, basic structure of atmega16 microcontroller, instruction system and assembly system of avr, etc.
3. "Practical Tutorial on 51 Microcontroller Simulation Based on Multisim10", edited by Nie Dian and Ding Wei, published by Publishing House of Electronics Industry, 2010 - 2 - 1
It expounds various main functions of NI Multisim 10 in microcontroller simulation.
4. "PIC18 Microcontroller: Architecture, Programming and Interface Design", written by (US) Berry, published by Tsinghua University Press, 2009 - 4 - 1
Microcontrollers are widely used in many fields such as automobiles, home appliances, industrial control, and medical equipment. This book takes the PIC18 series microcontrollers of Microchip Company as an example to comprehensively explain how to program microcontrollers using C language and assembly language.
5. "CASL Assembly Language Programming", compiled by Zhao Lihui, published by China Electric Power Press, 2002 - 10 - 1
CASL assembly language is a necessary content for the senior programmer level of the computer software professional technology qualification and level examination in China. This book is a monograph on CASL assembly language programming.

-----------------------------------------------------------------------

http://vdisk.weibo.com/s/BJ8eVgUUujf2u

[ Last edited by zzz19760225 on 2017 - 11 - 11 at 19:03 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 6 Posted 2016-06-26 18:32 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
1<词>,2,3/段\,4{节},5(章)。
Floor 7 Posted 2016-06-26 18:33 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
1<词>,2,3/段\,4{节},5(章)。
Floor 8 Posted 2016-06-26 18:35 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
1<词>,2,3/段\,4{节},5(章)。
Floor 9 Posted 2016-06-26 18:36 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
1<词>,2,3/段\,4{节},5(章)。
Floor 10 Posted 2016-06-26 18:37 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
1<词>,2,3/段\,4{节},5(章)。
Floor 11 Posted 2016-06-26 18:38 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
1<词>,2,3/段\,4{节},5(章)。
Floor 12 Posted 2016-06-26 18:39 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
1<词>,2,3/段\,4{节},5(章)。
Floor 13 Posted 2016-06-26 18:40 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
1
MASM

1
Simple Transfer Instructions 13
1 |---MOV
2 |---MOVSX
3 |---MOVZX
4 |---PUSH
5 |---POP
6 |---POPF
7 |---XLAT
8 |---XCHG
9 |---SAHF
10|---LDS
11|---LEA
12|---LES
13|---LAHF

2
Arithmetic Operation Instructions 19
1 |---AAD
2 |---ADD
3 |---AAS
4 |---AAM
5 |---ADC
6 |---AAA
7 |---SUB
8 |---SBB
9 |---MUL
10|---IMUL
11|---CBW
12|---CMP
13|---CWD
14|---DAA
15|---DEC
16|---DIV
17|---IDIV
18|---INC
19|---NEG

3
Logic Operation Instructions 13
1 |---AND
2 |---OR
3 |---XOR
4 |---NOT
5 |---TEST
6 |---SHL
7 |---SHR
8 |---SAL
9 |---SAR
10|---ROL
11|---ROR
12|---RCL
13|---RCR

4
String Operation Instructions 16
1 |---MOVS
2 |---MOVSB
3 |---MOVSW
4 |---CMPS
5 |---CMPSB
6 |---CMPSW
7 |---SCAS
8 |---SCASB
9 |---SCASW
10|---STOS
11|---LODS
12|---REP
13|---REPZ
14|---REPE
15|---REPNZ
16|---REPNE

5
Program Transfer Instructions 55
1 |---JMP
2 |---JC
3 |---JNC
4 |---JE
5 |---JZ
6 |---JNE
7 |---JNZ
8 |---JS
9 |---JNS
10|---JO
11|---JNO
12|---JP
13|---JPE
14|---JNP
15|---JPO
16|---JA
17|---JNBE
18|---JAE
19|---JNB
20|---JB
21|---JNAE
22|---JBE
23|---JNA
24|---JG
25|---JNLE
26|---JGE
27|---JNL
28|---JL
29|---JNGE
30|---JLE
31|---JNG
32|---LOOP
33|---LOOPZ
34|---LOOPE
35|---LOOPNZ
36|---LOOPNE
37|---CALL
38|---RET
39|---IRET
40|---IN
41|---OUT
42|---INT
43|---INTO
44|---CLC
45|---CLD
46|---CLI
47|---CMC
48|---ESC
49|---HLT
50|---LOCK
51|---NOP
52|---STC
53|---STD
54|---STI
55|---WAIT

6
Assembly Pseudoinstructions 3
1 |---EQU
2 |---DB
3 |---SEGMENT

[ Last edited by zzz19760225 on 2018-1-1 at 08:06 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 14 Posted 2016-06-26 18:40 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
1-bit binary Decimal Overall sequence number
1 1.1 1
0 1.2 2

2-bit binary
10 2.1 3
11 2.2 4
01 2.3 5
00 2.4 6

3-bit binary
111 3.1 7
110 3.2 8
100 3.3 9
000 3.4 10
001 3.5 11
011 3.6 12
101 3.7 13
010 3.8 14

4-bit binary
1111 4.1 15
1110 4.2 16
1100 4.3 17
1000 4.4 18
1101 4.5 19
1001 4.6 20
1011 4.7 21
1010 4.8 22

0000 4.9 23
0001 4.10 24
0011 4.11 25
0111 4.12 26
0010 4.13 27
0110 4.14 28
0100 4.15 29
0101 4.16 30

5-bit binary
11111
11110
11100
11000
10000
11101
11001
11011
11010
10001
10011
10010
10111
10110
10100
10101

The law of the expansion of the number of digit sequences for the two number combinations.
The law of the total number and the structural law, mainly to find the structural law, and to make the commonly used repeated parts, such as the golden spiral, close to the gradual progress of historical truth, and become a step of orderly progress.

Permutation and combination fill-in-the-blank questions:
M filling positions ( ) ( ) ( ), M=3
Filling range O=01 N=2 (can be any two kinds of characters or what objects)
List: L=
111
110
100
101
000
001
011
010

MNOL
Problem equationization, variableization, induction and deduction abstraction, the possible range of chaotic changes, and the docking with the limited reality.










Permutation and combination : pusofalse (Great gods swarm)
http://www.cn-dos.net/forum/viewthread.php?tid=41243&fpage=1&highlight=%E6%8E%92%E5%88%97%E7%BB%84%E5%90%88&page=1

The permutation and combination of each line of two texts to produce a new text : w1314ich ccwan
http://www.cn-dos.net/forum/viewthread.php?tid=53353&sid=z5QCc9

Baidu Experience : Permutations and combinations in mathematics : Xiaoxiao Ye Zhen
https://jingyan.baidu.com/article/f3ad7d0f1dce7b09c3345b88.html

[ Last edited by zzz19760225 on 2017-11-30 at 14:09 ]
1<词>,2,3/段\,4{节},5(章)。
Floor 15 Posted 2016-06-26 18:43 ·  中国 海南 海口 电信
超级版主
★★★★
Credits 3,673
Posts 2,020
Joined 2016-02-01 00:00
10-year member
UID 181465
Gender Male
Status Offline
Assembly programs generally use two passes to complete the assembly task of the ___source program___.
The first pass mainly completes the establishment of the ______________;
The second pass converts each program line into ____________ or ________________, thereby generating ___________.
At the same time, it can generate ________________ files and ________________ files as needed.
Both passes can encounter the ______END__________ instruction to end.

spasm
no file specified No file specified

[ Last edited by zzz19760225 on 2017-11-29 at 13:01 ]
1<词>,2,3/段\,4{节},5(章)。
1 2 3 6 Next ›
Forum Jump: