Explain about data segment, Computer Engineering

Assignment Help:

DATA SEGMENT

 NUM1            DB      15h;     First number 

 NUM2            DB      20h;     Second number 

RESULT DB?  ; Put sum here

 CARRY DB? ; Put any carry here

DATA ENDS

CODE SEGMENT

                        ASSUME CS:CODE, DS:DATA

START:MOV AX, DATA; Initialise data segment

 MOV DS, AX; register using AX

MOV AL, NUM1; Bring the first number in AL

                        ADD AL, NUM2; Add the 2nd

                        Number to AL

                        MOV RESULT, AL; Store the result

                        RCL AL, 01; rotate carry into Least Significant Bit (LSB)

                        AND AL, 00000001B; Mask out all but LSB

                        MOV CARRY, AL; Store the carry 

                        MOV AX, 4C00h; Terminate to DOS 

 INT 21h

CODE ENDS

END START


Related Discussions:- Explain about data segment

Parallel virtual machine, Parallel Virtual Machine (PVM): PVM (Parallel...

Parallel Virtual Machine (PVM): PVM (Parallel Virtual Machine) is portable message passing programming system which is designed to link different heterogeneous host machines to

What are single stage and multistage networks, What are single stage and mu...

What are single stage and multistage networks? Compare the strengths and weaknesses of each. OR List the major difference in single stage, two stages and three stage Netw

What is the most common biometrics, What is the most common biometrics? ...

What is the most common biometrics? The most common biometrics is the given below: Face geometry (Photo): In this the computer takes the picture of your face and matches t

Illustrate the advantages of register transfer, Register Transfer We as...

Register Transfer We assign computer registers by capital letters to denote function of the register. Such as, the register which holds an address for memory unit is usually

What is the difference between proc. sent by val and by ref, What is the di...

What is the difference between proc. sent BY VAL and By Ref? BY VAL: Alters will not be reflected back to the variable. By REF: Alters will be reflected back to that variab

What is encapsulation technique, Hiding data within the class and making it...

Hiding data within the class and making it available only by the methods. This method is used to protect your class against accidental changes to fields, which might leave the clas

Terms in propositional model, Terms in Propositional model: There in f...

Terms in Propositional model: There in first-order logic allows us to talking about properties of objects that the first job for our model (Δ, Θ) is to assign a meaning to the

Explain about the links and association, Links and Association Links a...

Links and Association Links and associations are the basic means used for establishing relationships among objects and classes of the system. In the next subsection we will di

Why is c standard library needed, Why is C standard library needed?  C ...

Why is C standard library needed?  C Standard Library: C would have been a tough programming language in absence of the standard library. The standard library in C contains

Initial considerations in problem solving, Initial considerations in proble...

Initial considerations in problem solving: Three initial considerations in problem solving for easiest(as described in Russell and Norvig):  Initial State  First

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd