AssemblyLanguage -I Submitted by : DevikaRangnekar Rupam JaspreetKaur MCA – I (Morning) Rollno : 9 30 15 Submitted to : Ms. InduChabbra Free Powerpoint Templates
Assembly Language A Language that allows instruction and storage locations to be represented by letters and symbols instead of binary numbers is called Assembly Language or Symbolic Language.
Instruction Set DIRECTIVE:
Also called Pseudo- Instruction
Tells assembler to perform specific action.
INSTRUCTION:A set of statements that assembler translates into object code. FORMAT for INSTRUCTION
Format for Instruction IDENTFIER:Name or Label that you give to a data item or an instruction. OPERATION:reserved symbols that correspond to instructions ex: ADD, MOV,SUB,AND, LD, LDR, … OPERAND :Data on which the operation is to be performed.
Registers -- specified by Rn, where n is the register number
Numbers -- indicated by # (decimal) or x (hex)
Label -- symbolic name of memory locations
ex: ADD R1,R1,#3
Source and Destination Source operands can be: Register/Memory reference/Immediate value Destination operands can be: Register/Memory reference Note: The Intel CPU does NOT allow both source and destination operands to be memory references
Examples of Instruction Set DIRECTIVE: COUNT DB 1; INSTRUCTION: MOV AX, [0x00040222h] Can also have register names instead of hex addresses e.g. MOV AX, [EBX] COUNT will define a byte with initial value 1 Contents of memory location 0x00040222 Refers to the contents of register EBX
Types of Instructions
Data Transfer Instruction
Data Transfer Instructions
Logic instructions EXAMPLE: Let AX=1010 BX=0111 AND BX,AX BX=0010 1010 .0111 0010
Shift Instrun.Rotate Instrun.
EXAMPLES SHIFT INSTUCTION SHL BH,1 ;shift 1 bit left BH :00001010 OUTPUT: ROTATE INSTRUCTION ROL BH,1 ; rotate 1 bit left BH: 10110111 OUTPUT: LOST INCLUDED
ARITHMETIC OPERATORS These operators include the arithmetic signs and perform arithmetic during the assembly.
The LOGICAL operators process the bits in an expression.
EXECUTING A PROGRAM Having assembled and linked a program, we can now execute it . If the .EXE file is in the default drive, you could ask the loader to read it into memory for execution by typing C:TASMBIN>PROG.EXE