Advertisement Remove all ads

Write Alp to Find 2'S Complement of a 16 Bit Number Stored in De Pair. Store Result in Hl Pair. - Computer Science 2

Advertisement Remove all ads
Advertisement Remove all ads
Advertisement Remove all ads

Write ALP to find 2's complement of a 16 bit number stored in DE Pair. Store result in HL Pair.

Advertisement Remove all ads

Solution

Mnemonics Comment
Opcode Operand
MOV A, E ; Copy E content to Accumulator
CMA ; Compliment Accumulator
MOV L, A ; Copy Accumulator to L Register
MOV A, D ; Copy D content to Accumulator
CMA ; Compliment Accumulator
MOV H, A ; Copy Acc. to HL Pair
INX H ; Increment HL pair by 1
RST 1.0 ; Restart
Concept: Instruction Set and Programming of 8085
  Is there an error in this question or solution?

APPEARS IN

Advertisement Remove all ads
Share
Notifications

View all notifications


      Forgot password?
View in app×