Write the assembly language programming to find the 2's complement for a string of 100 bytes - 8086

Write the assembly language programming to find the 2's complement for a string of 100 bytes.



The following would be the code:
- 2000 CLD : Clears the direction flag
- 2001 MOV SI, 4000 H : In the SI the store address is placed
- 2004 MOV DI, 5000 H : In the DI the destination address is put
- 2007 MOV CX, 0064 H : In the CX the number of bytes to be 2`s complemented are placed
- 200A LODSB : The data byte is give to AL and INC SI
- 200B NEGAL : AL of 2`s complement.
- 200D STOSB : Current AL value into DI and INC DI
- 200E LOOPNZ 200A H : The loop is maintained till CX becomes = 0.
- 2010 HLT : Stop.
Post your comment

    Discussion

  • RE:Write a program to get a multi-digit number from the keyboard and store the number in memory in its binary form. Please don't make use of stack -yeshworktesfaw (02/27/22)
  • Write a program to get a multi-digit number from the keyboard and store the
    number in memory in its binary form. Please don't make use of stack
  • RE: Write the assembly language programming to find the 2's complement for a string of 100 bytes - 8086 -yeshworktesfaw (02/27/22)
  • Write the assembly language programming to find the 2's complement for a string of 100 bytes