Explain about data segment, Computer Engineering

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

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
i) The width of the sorting + merging circuit is equivalent to maximum number of devices needed in a phase is O(n/2). As in the above diagram maximum number of devices for a given

What are the benefits of using e-commerce? Basic Benefits of E-Commerce The main benefits are enhancing sales and reducing costs. The other advantages are as follows: 1.

Propositional model: Hence a propositional model was simply an assignments of truth values to propositions. In distinguish, a first-order model is a pair (Δ, Θ) where

Use the input capture to control the digital clock.  In this part, there will be two switches to control the clock, one is for starting the clock and one is for stopping the clock.

Indirect addressing mode - assembly language: The Indirect addressing mode and the address field of the instruction refers to the address of a word in memory, which in turn co

Find a 3NF decomposition of the following relation scheme: University (Faculty, Dean, Department, Chair, Professor, Rank, Student}. The University relation satisfies the following

More complicated logic circuits can be made byconnecting a number of simple logic gates.How do we decide how to connect the gates togive a particular function e.g. output Y?We need

Hashing collision resolution techniques are a) Chaining, b) Bucket addressing

(a) What is Grid computing? (b) What are the key distinctions between conventional distributed computing and Grid computing? (b) Describe how five features of Grid Computi

Define Multiprogramming. Multiprogramming: A multiprogramming operating system is system which allows extra than one active user program or part of user program to be store