Appendix e
Default Segment Names
If you use simplified segment directives by themselves, you do not need to know the names assigned for each segment. However, it is possible to mix full segment definitions with simplified segment directives, in which case you need to know the segment names.
Table E.1 shows the default segment names created by each directive.
If you use .MODEL, a _TEXT segment is always defined, even if all .CODE directives specify a name. The default segment name used as part of far-code segment names is the filename of the module. The default name associated with the .CODE directive can be overridden, as can the default names for .FARDATA and .FARDATA?.
The segment and group table at the end of listings always shows the actual segment names. However, the GROUP and ASSUME statements generated by the .MODEL directive are not shown in listing files. For a program that uses all possible segments, group statements equivalent to the following would be generated:
DGROUP GROUP _DATA, CONST, _BSS, STACK
For the tiny model, these ASSUME statements would be generated:
ASSUME cs:DGROUP, ds:DGROUP, ss:DGROUP
For small and compact models with NEARSTACK, these ASSUME statements would be generated:
ASSUME cs: _TEXT, ds:DGROUP, ss:DGROUP
For medium, large, and huge models with NEARSTACK, these ASSUME statements would be generated:
ASSUME cs:name_TEXT, ds:DGROUP, ss:DGROUP
Table E.1 Default Segments and Types for Standard Memory Models
Model Directive Name Align Combine Class Group
Tiny .CODE _TEXT WORD PUBLIC 'CODE' DGROUP
.FARDATA FAR_DATA PARA PRIVATE 'FAR_DATA'
.FARDATA? FAR_BSS PARA PRIVATE 'FAR_BSS'
.DATA _DATA WORD PUBLIC 'DATA' DGROUP
.CONST CONST WORD PUBLIC 'CONST' DGROUP
.DATA? _BSS WORD PUBLIC 'BSS' DGROUP
Small .CODE _TEXT WORD PUBLIC 'CODE'
.FARDATA FAR_DATA PARA PRIVATE 'FAR_DATA'
.FARDATA? FAR_BSS PARA PRIVATE 'FAR_BSS'
.DATA _DATA WORD PUBLIC 'DATA' DGROUP
.CONST CONST WORD PUBLIC 'CONST' DGROUP
.DATA? _BSS WORD PUBLIC 'BSS' DGROUP
.STACK STACK PARA STACK 'STACK' DGROUP*
Medium .CODE name_TEXT WORD PUBLIC 'CODE'
.FARDATA FAR_DATA PARA PRIVATE 'FAR_DATA'
.FARDATA? FAR_BSS PARA PRIVATE 'FAR_BSS'
.DATA _DATA WORD PUBLIC 'DATA' DGROUP
.CONST CONST WORD PUBLIC 'CONST' DGROUP
.DATA? _BSS WORD PUBLIC 'BSS' DGROUP
.STACK STACK PARA STACK 'STACK' DGROUP*
Compact .CODE _TEXT WORD PUBLIC 'CODE'
.FARDATA FAR_DATA PARA PRIVATE 'FAR_DATA'
.FARDATA? FAR_BSS PARA PRIVATE 'FAR_BSS'
.DATA _DATA WORD PUBLIC 'DATA' DGROUP
.CONST CONST WORD PUBLIC 'CONST' DGROUP
.DATA? _BSS WORD PUBLIC 'BSS' DGROUP
.STACK STACK PARA STACK 'STACK' DGROUP*
Table E.1 (continued)
Model Directive Name Align Combine Class Group
Large or huge .CODE name_TEXT WORD PUBLIC 'CODE'
.FARDATA FAR_DATA PARA PRIVATE 'FAR_DATA'
.FARDATA? FAR_BSS PARA PRIVATE 'FAR_BSS'
.DATA _DATA WORD PUBLIC 'DATA' DGROUP
.CONST CONST WORD PUBLIC 'CONST' DGROUP
.DATA? _BSS WORD PUBLIC 'BSS' DGROUP
.STACK STACK PARA STACK 'STACK' DGROUP*
Flat .CODE _TEXT DWORD PUBLIC 'CODE'
.FARDATA _DATA DWORD PUBLIC 'DATA'
.FARDATA? _BSS DWORD PUBLIC 'BSS'
.DATA _DATA DWORD PUBLIC 'DATA'
.CONST CONST DWORD PUBLIC 'CONST'
.DATA? _BSS DWORD PUBLIC 'BSS'
.STACK STACK DWORD PUBLIC 'STACK'
* unless the stack type is FARSTACK
See:
file: /Techref/language/masm/masmAPE.htm, 15KB, , updated: 2005/10/13 11:51, local time: 2024/11/25 02:04,
18.117.141.69:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/techref/language/masm/masmAPE.htm"> APPENDIX E</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.