Lxih, 2200 mov c,m inxh mov a,m inxh cmp m jc l1 mov a,m dcr c jnz l2 inhx mov m,a hlt
mov
Mov ax,1234 mov bx,2345 add ax,bx mov @(some memory location ) say 2200,ax hlt
MOV D,reg means: move content of the specified register (or M=memory addressed with HL) into register D
Lxi h, 2000h mov a,m mov b,a inx h mov a,m add b sta 2002h hlt
4000 lda 50003a,00,504003 mvi b 0206,024005 mov c,a4f4006 mov d,a574007loop2mvi a 003e,004009loop1add d82400a dcr c0d400b jnz loop1c2,09,40400e mov c,a4f400f dcr b054010 jnz loop2c2,07,404013 mov a,c794014 sta 500532,05,504017 hlt76 enjoy dear friends :) by abin james nellanikattu
Suppose you want to add 11 and 12.instruction are : mvi a,11h mvi b ,12h mov d,b add b
The MOV A,A instruction in the 8085 does nothing, not even change flags. It only consumes time, specifically four clock cycles plus applicable wait states.
.model small .stack .data m db 'the no is odd $' m1 db 'the no is even $' a db 04h b db 02h .code mov ax,@data mov ds,ax mov ah,0 mov al,a mov bl,b div bl cmp ah,00h je l1 mov dx,offset m jmp l l1: mov dx,offset m1 jmp l l: mov ah,09 int 21h mov ah,4ch int 21h end
1byte instruction = MOV A,B 2byte instruction = MVI A,01H 3byte instruction = STA 2030H
we are using just one ic in a microprocessor
In the 8085 microprocessor, the MOV instruction copies data between two registers, or between a register and memory. The MVI instruction differs only in that the source data is contained in the byte immediately following the opcode byte.