Professional Documents
Culture Documents
0 Ses 4 Asm
0 Ses 4 Asm
• Answer
mov ax,1 ;move 1 to the AX register
add ax,1 ;add 1 to the AX register
Instruction sets and types
• We used
• add ax,1
Notice the initial state of the register; also can you see how instructions were translated to
hexadecimal?
Instruction sets and types
We have now transferred the value 1 to the AX register; notice how IP (Instruction pointer) has
incremented
Instruction sets and types
We have now added the value 1 to the AX register; this register now has our solution
Session Four
Lesson Plan
• These characters are an optional suffix you can append to your numbers and
are formerly known as a radix.
• If no radix is given, the integer constant is assumed to be decimal.
• Here are some examples using different radixes:
Basic elements of Assembly language
Basic elements of Assembly language
• Reserved words have special meaning in AL and can only be used in their correct
context.
• There are different types of reserved words:
• Instruction mnemonics, such as MOV, ADD, and MUL
• Register names
• Directives, which tell how to assemble programs
• Attributes, which provide size and usage information for variables and operands. Examples
are BYTE and WORD
• Operators, used in constant expressions
Basic elements of Assembly language
• A label is an identifier that acts as a place marker for instructions and data.
• A label placed just before an instruction implies the instruction’s address.
• Similarly, a label placed just before a variable implies the variable’s address.
Basic elements of Assembly language
• A label in the code area of a program (where instructions are located) must
end with a colon (:) character.
• Code labels are used as targets of jumping and looping instructions.
• For example, the following JMP (jump) instruction transfers control to the
location marked by a label.
Basic elements of Assembly language
• Log into google classroom, navigate to classwork tab and click on the
tutorial label
• You should see a file labeled as lecture4.asm
• Download and run this file using emu8086. How does this program
demonstrate the basic elements of AL?
Assignment One
• Any questions?
• Feel free to reach out
• saqib.sadiq@szabist.pk