Summary of the second week of September

  1. Under normal circumstances, the default register combinations:
    ds:si es:di
    in the absence of a statement of a segment register, the combination according to the default address, but if you want to specify a particular segment register is required seg cs.

  2. CLI disable interrupts occur, STI interrupt generation enabled
    these two commands only in kernel mode to the next, you can not in user mode; and executing in kernel mode, should be restored as quickly as possible interruption, because CLI will disable hardware interrupt, if prolonged disable interrupts affect the execution of other actions (such as moving the mouse, etc.), the system will become unstable. The case of interrupt flags in the flag register, you can call in the form of soft interrupt "int ××" is.

  3. CLD and STD is used to operate the direction flag DF (Direction Flag). CLD DF is reset so that the DF = 0, STD so DF bit is set, i.e., DF = 1.

  4. And ROR instruction ROL
    Rotate Left / right shift instruction but in different directions, removing them only to enter CF2 bit, but also to fill the vacated bits.
    E.g:
             MOV AL,82H
             ROL AL,1

      82H to first convert the binary number 10000010B
      after a left circle becomes: 00000101B, converted to a hexadecimal number 05H is
      the right one cycle becomes: 01000001B, is converted to a hexadecimal number 41H

  1. Test two operands command logical AND operation, and sets the flag according to the related calculation result.

  2. Instructions affect the flags register mostly arithmetic logic instructions, such as add, sub, mul, etc.
    Some instructions have no effect on execution flag register transfer instruction: The mov, push, pop, etc.

  3. Assembly language is expressed using three concepts position data: the
    immediate data (Idata), registers, segment address (SA) and offset address (EA)

  4. When the position of the boot and where the core is moved in the position memory

  5. In protected mode, jmpi 0,8 no longer as real mode, is set to 0 directly ip, cs is set to 8, then left 4 cs + ip, instead of using the query translation table plus ip gdt
    such :
jmpi 0,8

Gdt need to position Table 8 to find out the address translation, and adds the offset 0, the conclusion that the real physical address, which is protected mode and real mode different places.

  1. Inline assembly format
    asm (
    assembly language template:
    Output parts:
    the input section:
    the destruction description section
    )
    assembly language template is essential, the other three options.
  2. OF
    for signed numbers, when the result with the original register can not be represented, OF is set to 1

Guess you like

Origin www.cnblogs.com/zhaijiayu/p/11516834.html