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

Real-time systems, This document is intended to help students get started w...

This document is intended to help students get started with the real-time systems (RTS) assignment. We will start on the assignment together in the laboratory. Students will then c

#decoders, #what is decoders? explain with diagram

#what is decoders? explain with diagram

Logic-based expert systems - artificial intelligence, Logic-based Expert Sy...

Logic-based Expert Systems - Artificial intelligence: Expert systems are agents which are programmed to make decisions about real world situations. They are put together by uti

Illustrate about packet switching, Q. Illustrate about Packet switching? ...

Q. Illustrate about Packet switching? Packet switching is used to avoid long delays in transmitting data over the network. Packet switching is a technique that limits the amoun

Kirchoff''s voltage law , Kirc hoff's Voltage Law   The sum ...

Kirc hoff's Voltage Law   The sum of all the voltage drops around a closed circuit loop will add to zero  V1+(-V2)+(-V3)+(-V4)= 0

What is socket inheritance, What is socket inheritance? Explain. Socke...

What is socket inheritance? Explain. Socket Inheritance: In a socket inheritance a reference count mechanism is utilized. Whenever a socket is first created, the system set

ATM is an example of which topology?, ATM is an example of? ATM is illu...

ATM is an example of? ATM is illustration of Star topology.

Determine the uses of memory blocks, Determine the Uses of memory blocks. ...

Determine the Uses of memory blocks. Not as common a technique though something to consider. As Verilog has a very convenient syntax for declaring and loading memories, you ca

Explain documentation libraries, The documentation rules are almost exactly...

The documentation rules are almost exactly the similar as for Scripts "Documenting scripts". Although from a technical point of view it is feasible to place measures in libraries i

Explain the test instruction, Explain the TEST instruction TEST instru...

Explain the TEST instruction TEST instruction performs the AND operation. The difference is that AND instruction changes the destination operand whereas TEST instruction doesn

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