Making Labels

  1. Appointment Making
  2. Joe Vitale. The greatest money-making secret in history!
  3. Labels must be defined in code or data section when making an object file.
  4. Making questions
  5. Man was inventing machines and instruments for making his life easier.
  6. Tell us the shortest biography in the world, making complete sentences.

In assembly, to make labels is simple, just put any name and stick it with a colon (:). Label usually serves as a tag of where you'd like to jump and so on. You have to pick unique namesfor each label, otherwise the assembler will fail. There is a way to make it local: to prefix it with a @@in front of the label name and still end it with a colon. However, this kind of label only valid in procedures or sub-routines. So, do not use this kind of labels right now.


In assembly, after the word endor end entry, Your program DOES NOTterminate automatically. Pay attention to this. You have to specify that you would like to terminate your program. The two line commands in above example can be used to terminate programs.

Assembly language command in x86 platform is usually formatted as follows:

[Label:] mneumonic target, source

Mneumonic is just the jargon for assembly commands. Why is it called that way? It is because that the commands in assembly (somewhat) resemble English words. Then followed by the target, and then comma, and then the source. Label can precede the command if any. For example:

mov ax, 4c00h

Is to move the value 4c00 hexadecimal into the register AX. Simple right?

If there is only one parameter (like in int 21h), Usually it denotes the source or the destination depending on the command. Like in jmp start, It means jump to the destination start. As in int 21h, You are invoking operating system library in vector 21 hexadecimal.

You must notice that many of assembly language numbers are expressed in either hexadecimal or binary. So, be really prepared.

If you list the directory after you correctly assemble your program, you will be surprised: The whole bunch of lines is squashed into only 8 bytes! And it's running!WOW! See? It is still could be even smaller (5 bytes or even 2 bytes).

Registers | Interrupts | Variable Limits and Negative Values | Moving Around Values | Caveats in MOVs | Impacts on Registers | Question Marks On Variables | Multi-valued Variables | Addition And Subtraction | Multiplication, Division, and Remainder |

© -