Assembler structure language code lines name of the Instruction parameters of the command


Home | Order Online | Downloads | Contact Us | Software Knowledgebase

it | es | pt | fr | de | jp | kr | cn | ru | nl | gr

Assembler structure

In assembly language code lines have two parts, the first one is the name of the Instruction which is to be executed, and the second one are the parameters of the command. For example:

ADD ah, bh

Here "ADD" is the command to be executed; in this case an addition, and "ah" as well as "bh" are the parameters.

The name of the Instructions in language is made up of two, three or four letters. These Instructions are also called mnemonic names or operation codes, since they represent a function the processor will perform. There are some commands which do not require parameters for their operation, as well as others that only require just one parameter.

Sometimes Instructions are used as follows:

ADD al,[170]

The brackets in the second parameter indicate to us that we are going to work with the content of the memory cell number 170 and not with the 170 value; this is known as direct direction.

Now we are ready to code for our first program with the help of debug. We are going to create a program that works to illustrate what we have been seeing, and what we will do is to add two values that we will directly introduce into the program.

The first step is to initiate the Debug, this step only consists of typing debug <Enter> on the operative system prompt.

To assemble a program on the Debug, the "a" (assemble) command is used. When this command is used, the address where you want the assembling to begin can be given as a parameter, if the parameter is omitted the assembling will be initiated at the locality specified by CS:IP, usually 0100h, which is the locality where programs with .COM extension must be initiated. And it will be the place we will use since only Debug can create this specific type of programs.

Even though at this moment it is not necessary to give the "a" command a parameter, it is recommendable to do so to avoid problems once the CS:IP Registers are used, therefore we type:

-a0100 <Enter>

When this is done something like this will appear on the screen: 0C1B:0100 and the cursor is positioned to the right of these numbers, note that the first four digits, in hexadecimal system, can be different, but the last four must be 0100, since it is the address we indicated as a begin. Now we can introduce the Instructions:

0C1B:0100 mov ax,0002; puts the 0002 value on the ax register
0C1B:0103 mov bx,0004; puts the 0004 value on the bx register
0C1B:0106 add ax,bx; the content of bx is added to the content of ax
0C1B:0108 int 20; provoques the termination of the program.

Sample Chapters from book DATA RECOVERY WITH AND WITHOUT PROGRAMMING by Author Tarun Tyagi
Data Recovery with & without Programming

Publishers of the Book
Number of Pages
Price of the Book

BPB Publications, New Delhi, India
$69.00 (Including Shipping Charges, Cost of Book and Other expenses, Free Source Code CD included with the Book)

Buy Data recovery Book

Previous page

page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20


page 21 | 22 | 23 | 24 | 25 | 26

Next page

© Copyright 2002-2005 DataDoctor.Biz

Home | Contact us | Downloads | Services | Terms and conditions | Site map

Website Data Recovery | recuperación de Datos | Récupération de données | Datenrettung | Recupero dati | データ復旧 | 데이터 복구 | 数据恢复 | Восстановление данных | De terugwinning van gegevens | Ανάκτηση δεδομένων
Sitemap Site map1 2 3 4 | Spanish1 2 3 | French1 2 3 | German1 2 3 | Italian1 2 3 | Portuguese1 2 3 | Japanese1 2 3 | Korean1 2 3 | Chinese1 2 3 | Russian1 2 3 | Dutch1 2 3 | Greek1 2 3
Data Recovery Book English | Spanish | French | German | Italian | Portuguese | Japanese | Korean | Chinese | Russian | Dutch | Greek