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 a multiplexer tree, What is a Multiplexer Tree? Ans Multip...

What is a Multiplexer Tree? Ans Multiplexer Tree: The largest available MUX IC is 16 to 1. Meeting the larger input requires there must be a provision to expand this. It

Create an input buffer, Q. Create an input buffer ? CODE SEGMENT ......

Q. Create an input buffer ? CODE SEGMENT ... MOV AH, 0AH                       ; Move 04 to AH register MOV DX, BUFF                   ; BUFF must be defined in data

How do we bind keys to menus for shortcuts in gimp, Make ensure that "Use d...

Make ensure that "Use dynamic keyboard shortcuts" option in "Interface" tab of Preferences dialog is enabled, then go to the menu selection you are interested in. Keeping it select

File structures, Write in brief about UNIX process structure.

Write in brief about UNIX process structure.

What are the difference between $display and $strobe, What are the Differen...

What are the Difference between $display and $strobe Difference between $display and $strobe is that $strobe displays parameters at the very end of current simulation time unit

IT PMP project managemnet., Identify at least eight milestones for this pro...

Identify at least eight milestones for this project. Write a one-page paper describing each milestone using the SMART criteria?

Maximum size of a database, What is the maximum size of a database that can...

What is the maximum size of a database that can be opened in Microsoft Access? Ans) 1 Gigabyte

Define pipeline speedup, Define pipeline speedup. S(m)=T(l)/T(m) Whe...

Define pipeline speedup. S(m)=T(l)/T(m) Where T(m) is the execution time for some target workload on an m-stage pipeline. T(l) is the execution time for some workload an

What is a abap/4 module pool, What is a ABAP/4 module pool? -Every dynp...

What is a ABAP/4 module pool? -Every dynpro refers to exactly one ABAP/4 dialog program. Like a dialog program is also known as a module pool ,since it having on interactive mo

What is the meaning of rigging, Rigging is use for if we need to give anima...

Rigging is use for if we need to give animation for any object or character then we apply to character or object internal bone setting(like our bones).that is known as rigging. Whe

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