Explain about cseg segment, Computer Engineering

Assignment Help:

CSEG SEGMENT

 ASSUME CS:CSEG, DS:CSEG, SS:CSEG

 ORG 100h

START:MOV AX, CSEG; Initialise data segment

 MOV DS, AX; register using AX

 MOV AL, NUM1; Take the first number in AL

ADD AL, NUM2;                                          Add the 2nd number to it

 MOV RESULT, AL;                                                 Store the result in location RESULT 

 RCL AL, 01;                                                  rotate carry into LSB

 AND AL, 00000001B;                                  Mask out all but LSB

MOV CARRY, AL;                                       Store the carry result

MOV AX,4C00h 

INT 21h

NUM1 DB                  15h;                             First number stored here

NUM2 DB                  20h;                             Second number stored here

RESULT DB              ? ;                                Put sum here

CARRY DB               ? ;                                Put any carry here

CSEG ENDS

END START

These programs are stored on a disk with an extension .com. A COM program needs less space on disk instead of equivalent EXE program. At run-time COM program places stack automatically at the end of segment so they use at least one complete segment.


Related Discussions:- Explain about cseg segment

Give brief summary of common aspects found in spreadsheets, Give brief summ...

Give brief summary of common aspects found in spreadsheets -  It's made up of columns and rows; every row is identified by a number and every column is identified with a letter

Explain that datagram cannot be larger than mtu of a network, "A datagram c...

"A datagram cannot be larger than the MTU of a network over which it is sent." Is the statement true or false? Explain with the help of a suitable example. All hardware technol

Prepare a decision tree, A part of an aircraft engine can be given a test b...

A part of an aircraft engine can be given a test before installation.  The test has a 75% chance of revealing a defect if it is present, and the same chance of passing a sound part

Program that will blink as led, Take the last two digits of your UTCID. Thi...

Take the last two digits of your UTCID. This is your duty cycle in percent. If your duty cycle is less than 10%, add 30 to your number. Create an assembly program that runs on t

Conversion of data types done between abap/4 & db layer, How is conversion ...

How is conversion of data types done between ABAP/4 & DB layer? Conversion among ABAP/4 data types and the database layer is complete within the database interface

What are the minimal cost and minimal risksolution, In binary representatio...

In binary representation there are some states that are believed to be never occurred because of some particular functionality of a given circuit. If zero output is assigned to suc

How reassembling of ip fragments is advantageous, Reassembling of IP fragme...

Reassembling of IP fragments at the ultimate destination is advantageous. Give reasons. Needing the ultimate destination to reassemble the fragments has two major advantages. F

Advantages of using clusters, Q. Advantages of using clusters? Para...

Q. Advantages of using clusters? Parallel and distributed applications Decreased turnaround time Balanced loads Utilization of more powerful hosts Access to

How client and server use same protocol port at same time, Can both client ...

Can both client and server use the same protocol port on the same computer at the same time? Explain. Client and server can't use similar port number on similar computer at ide

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