Explain about data segment, Computer Engineering


 NUM1            DB      15h;     First number 

 NUM2            DB      20h;     Second number 

RESULT DB?  ; Put sum here

 CARRY DB? ; Put any carry here



                        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



Posted Date: 7/31/2013 6:08:51 AM | Location : United States

Related Discussions:- Explain about data segment, Assignment Help, Ask Question on Explain about data segment, Get Answer, Expert's Help, Explain about data segment Discussions

Write discussion on Explain about data segment
Your posts are moderated
Related Questions
Q. Describe the Graphic Accelerators? A Graphic Accelerator is actually a chip as a matter of fact most significant chip in your video card. The Graphic Accelerator is essentia

Differences between Datagrid, Datalist and Repeater?   1. Datagrid has paging while Datalist doesnt. 2. Datalist has a property known as repeat. Direction = vertical/horizon

System Software System software is a group of programs written to service another programs. Some system software (e.g., compilers editors and file management utilities) proc

Q. Basic working of Semiconductors? Semiconductors are crystalline solid materials whose resistivities have values between those of conductors and insulators. Conductivity rang

How adaptive transmission helps TCP to maximize throughput on each connection? To know how adaptive retransmission helps TCP maximize throughput upon all connection, see a case

Depth-first search is different from Breadth-first search in the following ways: A depth search traversal method goes to the deepest level of the tree first and then works up w

What are the methods for handling deadlocks?  The deadlock problem can be dealt with in one of the three ways:  a. Use a protocol to prevent or avoid deadlocks, make sure th

Speedup First, we take the speedup factor which is we see how much speed up performance we achieve by pipelining. First we take ideal case for measuring the speedup. Let n b

Q. Define Logical data as operand data type? Every word or byte is treated like a single unit of data. Whenever an n-bit data unit is considered as comprising n 1-bit items of