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

Write an Assembly Language Program to Multiply an 8-bit Number Stored at 4301h by Another 8- Bit Number Stored at 4302h. Store the Result at the Location 4303h and 4304h Beginning with Lob. (Lower Order Byte)

Advertisements
Advertisements

प्रश्न

Write an Assembly Language Program to multiply an 8-bit number stored at 4301H by another 8- bit number stored at 4302H. Store the result at the location 4303H and 4304H beginning with a LOB. (Lower Order Byte)

Advertisements

उत्तर

Label Mnemonics Comment

 

Loop:

LXI H, 0000H

LDA 4301H

MOV E, A

LDA 4302H

MVI D, 00H

DAD D

DCR A

JNZ Loop

SHLD 4303H

RST 1.0

; Set initial product = 0

; Set [Acc] = N1

; Set [E] = N1

; Set [Acc] = N2

; Set [D] = 00H

; product = product + N1

; N2 = N2 – 1

; Repeat, if N2 ≠ 0

; Store product in 4303H and 4304H

; Restart

 

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

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×