8085 Programming: 2's COMPLEMENT OF A 16-BIT NUMBER



8085 Programming




The 16bit number is stored in C050,C051. The answer is stored in C052,C053



  LXI H,C050

  MVI B,00

  MOV A,M

  CMA

  ADI 01

  STA C052

  JNC GO

  INR B



GO:   INX H

  MOV A,M

  CMA

  STA C053

  HLT

EXAMPLE-> C050=8C,C051=5B

Answer-> C052=74,C053=A4





0 Comments