Write an Assembly Language Program to Multiply a Number Stored At Location 1050 with a Nunber at Location 1051. Result is 2-byte. Store Result at Locations 1052 and 1053. - Computer Science 2

Advertisements
Advertisements

Write an Assembly Language Program to multiply a number stored at location 1050 with a nunber at location 1051. Result is 2-byte. Store result at locations 1052 and 1053.

Advertisements

Solution

Label Mnemonics Comments
  SUB A clear the accumulator
  MOV D, A clear the D register
  LXI H, 1050H load immediately 1050 to HL pair
  MOV B, M move memory to B reg.
  INX H increment HL pair
  MOV C, M move memory to C reg
BACK: ADD B add B with accumulator
  JNC NEXT jump if not carry to NEXT
  INR D increment D reg.
NEXT : DCR C Decrement C reg.
  JNZ BACK jump if not zero to BACK
  INX H increment HL pair
  MOV M, A move accumulator to memory
  INX H increment HL pair
  MOV M, D move D reg. to memory
  RST 1.0 Restart
Concept: Instruction Set and Programming of 8085
  Is there an error in this question or solution?
2015-2016 (March)

RELATED QUESTIONS

Explain the following instructions of 8085 MPU: MOV B, M


Write ALP to clear Register ,B, if number at memory location 20F9H is Palindrome; otherwise store FFH in Register B.

[Palindrome No. Ex. FF, 22, AA]


Write a Assembly Language Program to copy a block of data having starting address 4500 H to new location starting from 4600 H. The length of block is stored at memory location 44FF H.


Write an Assembly Language Program to add two 8-bits BCD numbers stored at memory location 4500 Hand 4501 H. Store the two byte BCD result from memory location· 4502 H onwards.


Write an Assembly Language Program to fill the memory locations 4500H to 4504 with the Hexadecimal numbers 09 H to ODH respectively.


Explain the conditional CALL instructions of Intel 8085.


Explain the functions of following pins of 8085 Micro Processor: 
 IO/M


The accumulator contains AA H and register C contains 55 H. What will be the contents of accumulator if following instructions are executed independently?
i) CMP C
ii) ANA C
iii) ORA C
iv) SUB C


Write an Assemhly Language Program to find largest number in a block of memory starting from 7000 H. The length of the block is stored at 6FFF H. Store the result at the end of the block.


A block of data is stored in memory locations starting from 3001 H. The length of the block is at 3000 H. Write an Assembly Language Program that searches for the first occurrence of data AO H in given block. Store the address of this occurrence in H-L pair. If the number is not fou nd then H-L pair should contain 0000 H.


Share
Notifications



      Forgot password?
Use app×