About me
Home
Resumé
CV
Pictures

Course Work
CSE300-FA98

Teaching
Portfolio
CSE240-SP99
CSE207-FA03

Misc
eHarmony
Documents

Tools

ASSUME Directive Explained

The following information was emailed me to as an explaination of the ASSUME directive. Special thanks to Wayne King for this informative piece of work. Since we will not be using the MODEL directive, you will need to have ASSUME cs:_CODE, ds:_DATA to start each of your programs and modules. Please see the hi_world.asm as an example.

What exactly is ASSUME, and what is it for?

ASSUME           Associate Segment with Segment Register Directive

    ASSUME  segmentRegister:segmentName,,,
or
    ASSUME  NOTHING

    Specifies the segment register (segmentRegister) that will be used to
    calculate the effective addresses for all labels and variables defined
    under a given segment or group name (segmentName).

       Notes:     The segmentRegister argument must be CS, DS, ES, or SS.

                  The segmentName argument must be a segment name
                  previously defined with the SEGMENT directive, a group
                  name defined with the GROUP directive, or the keyword
                  NOTHING.  If the keyword NOTHING is used, the previous
                  segment selection is canceled.

                  ASSUME NOTHING cancels the segment selections for all
                  four segment registers.

                  Usage of the segment-override operator (:) will override
                  the segment register specified in the ASSUME directive.

    You can use the ASSUME directive whenever you modify a segment register,
    or at the start of a procedure to specify the assumptions at that point.
    If you use a MODEL statement, Turbo Assembler automatically sets up the
    initial ASSUMEs for you. (original author Wayne King)
Last Modified: January 26, 1999 - Barry E. Mapen