1.MOV: - This instruction is used to copy the data from one place to another.
Eg: - MOV Rd, Rs (This instruction copies the content of Rs to Rd)
MOV M,Rs (This instruction copies the content of register Rs to memory location pointed by HL Register)
MOV Rd, M (This instruction copies the content of memory location pointed by the HL
register to the register Rd.)
register to the register Rd.)
2.MVI: - move immediate date to a register or memory location.
Eg: - MVI Rd, #30H (30h is stored in register Rd)
MVI M, #30H(30h is stored in memory location pointed by HL Reg)
3.LDA: - Load accumulator. (this instruction copies the data from a given 16 bit address to the accumulator)
Eg: - LDA 3000H (content of memory location 3000h is coppied in accumulator)
4.LDAX(Load accumulator indirect): - The contents of the designated register pair point to a memory location. This instruction copies the contents of that memory location into the accumulator. The contents of either the register pair or the memory location are not altered.
Eg: - LDAX B
5.LXI(Load register pair immediate): - The instruction loads 16-bit data in the register pair designated in the
operand.
operand.
Eg: - LXI H, 2034H (2034H is stored in HL pair so that it act as memory pointer)
LXI H, XYZ (address of level XYZ is copied in HL pair)
6.LHLD(Load H and L register direct): - this instruction loads the contents of the 16- bit memory location into the HL register pair.
Eg: - LHLD 3000H (the content of location 3000h is copied into the HL reg pair)
7.STA: - the content of accumulator are copied into the memory location.
Eg: - STA 3000H (the content of accumulator is stored into the memory location 3000h)
8.STAX(Store accumulator indirect): - The contents of the accumulator are copied into the memory location specified by the contents of the operand (register pair). The contents of the accumulator are not altered.
Eg: - STAX B (the content of accumulator is stored into the memory location specified by the BC register pair.)
9.SHLD(store H and L register direct): - The contents of register L are stored into the memory location specified by the 16-bit address in the operand and the contents of H register are stored into the next memory location by incrementing the operand. The contents of registers HL are not altered. This is a 3-byte instruction, the second byte specifies the low-order address and the third byte specifies the high-order address.
Eg: - SHLD 3000H
Thank you so much..good place to learn and revise the instructions.
ReplyDeletenice!!!! can i get some practice problems!!!
ReplyDelete
DeleteExample 2: Arithmetic operations
LDA ALPHA
ADD INCR
SUB ONE
…….. STA BETA
……..
……..
ONE WORD 1
ALPHA RESW 1
BEETA RESW 1
INCR RESW 1
Example 3: Looping and Indexing operation
LDX ZERO ;X = 0
MOVECH LDCH STR1, X
STCH STR2, X
TIX ELEVEN
JLT MOVECH
. . . . . .
. . . . . .
. . . . . .
STR1 BYTE C ‘HELLO WORLD’
STR2 RESB 11
ZERO WORD 0
ELEVEN WORD 11
Example 4: Input and Output operation
INLOOP TD
JEQ RD STCH INDEV
INLOOP INDEV DATA ; TEST INPUT DEVICE
; LOOP UNTIL DEVICE IS READY
; READ ONE BYTE INTO A
; STORE A TO DATA
.
.
OUTLP TD OUTDEV ; TEST OUTPUT DEVICE
JEQ OUTLP ; LOOP UNTIL DEVICE IS READY
LDCH DATA ; LOAD DATA INTO A
WD OUTDEV ; WRITE A TO OUTPUT DEVICE
.
.
INDEV BYTE X ‘F5’ ; INPUT DEVICE NUMBER
OUTDEV BYTE X ‘08’ ; OUTPUT DEVICE NUMBER
DATA RESB 1 ; ONE-BYTE VARIABLE
5.LXI(Load register pair immediate): - The instruction loads 16-bit data in the register pair designated in the
ReplyDeleteoperand.
Eg: - LXI H, 2034H (2034H is stored in HL pair so that it act as memory pointer)
LXI H, XYZ (address of level XYZ is copied in HL pair)
6.LHLD(Load H and L register direct): - this instruction loads the contents of the 16- bit memory location into the HL register pair.
Eg: - LHLD 3000H (the content of location 3000h is copied into the HL reg pair)
What is difference tem will u explain it
both are same just the difference is in the type of addressing mode...google type of addressing mode for more information
DeleteNo both arent the same. LXI copies the 16 bit address 3000H to HL pair as in 30H to H and 00H to L. LHLD will copy the data contained in 3000H memory location to L and data contained in 3001H memory location to H.
DeleteThis comment has been removed by the author.
Deletesorry i fail to distinguish btn MOV and MVI help me please
DeleteLHLD 3000
Delete(3000)-->L
(3001)-->H
@Javesh Go through ramesh goankar
Delete@shaban mov dest,source moves data between registers
DeleteMvi reg,xx stores an value xx in register
in LHLD instruction the data at two consecutive locations will load in HL pair
Deletefor eg- LHLD 3000H
then data at 3000 load in H reg and data at next location which is 3001 load in L reg
If address is 3000H and data at 3000H is 20 and at 3001H is 30.
DeleteThen LXI H, 3000H
H = 30H
L = 00H
Then LHLD 3000H
H = 30H
L = 20H
This comment has been removed by the author.
ReplyDeleteWhy STAX H is not possible plz answer in detail
ReplyDeleteLdax H and stax H is not there as Mov M,A and Mov A,M does the job
DeleteSTAX means:conntent of A sent to regıster pairs.I mean regıster paırs are 16 bıts.
DeleteIf no1 and no2 are 8 bit the how to cpy no1 to no2 and if they are 16 bit
ReplyDeletethanks for giving defined information of instructions
ReplyDeleteb ram and vibhuti microprocessor 8085 which any person have pdf book please send me my mail.id pravesh.bhagat@gmail.com
ReplyDeleteso what LXI B,nn mean?
ReplyDeletenh nL is 16bit data nh lxi B,nhnl stores nh in B reg nl in C register
Deletenh nL is 16bit data nh lxi B,nhnl stores nh in B reg nl in C register
Deletecan mov r,m be used after lxi d?
DeleteLxi B initialises the pointer at the specified memory location of register By.For example:
DeleteLXI B,C050H indicates that pointer is now pointing towards memory location C050 in register B
@mercy Yes mov r,m can be used after LXI d but memory location should have some specific data in it(cannot be empty).Also,we generally prefer initialising registers at the start so LXI d should be at the start of the program ,then you should load data into memory m and then use the instruction mov r,m to move data in memory location to register r
Deleteso what LXI B,nn mean?
ReplyDeletekera
Deletecan i use "mov" instruction to move data to accumulator or i have to only use "mvi" instruction only?
ReplyDeleteDon't get confused. Both will move the data.
DeleteMOV A B will move the contents of B
MVI A 03 here the value 03 is directly moved to the Accumulator!
Thnkz gys..
ReplyDeleteLHLD is wrong here
ReplyDelete++
DeleteNice......... From these I will learn about so much instructions
ReplyDeleteThanks it is very helpfull
ReplyDeleteSubscribe the YouTube Channel
ReplyDeleteThe Knowledge Adda
for learn microprocessor programming
WAT IS SBB
ReplyDeleteSharp and Clear ;)
ReplyDeleteis STAX H a valid instruction??
ReplyDeletei am trying same but it shows error to me that is "unrecognized instruction". :-(
Deletehow to copy the content of flag register into another register
ReplyDeleteNice....👍
ReplyDeleteLDA 2000H HERE H DENOTES WHAT?
ReplyDeleteWHAT IS THE DIFFERENCE BETWEEN ADDING 2 BIT OR 16 BIT NO.?
ReplyDeletewat is the difference bwt mov a b and mov b a?
ReplyDeleteMov a b means moving the value of b to a and mov b a means moving the value of a to b
DeleteYo yyo honey Singh aaa
ReplyDeleteSTAX H
ReplyDeletework or not
In 30H , what does He means??
ReplyDeleteWallah habibi
ReplyDeleteشركة مكافحة حشرات بجدة
ReplyDeleteشركة مكافحة حشرات بمكة المكرمة
شركة رش دفان بمكة
شركة رش مبيدات بجدة
شركة رش مبيدات بتبوك
Very useful sir..Tq😊✌️
ReplyDeleteWhen shld instruction for hl register then which instruction use for bc and de register?
ReplyDelete