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

Define a protocol when an error recovery develop for a link, Suppose you ha...

Suppose you have to develop an error recovery protocol for a link that is unreliable and delay sensitive, which of the following protocol would you choose? (i) Stop & wait.

What is meant by the guest function, When  transferring  one  functio...

When  transferring  one  function  to  another,  what  is  meant  by  the  guest  function? A pointer to a function can be passed to another function as an argument. This allows

Difference between shadow and override in programming, Overriding tell us o...

Overriding tell us only the methods, but shadowing tells us the entire element.

Describe set-associative mapping, Q. Describe Set-Associative Mapping? ...

Q. Describe Set-Associative Mapping? A third type of cache organization known as set-associative mapping is an improvement on direct mapping organization in that every word of

Write shorts notes on digital signature, Write shorts notes on Digital Si...

Write shorts notes on Digital Signature. This method is used to authenticate the sender of a message. For sign a message, the sender encrypts the message by using a key ident

Difference between vertical and horizontal organization, Difference between...

Difference between Vertical and Horizontal Organization Vertical Organizations  It is a usual approach which is typified by a functional approach to work in which departme

Draw state diagram, Draw the state diagram of a process from its creation t...

Draw the state diagram of a process from its creation to termination, including all transitions, and briefly elaborate every state and every transition. When a process executes

Display the map centered on the users location, Question: a) The follo...

Question: a) The following is a description of the navigation options in a mobile web site which provides public bus time slots for a city. It is an interesting service for m

Fixed arithmetic pipelines, Fixed Arithmetic pipelines  We obtain the e...

Fixed Arithmetic pipelines  We obtain the example of multiplication of fixed numbers. The Two fixed-point numbers are added by the ALU using shift and add operations. This sequ

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