Assembly language notes-label, name and programming framework

Article Directory

  • General format of instructions
  • The instruction generally consists of two parts, namely the opcode and the operand. The opcode includes the instruction prefix (0-4 bytes) and the opcode (1-3 bytes), and the operand includes mod (0/1 Bytes), SIB (0/1 byte), displacement (0/1/2/4 bytes), immediate data (0/1/2/4 bytes). Among them, the instruction prefix to the immediate data is the low byte to the high byte.

  • The difference between label and name
  • Label
    first name
    Executive statement Descriptive statement
    Separated by colon Separated by spaces or tabs
    Indicates the logical address of the processor instruction in main memory Variable name, short-lived, subroutine name
    Indicates the destination address of the branch, loop, etc. program Reflect the logical addresses of variables, segments and subroutines, etc.

  • Delimiter
    1. Colon after label
    2. Semicolon before comment
    3. Comma between operands and parameters
    4. Separate other parts using

Label: Hard instruction mnemonic operand, operand
Name: pseudo instruction mnemonic parameter, parameter

  • MASM programming framework

  • io32.inc the include
    .data
    ......; data defining
    .code
    ......; program instructions
    Start: ......
    Exit 0 (execution end)
    ......
    End Start (End compilation)
  • Note: The execution is terminated! = End of assembly
  • Write at the end
  • This blog seems to be recording assembly language notes. In fact, all the formats you can see in this note are written in html. Although the writing is a bit slow, the advantage of this is that I am writing in html. At the time, I will forget some of the things I learned before. Through this learning, I can become more proficient in html applications. Come on, I wish you all become stronger.

Guess you like

Origin blog.csdn.net/qq_45597048/article/details/109668701