ASSEMBLY LANGUAGE PROGRAMMING
ARCHITECTURE OF 8085
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Load contents of memory location 300 into register 1
|
|
Load contents of register 1 into memory location 300
|
|
Either A or B
|
|
None of the above
|
Detailed explanation-1: -Usage. The LDR pseudo-instruction is used for two main purposes: to generate literal constants when an immediate value cannot be moved into a register because it is out of range of the MOV and MVN instructions. to load a program-relative or external address into a register.
Detailed explanation-2: -r1 and r2 are the source registers containing the input operands, r0 is the destination register where the result is stored. The destination register can be the same as one of the source registers, i.e. ADD r0, r0, r1 is legal and means add the values in r0 and r1 together and place the result in r0.
Detailed explanation-3: -Each source statement may include up to four fields: a label, an operation (instruction mnemonic or assembler directive), an operand, and a comment. The following are examples of an assembly directive and a regular machine instruction.
Detailed explanation-4: -LDR instructions load a register with a value from memory. STR instructions store a register value into memory. The memory address to load from or store to is at an offset from the register Rn . The offset is specified by the register Rm and can be shifted left by up to 3 bits using LSL .