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

What is binary search, Binary Search: Search a sorted array by repeatedly i...

Binary Search: Search a sorted array by repeatedly in-between the search interval in half. Start with an interval covering the entire array. If the value of the search key is less

Global business-to-consumer e-commerce, "Global business-to-consumer e-comm...

"Global business-to-consumer e-commerce sales will pass the 1 trillion euro ($1.25 trillion) mark by 2013, and the total number of Internet users will increase to approximately 3.5

Colour - elements of composition, Colour The use of colour is consider...

Colour The use of colour is considered by many to be one of the most important areas in composition. Colours can be used in isolation or specific combinations to create partic

what is a persistent cookie in php, A persistent cookie is a cookie which ...

A persistent cookie is a cookie which is keeps in a cookie file permanently on the browser's computer. By default, cookies are formed as temporary cookies which keep only in the br

How can a function return a pointer to its calling routine, How can a funct...

How can a function return a pointer to its calling routine? The general form of a function is: type_specifier function_name(parameter list) { body of function; }

What is asp.net authentication providers and iis security, What is ASP.NET ...

What is ASP.NET Authentication Providers and IIS Security? ASP.NET implements authentication using authentication providers, which are code modules that verify credentials and

What are the characteristics of semiconductor ram memories, What are the ch...

What are the characteristics of semiconductor RAM memories? They are available in a wide range of speeds. Their cycle time range from 100ns to less than 10ns. The

Uniform memory access model (uma), Uniform Memory Access Model (UMA) In...

Uniform Memory Access Model (UMA) In this model, the main memory is uniformly shared by all processors in multiprocessor systems and each processor has equal access time to sha

Measuring and improving cache performance, Measuring and Improving Cache Pe...

Measuring and Improving Cache Performance: 1. Reduce the possibility that 2 different memory block will contend for the similar cache location 2. Additional cache levels

What is inode, What is 'inode'? All UNIX files have its description kep...

What is 'inode'? All UNIX files have its description kept in a structure called 'inode'. The inode have info about the file-size, its location, time of last access, time of las

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