Want this question answered?
MOV D,reg means: move content of the specified register (or M=memory addressed with HL) into register D
C600 LXI H C700 21 ; Initialize the HL register pair C601 00 ; C602 C7 ; C603 MOV A M 7E ; Move the content of memory to accumulator C604 MOV D A 57 ; Move accumulator content in to D register C605 RAR 1F ; Rotate accumulator right C606 XRA D AA ; Exclusive OR the content of D register C607 INX H 23 ; Increment the HL register pair C608 MOV M A 77 ; Move the accumulator content to memeory C609 HLT 76 ; Halt the execution
The MAR is a special register in the sense that each time it is accessed from the outside, memory senses it and considers the new content of the MAR an address.
A memory mapped register is a register that has its specific address stored in a known memory location.
C100 LXI H C200 21 ; Load the HL register pair immediately C101 00 ; C102 C2 ; C103 MOV B M 46 ; Move the memory content (Total number of data) in to B register C104 MVI C 00 0E ; Initialize the C register with 00 H C 105 00 ; C106 SUB A 97 ; Clear the ac cumulator C107 INX H 23 ; Increment the HL register pair (to get the next input data) C108 MOV A M 7E ; Move the memory content in to accumulator C109 DCR B 05 ; Decrement the B register c o n tent C10A INX H 23 ; Increment the HL register pair C10B ADD M 86 ; Add the memory content to accumulator C10C JNC C110 D2 ; Jump if carry = 0, to C110 H C10D 10 ; C10E C1 ; C10F INR C 0C ; Increment the C register content C110 DCR B 05 ; Decrement the B register content C111 JNZ C10A C2 ; Jump if no zero to C10A H C112 0A ; C113 C1 ; C114 STA C300 32 ; Store the accumulator content (sum) at C300 H C115 00 ; C116 C3 ; C117 MOV A C 79 ; Move the C register content to accumulator C118 STA C301 32 ; Store the accumulator content ( carry ) at C300 H C119 01 ; C11A C3 ; C11B HL T 76 ; Halt the exection
what is register
A memory mapped register is a register that has its specific address stored in a known memory location.
INR increment the content of register/memory by 1and result is stored in same place. INX increment the register pair by 1(no flags are affected)
the purpose of mvi is to 8 bit data immidiatly to the register or memory example mvi b,05h will move 05h to register b
difference between register and memory location
Register memory are smaller in size than cache memory and registers are faster than cache..Cache memory store the frequently used data from main memory..
CPU register is faster than memory loacations