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 explanation about the keyboards, Give brief explanation about th...

Give brief explanation about the keyboards Keyboards are generally not offered as the number of options is limited and owners of the system do not want customers keying in info

Illustrate why does a tea kettle sing, Q. Illustrate why does a tea kettle ...

Q. Illustrate why does a tea kettle sing? Answer:- There is a little attachment with a hole in it which acts as a whistle. It is inserted into the spout of the kettle as w

Passing parameters through stack, Q. Passing Parameters through Stack? ...

Q. Passing Parameters through Stack? The best scheme for parameter passing is through stack. It is also a standard scheme for passing parameters when assembly language is inter

Computer data storage, Computer data storage: Computer data storage, f...

Computer data storage: Computer data storage, frequently called memory or storage refers to computer recording media and components, devices that received digital data used fo

Seven segment decoder, A design for the seven segment decoder is required. ...

A design for the seven segment decoder is required. The decoder has four inputs which represent a number from 0 to 9 in binary and seven outputs which are connected to the seven

Explain active matrix or thin film transistor technology, Q. Explain Active...

Q. Explain Active Matrix or Thin Film Transistor technology? This is known as TFT (Thin Film Transistor) technology. In this there is a transistor at every pixel acting as a r

What is a diagonalization language ld, What is a Diagonalization language L...

What is a Diagonalization language LD?  The  diagonalization  language  having  of  all  strings  w  such  that  the  TM  whose  code is w does not accept when w is given as in

Depth-first search is different from breadth-first search, Depth-first sear...

Depth-first search is different from Breadth-first search in the following ways: A depth search traversal method goes to the deepest level of the tree first and then works up w

Hazards of pipeline - computer architecture, Hazards of pipeline - computer...

Hazards of pipeline - computer architecture: Hazards : When a programmer (or compiler) writes assembly program code, they make the supposition that each instruction is execut

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