मराठी
महाराष्ट्र राज्य शिक्षण मंडळएचएससी विज्ञान (संगणक विज्ञान) इयत्ता १२ वी

Write an Assembly Language Program to Take the 2'S Complement of an 8-bit Number Stored at 3301h. Store the Result at the Memory Location 3302h - Computer Science 2

Advertisements
Advertisements

प्रश्न

Write an Assembly Language Program to take the 2's complement of an 8-bit number stored at 3301H. Store the result at the memory location 3302H

उत्तर

Label Mnemonics Comment
 

LXI H, 3301H

MOV A, M

CMA

INR A

INX H

MOV M, A

RST 1.0

; Load HL with 3301 H

; Get no. in Acc

; Complement given number

; Increment A reg. By 1 to get 2’s complement

; Increment HL pair

; Place result in 3302 H

; Restart

 

shaalaa.com
Instruction Set and Programming of 8085
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2017-2018 (March)

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×