Intel XENIX 286 Programmers Guide (86) - Tenox.tc
Intel XENIX 286 Programmers Guide (86) - Tenox.tc Intel XENIX 286 Programmers Guide (86) - Tenox.tc
XENIX Programming Floating-Point Directives . float float .double float as: A sse m bier The .float and .double directives accept one or more floating-point numbers as operands and allocate storage for each number. A floating-point number has the form [-] integer. fraction [ E [ - ] exponent ] where integer is a decimal number, fraction is a combination of decimal digits, and exponent is an decimal nu mber. Examples of these directives are .float .double .float 25.1 1.03E12 -34718.235E4 The .float and .double directives allocate a different number of bytes. The .float sets aside four bytes, while .double sets aside eight. Global Directive .globl name The .globl directive makes the text or data associated with name globally known to all files in a program. name must be explicitly defined by assignment or by appearance as a label in exactly one file. All other files that wish to access this name must use .globl to give the name global meaning; no other definition is allowed in these files. The link editor ld resolves all global references to name when the final program is created. If more than one name is given, they must be separated with com mas (,). Segment Directives .text .data .bss The .text, .data, and .bss directives cause the assembler to copy subsequent · instruction or data code (or allocated storage) to the text, data, or bss segment respectively. The offset of the location counter is set to the previous value for that segment and subsequent statements are processed as defined in the earlier section "Assembly Segments." The directives may be used any nu mber of times within a program. The offset for each segment is initially set to 0. Changing a segment causes the current offset to be saved. Restoring a segment causes the old offset to be restored. Thus, each segment is copied as a contiguous block even if the original source statements were not contiguous. 7-9
as: Assembler XENIX Programming Instructions and data definitions with initial values must not be used after a .bss directive, but symbols may be defined and dot moved by assignment. If no explicit segment directive is given in a program, code is copied to the text segment. Common Directive .comm name [, expression The .comm directive makes name globally known to all files of the program. If name also appears in an assignment or as a label in a file, then the .comm directive has the same effect as the .globl directive. In this case, any expression given is ignored. If name does not have an explicit definition, then .comm directs the XENIX linker to automatically allocate expression bytes for name in the bss segment of the program. These bytes appear before any bytes specifically allocated within the bss segment. Insert Directive .insrt "filename" The .insrt directive directs the assembler to suspend processing of the current file until all statements in the given file have been read. filename must be enclosed within double quotation marks. If the file cannot be opened or does not exist, the assembler displays the message Cannot open insert file Otherwise, it reads the contents of the file. The file may contain other .insrt directives; up to ten levels of directives may be nested in this way. The .insrt directive is useful for including a standard set of comments or symbol assignments at the beginning of a program, e.g., the definitions for system calls found in the file /usr/include/sys.s. The directive is also useful for breaking up a large source program into easily manageable pieces. ASCII Directives .ascii /string/ .asciz /string/ The .ascii and .asciz directives translate string into an equivalent sequence of ASCII byte values and copy these bytes to allocated storage in the current segment. The .asciz directive also appends a null byte to the end of the sequence. 7-10
- Page 87 and 88: SCCS: Source Code Control System XE
- Page 89 and 90: SCCS: Source Code Control System XE
- Page 91 and 92: SCCS: Source Code Control System XE
- Page 93 and 94: SCCS: Source Code Control System XE
- Page 95 and 96: SCCS: Source Code Control System XE
- Page 98 and 99: CHAPTER 6 adb: PROGRAM DEBUGGER adb
- Page 100 and 101: XENIX Programming adb: Program Debu
- Page 102 and 103: XENIX Programming adb: Program Debu
- Page 104 and 105: XENIX Programming adb: Program Debu
- Page 106 and 107: XENIX Programming adb: Program Debu
- Page 108 and 109: XENIX Programming adb: Program Debu
- Page 110 and 111: XENIX Programming adb: Program Debu
- Page 112 and 113: XENIX Programming adb: Program Debu
- Page 114 and 115: XENIX Programming adb: Program Debu
- Page 116 and 117: XENIX Programming int fcnt,gcnt,hcn
- Page 118 and 119: XENIX Programming adb: Program Debu
- Page 120 and 121: XENIX Programming adb: Program Debu
- Page 122 and 123: XENIX Programming adb: Program Debu
- Page 124 and 125: XENIX Programming adb: Program Debu
- Page 126 and 127: XENIX Programming adb: Program Debu
- Page 128: XENIX Programming adb: Program Debu
- Page 131 and 132: as: A sse m bier XENIX Programming
- Page 133 and 134: as: Assembler XENIX Programming The
- Page 135 and 136: as: Assembler XENIX Programming Key
- Page 137: as: Assembler The combination rules
- Page 141 and 142: as: Assembler Initial Value Directi
- Page 143 and 144: as: Assembler XENIX Programming int
- Page 145 and 146: as: A sse m bier sub subb test test
- Page 147 and 148: as: Assembler XENIX Programming lnt
- Page 149 and 150: as: Assembler XENIX Programming lnt
- Page 151 and 152: as: Assembler XENIX Programming Imm
- Page 153 and 154: as: A sse m bier XENIX Programming
- Page 156 and 157: CHAPTER 8 csh : C SHEll The C shell
- Page 158 and 159: XENIX Programming csh: C Shell Some
- Page 160 and 161: XENIX Programm ing *w 32 * q % !c -
- Page 162 and 163: XENIX Programming csh: C Shell the
- Page 164 and 165: XENIX Programming csh: C Shell Usin
- Page 166 and 167: XENIX Programming csh: C Shell Usin
- Page 168 and 169: XENIX Programming csh: C Shell The
- Page 170 and 171: XENIX Programming csh: C Shell Note
- Page 172 and 173: XENIX Programming switch ( string c
- Page 174 and 175: XENIX Programming csh: C Shell Star
- Page 176 and 177: XENIX Programming csh: C Shell Spec
- Page 178 and 179: CHAPTER 9 lex : LEXICAL ANA LYZER G
- Page 180 and 181: XENIX Programming lex: Lexical Anal
- Page 182 and 183: XENIX Programming lex: Lexical Anal
- Page 184 and 185: XENIX Programming lex: Lexical Anal
- Page 186 and 187: XENIX Programming lex: Lexical Anal
<strong>XENIX</strong> Programming<br />
Floating-Point Directives<br />
. float float<br />
.double float<br />
as: A sse m bier<br />
The .float and .double directives accept one or more floating-point numbers as operands<br />
and allocate storage for each number. A floating-point number has the form<br />
[-] integer. fraction [ E [ - ] exponent ]<br />
where integer is a decimal number, fraction is a combination of decimal digits, and<br />
exponent is an decimal nu mber. Examples of these directives are<br />
.float<br />
.double<br />
.float<br />
25.1<br />
1.03E12<br />
-34718.235E4<br />
The .float and .double directives allocate a different number of bytes. The .float sets<br />
aside four bytes, while .double sets aside eight.<br />
Global Directive<br />
.globl name<br />
The .globl directive makes the text or data associated with name globally known to all<br />
files in a program. name must be explicitly defined by assignment or by appearance as a<br />
label in exactly one file. All other files that wish to access this name must use .globl to<br />
give the name global meaning; no other definition is allowed in these files. The link<br />
editor ld resolves all global references to name when the final program is created. If<br />
more than one name is given, they must be separated with com mas (,).<br />
Segment Directives<br />
.text<br />
.data<br />
.bss<br />
The .text, .data, and .bss directives cause the assembler to copy subsequent · instruction<br />
or data code (or allocated storage) to the text, data, or bss segment respectively. The<br />
offset of the location counter is set to the previous value for that segment and<br />
subsequent statements are processed as defined in the earlier section "Assembly<br />
Segments."<br />
The directives may be used any nu mber of times within a program. The offset for each<br />
segment is initially set to 0. Changing a segment causes the current offset to be saved.<br />
Restoring a segment causes the old offset to be restored. Thus, each segment is copied<br />
as a contiguous block even if the original source statements were not contiguous.<br />
7-9