Basic instructions
Assembly language is made up of direct lines of code that follow this syntax:
The label is used to define the location of the instruction line. It is generally used during development of an assembly code without prior knowledge of the address where the code will be placed in the memory. Some debuggers are able to support having the user label addresses with a readable name. A mnemonic is a human readable instruction, such as MOV, ADD and SUB. Every mnemonic is represented by a byte number or a couple of bytes called an opcode. The operands are the instruction's arguments. This is normally read as destination, source
. In the instruction shown above, the eax
register is the destination and the doubleword data stored at address 0x0AD4194. Finally, we can add comments to every instruction line of our program.
Note
In assembly language, code comments are denoted by a semicolon (;)
Opcode bytes
Every instruction has an equivalent opcode (operation code) byte:
Address Opcode...