English

Write an assembly language program to find one’s (1’s) compliment of a number stored at memory location D000H without using CMA instruction and store result at memory location D001H.

Advertisements

Question

Write an assembly language program to find one’s (1’s) compliment of a number stored at memory location D000H without using CMA instruction and store result at memory location D001H.

Code Writing
Advertisements

Solution

Label      Instructions                Comments

       MVI A, FFH    ; Set A to FFH            
       LXI H, D000H  ; Load HL to D000H       
       SUB M         ; Subtract memory with A 
       STA D001H     ; Store A to D001H         
       HLT           ; Stop                  
shaalaa.com
  Is there an error in this question or solution?
2024-2025 (July) Official Board Paper
Advertisements
Share
Notifications



      Forgot password?
Use app×