The difference between 16-bit and 32-bit 80X86 assembly language

  • It should be noted that assembly is not a language, and different platforms have different assembly languages. Because assembly is related to the operating system platform, assembly language is not portable. For the IA-32 architecture platform, the selected 32-bit 80386 assembly language means that the operating system platform in question is 32-bit, and the executable file format is also 32-bit instead of 64-bit or 16-bit.
  • In the actual analysis, it is necessary to know what platform the program under study is running on, so as to select the corresponding assembly language. For the IA-32 architecture, the assembly language principle of the IA-16 architecture is actually the same as that of the IA-32 assembly language. 16-bit 80x86 assembly language folks can switch to 32-bit 80386 assembly language with just a little time.

The main differences between the 80x86 assembly language of the 16-bit operating system and the 32-bit operating system are as follows:

  1. An interrupt call in a 16-bit OS is equivalent to an API call in a 32-bit OS. The mid-segment address and offset address of the 16-bit operating system disappeared in the 32-bit operating system, and the flat memory address mode addressing was uniformly used in the 32-bit operating system.
  2. Programs in 16-bit operating systems run at the RING0 level, which means that ordinary programs and operating system programs run at the same level and have the highest authority, while programs in 32-bit operating systems generally only have GING3 level running authority. The operation is controlled by the operating system. If the program wants to obtain the RING0 operation privilege, it can only be realized by the driver.
  3. The executable file format of the 16-bit operating system is different from the executable file format of the 32-bit operating system. In the 32-bit Windows operating system, the executable file format is added in PE format, and the 32-bit Windows operating system runs under the protection of the CPU. , while 16-bit systems run on the CPU's real mode.

What is IA-32?

IA-32 (Intel Architecture), Intel architecture, adopted by Intel from 486, that is, X86-32 architecture, can process 32-bit data at the same time. The working width of the CPU is 32 bits. Other companies are compatible with this architecture in terms of software and hardware, and are also listed as IA-32 architecture.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325892913&siteId=291194637