Lab 2

Lab 2 - Segment Definition The CPU has several segment...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Segment Definition The CPU has several segment registers: CS (code segment). SS (stack segment). DS (data segment). ES (extra segment). FS, GS (supplemental segments available on 386s, 486s and Pentiums. Every instruction and directive must correspond to a segment. Normally a program consists of three segments: the stack, the data, and the code segments. Segment Definition Model definition. .MODEL SMALL Most widely used memory model. The code must fit in 64k. The data must fit in 64k. .MODEL MEDIUM The code can exceed 64k. The data must fit in 64k. .MODEL COMPACT The code must fit in 64k. The data can exceed 64k. MEDIUM and COMPACT are opposites. Segment Definition .MODEL LARGE Both code and data can exceed 64k. No single set of data can exceed 64k. .MODEL HUGE Both code and data can exceed 64k. A single set of data can exceed 64k. .MODEL TINY Used with COM files. Both code and data must fir in a single 64k segment. Segment Definition Segment definition formats: Simplified segment definition. Full segment definition. The Simplified segment definition uses the following directives to define the segments: .STACK .DATA .CODE These directives mark the beginning of the segments they represent. Segment Definition The full segment definition uses the following directives to define the segments: Label SEGMENT [options] ;Statements belonging to the segment....
View Full Document

This note was uploaded on 01/24/2012 for the course EE 3751 taught by Professor Desouza during the Spring '04 term at LSU.

Page1 / 21

Lab 2 - Segment Definition The CPU has several segment...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online