home *** CD-ROM | disk | FTP | other *** search
/ HomeWare 14 / HOMEWARE14.bin / prog / a86v371.arj / A09.DOC < prev    next >
Text File  |  1994-01-24  |  26KB  |  605 lines

  1. CHAPTER 9   DIRECTIVES IN A86
  2.  
  3.  
  4. Segments in A86
  5.  
  6. The following discussion applies when A86 is assembling a .COM
  7. See the next chapter for the discussion of segmentation for .OBJ
  8. files.
  9.  
  10. A86 views the 86 computer's memory space as having two parts: The
  11. first part is the program, whose contents are the object bytes
  12. generated by A86 during its assembly of the source.   A86 calls
  13. this area the CODE SEGMENT.  The second part is the data area,
  14. whose contents are generated by the program after it starts
  15. running.  A86 calls this area the DATA SEGMENT.
  16.  
  17. Please note well that the only difference between the CODE and
  18. DATA segments is whether the contents are generated by the
  19. program or the assembler.  The names CODE and DATA suggest that
  20. program code is placed in the CODE segment, and data structures
  21. go in the DATA segment.  This is mostly true, but there are
  22. exceptions.  For example, there are many data structures whose
  23. contents are determined by the assembler: pointer tables, arrays
  24. of pre-defined constants, etc.  These tables are assembled in the
  25. CODE segment.
  26.  
  27. In general, you will want to begin your program with the
  28. directive DATA SEGMENT, followed by all your program variables
  29. and uninitialized data structures, using the directives DB, DW,
  30. and STRUC.  If you do not give an ORG directive, A86 will begin
  31. the allocation immediately following the end of the .COM program.
  32. You can end the DATA SEGMENT allocation lines with the DATA ENDS
  33. directive, followed by the program code itself.  A short program
  34. illustrating this suggested usage follows:
  35.  
  36. DATA SEGMENT
  37.   ANSWER_BYTE  DB ?
  38.   CALL_COUNT   DW ?
  39.  
  40. CODE SEGMENT
  41.   JMP MAIN
  42.  
  43. TRAN_TABLE:
  44.   DB 16,3,56,23,0,9,12,7
  45.  
  46. MAIN:
  47.   MOV BX,TRAN_TABLE
  48.   XLATB
  49.   MOV ANSWER_BYTE,AL
  50.   INC CALL_COUNT
  51.   RET
  52.  
  53. A86 allows you to intersperse CODE SEGMENTs and DATA SEGMENTs
  54. throughout your program; but in general it is best to put all
  55. your DATA SEGMENT declarations at the top of your program, to
  56. avoid problems with forward referencing.
  57.                                                               9-2
  58.  
  59. CODE ENDS and DATA ENDS Statements
  60.  
  61. For compatibility with Intel/IBM assemblers, A86 provides the
  62. CODE ENDS and DATA ENDS statements.  The CODE ENDS statement is
  63. ignored; we assume that you have not nested a CODE segment inside
  64. a DATA segment.  The DATA ENDS statement is equivalent to a CODE
  65. SEGMENT statement.
  66.  
  67.  
  68.  
  69. The ORG Directive
  70.  
  71. Syntax:  ORG address
  72.  
  73. ORG moves the output pointer (the location counter at which
  74. assembly is currently taking place within the current segment) to
  75. the value of the operand.  In the CODE segment, the operand
  76. should be an absolute constant, or an expression evaluating to an
  77. absolute, non-forward-referenced constant.  In the DATA segment,
  78. the operand may be a forward reference or an expression
  79. containing one or more forward references.  All symbols in the
  80. segment will be resolved when the forward references to the ORG
  81. operand are all resolved.
  82.  
  83. There is a special side effect to ORG when it is used in the CODE
  84. segment.  If you begin your code segment with ORG 0, then A86
  85. knows that you are not assembling a .COM program; but are instead
  86. assembling a code segment to be used in some other context
  87. (examples: programming a ROM, or assembling a procedure for older
  88. versions of Turbo Pascal).  The output file will start at 0, not
  89. 0100 as in a .COM file; and the default extension for the output
  90. file will be .BIN, not .COM.  However, if you later issue an ORG
  91. 0100 directive, the default will revert back to .COM.
  92.  
  93. Other than in the above example, you should not in general issue
  94. an ORG within the CODE segment that would lower the value of the
  95. output pointer.  This is because you thereby put yourself in
  96. danger of losing part of your assembled program.  If you
  97. re-assemble over space you have already assembled, you will
  98. clobber the previously-assembled code.  Also, be aware that the
  99. size of the output program file is determined by the value of the
  100. code segment output pointer when the program stops.  If you ORG
  101. to a lower value at the end of your program, the output program
  102. file will be truncated to the lower-value address.
  103.  
  104. Again, almost no program producing a .COM file will need any ORG
  105. directive in the code segment.  There is an implied ORG 0100 at
  106. the start of the program.  You just start coding instructions,
  107. and the assembler will put them in the right place.
  108.                                                               9-3
  109.  
  110. The EVEN Directive
  111.  
  112. Syntax:  EVEN  constant
  113.  
  114. The EVEN directive coerces the current output pointer to a value
  115. which is an exact multiple of the operand.  If no operand is
  116. given, a value of 2 is assumed.  In a DATA SEGMENT or STRUC, it
  117. does so by adding to the current output pointer if necessary.  In
  118. a code segment, it outputs an appropriate number of NOP
  119. instruction bytes.  EVEN is most often used in data segments,
  120. before a sequence of DW directives.  Machines beyond the original
  121. 8088 fetch words more quickly when they are aligned onto even
  122. addresses; so the EVEN directive insures that your program will
  123. have the faster access to those DW's that follow it.  Also useful
  124. are EVEN 4 for doubleword alignment, and EVEN 16 for paragraph
  125. alignment.
  126.  
  127.  
  128. Data Allocation Using DB, DW, DD, DQ, and DT
  129.  
  130. The 86 computer family supports the three fundamental data types
  131. BYTE, WORD, and DWORD.  A byte is eight bits, a word is 16 bits
  132. (2 bytes), and a doubleword is 32 bits (4 bytes).  In addition,
  133. the 87 floating point processor manipulates 8-byte quantities,
  134. which we call Q-words, and 10-byte quantities, which we call
  135. T-bytes.  The A86 data allocation statement is used to specify
  136. the bytes, words, doublewords, Q-words, and T-bytes which your
  137. program will use as data.  The syntax for the data allocation
  138. statement is as follows:
  139.  
  140. (optional var-name)  DB  (list of values)
  141. (optional var-name)  DW  (list of values)
  142. (optional var-name)  DD  (list of values)
  143. (optional var-name)  DQ  (list of values)
  144. (optional var-name)  DT  (list of values)
  145.  
  146. The variable name, if present, causes that name to be entered
  147. into the symbol table as a memory variable with type BYTE (for
  148. DB), WORD (for DW), DWORD (for DD), QWORD (for DQ), or TBYTE (for
  149. DT). The variable name should NOT have a colon after it, unless
  150. you wish the name to be a label (instructions referring to it
  151. will interpret the label as the constant pointer to the memory
  152. location, not its contents).
  153.  
  154. The DB statement is used to reserve bytes of storage; DW is used
  155. to reserve words.  The list of values to the right of the DB or
  156. DW serves two purposes.  It specifies how many bytes or words are
  157. allocated by the statement, as well as what their initial values
  158. should be.  The list of values may contain a single value or more
  159. than one, separated by commas.  The list can even be missing;
  160. meaning that we wish to define a byte or word variable at the
  161. same location as the next variable.
  162.                                                               9-4
  163.  
  164. If the data initialization is in the DATA segment, the values
  165. given are ignored, except as place markers to reserve the
  166. appropriate number of units of storage.  The use of "?", which in
  167. .COM mode is a synonym for zero, is recommended in this context
  168. to emphasize the lack of actual memory initialization. When A86
  169. is assembling .OBJ files, the ?-initialization will cause a break
  170. in the segment (unless ? is embedded in a nested DUP containing
  171. non-? terms, in which case it is a synonym for zero).
  172.  
  173. A special value which can be used in data initializations is the
  174. DUP construct, which allows the allocation and/or initialization
  175. of blocks of data.  The expression  n DUP x  is equivalent to a
  176. list with x repeated n times.  "x" can be either a single value,
  177. a list of values, or another DUP construct nested inside the
  178. first one.  The nested DUP construct needs to be surrounded by
  179. parentheses.  All other assemblers, and earlier versions of A86,
  180. require parentheses around all right operands to DUP, even simple
  181. ones; but this requirement has been removed for simple operands
  182. in the current A86.
  183.  
  184. Here are some examples of data initialization statements, with
  185. and without DUP constructs:
  186.  
  187. CODE SEGMENT
  188.   DW 5                  ; allocate one word, init. to 5
  189.   DB 0,3,0              ; allocate three bytes, init. to 0,3,0
  190.   DB 5 DUP 0            ; equivalent to DB 0,0,0,0,0
  191.   DW 2 DUP (0,4 DUP 7)  ; equivalent to DW 0,7,7,7,7,0,7,7,7,7
  192.  
  193.  
  194. DATA SEGMENT
  195. XX      DW ?            ; define a word variable XX
  196. YYLOW   DB              ; no init value: YYLOW is low byte of word var YY
  197. YY      DW ?
  198. X_ARRAY DB  100 DUP ?   ; X_ARRAY is a 100-byte array
  199. D_REAL  DQ ?            ; double precision floating variable
  200. EX_REAL DT ?            ; extended precision floating variable
  201.  
  202. A character string value may be used to initialize consecutive
  203. bytes in a DB statement.  Each character will be represented by
  204. its ASCII code.  The characters are stored in the order that they
  205. appear in the string, with the first character assigned to the
  206. lowest-addressed byte.  In the DB statement that follows, five
  207. bytes are initialized with the ASCII representation of the
  208. characters in the string 'HELLO':
  209.  
  210. DB 'HELLO'
  211.                                                               9-5
  212.  
  213. Note that except for string comparisons described in the previous
  214. chapter, the DB directive is the only place in your program that
  215. strings of length greater than 2 may occur.  In all other
  216. contexts (including DW), a string is treated as the constant
  217. number representing the ASCII value of the string; for example,
  218. CMP AL,'@' is the instruction comparing the AL register with the
  219. ASCII value of the at-sign.  Note further that 2-character string
  220. constants, like all constants in the 8086, have their bytes
  221. reversed.  Thus, while DB 'AB' will produce hex 41 followed by
  222. hex 42, the similar looking DW 'AB' reverses the bytes: hex 42
  223. followed by hex 41.
  224.  
  225. For compatibility, A86 now accepts double quotes, as well as
  226. single quotes, for strings in DB directives.
  227.  
  228.  
  229. The DD directive is used to initialize 32-bit doubleword pointers
  230. to locations in arbitrary segments of the 86's memory space.
  231. Values for such pointers are given by two numbers separated by a
  232. colon.  The segment register value appears to the left of the
  233. colon; and the offset appears to the right of the colon.  In
  234. keeping with the reversed-bytes nature of memory storage in the
  235. 86 family, the offset comes first in memory.  For example, the
  236. statement
  237.  
  238.    DD   01234:05678
  239.  
  240. appearing in a CODE segment will cause the hex bytes 78 56 34 12
  241. to be generated, which is a long pointer to segment 01234, offset
  242. 05678.
  243.  
  244. DD, DQ, and DT can also be used to initialize large integers and
  245. floating point numbers.  Examples:
  246.  
  247.   DD 500000   ; half million, too big for most 86 instructions
  248.   DD 3.5      ; single precision floating point number
  249.   DQ 3.5      ; the same number in a double precision format
  250.   DT 3.5      ; the same number in an extended precision format
  251.  
  252.  
  253. The STRUC Directive
  254.  
  255. The STRUC directive is used to define a template of data to be
  256. addressed by one of the 8086's base and/or index registers.  The
  257. syntax of STRUC is as follows:
  258.  
  259. (optional strucname)  STRUC  (optional effective address)
  260.  
  261. The optional structure name given at the beginning of the line
  262. can appear in subsequent expressions in the program, with the
  263. operator TYPE applied to it, to yield the number of bytes in the
  264. structure template.
  265.                                                               9-6
  266.  
  267. The STRUC directive causes the assembler to enter a mode similar
  268. to DATA SEGMENT: assembly within the structure declares symbols
  269. (the elements of the structure), using a location counter that
  270. starts out at the address following STRUC.  If no address is
  271. given, assembly starts at location 0.  An option not available to
  272. the DATA SEGMENT is that the address can include one base
  273. register [BX] or [BP] and/or one index register [SI] or [DI]. The
  274. registers are part of the implicit declaration of all structure
  275. elements, with the offset value increasing by the number of bytes
  276. allocated in each structure line. For example:
  277.  
  278. LINE STRUC [BP]        ; the template starts at [BP]
  279.        DB 80 DUP (?)   ; these 80 bytes advance us to [BP+80]
  280. LSIZE  DB ?            ; this 1 byte advances us to [BP+81]
  281. LPROT  DB ?
  282.      ENDS
  283.  
  284. The STRUC just given defines the variables LSIZE, equivalent to
  285. B[BP+80], and LPROT, equivalent to B[BP+81].  You can now issue
  286. instructions such as MOV AL,LSIZE; which automatically generates
  287. the correct indexing for you.
  288.  
  289. The mode entered by STRUC is terminated by the ENDS directive,
  290. which returns the assembler to whatever segment (CODE or DATA) it
  291. was in before the STRUC, with the location counter restored to
  292. its value within that segment before the STRUC was declared.
  293.  
  294.  
  295.  
  296. Forward References
  297.  
  298. A86 allows names for a variety of program elements to be forward
  299. referenced.  This means that you may use a symbol in one
  300. statement and define it later with another statement.  For
  301. example:
  302.  
  303.   JNZ TARGET
  304.   .
  305.   .
  306. TARGET:
  307.   ADD AX,10
  308.  
  309. In this example, a conditional jump is made to TARGET, a label
  310. farther down in the code.  When JNZ TARGET is seen, TARGET is
  311. undefined, so this is a forward reference.
  312.                                                               9-7
  313.  
  314. Earlier versions of A86 were much more restricted in the kinds of
  315. forward references allowed.  Almost all of the restrictions have
  316. now been eased, for convenience as well as compatibility with
  317. other assemblers.  In particular, you may now make forward
  318. references to variable names.  You just need to see to it that
  319. A86 has enough information about the type of the operand to
  320. generate the correct instruction.  For example, MOV FOO,AL will
  321. cause A86 to correctly deduce that FOO is a byte variable.  You
  322. can even code a subsequent MOV FOO,1 and A86 will remember that
  323. FOO was assumed to be a byte variable.  But if you code MOV FOO,1
  324. first, A86 won't know whether to issue a byte or a word MOV
  325. instruction; and will thus issue an error message.  You then
  326. specify the type by MOV FOO B,1.
  327.  
  328. In general, A86's compatibility with other assemblers has
  329. improved dramatically for forward references.  You'll need only
  330. sprinkle a very few B's and W's into your references.  And you'll
  331. be rewarded: in many cases the word form is longer than the byte
  332. form, so that other assemblers wind up inserting a wasted NOP in
  333. your program.  You'll wind up with tighter code by using A86!
  334.  
  335.  
  336. Forward References in Expressions
  337.  
  338. A86 now allows you to include any number of forward-reference
  339. symbols in expressions of arbitrary complexity.  If the
  340. expression is legal when the forward references are resolved,
  341. then it will be accepted by the assembler.
  342.  
  343. A86 will also accept the reserved symbol END as a
  344. forward-reference quantity, either by itself as an operand, or
  345. within an expression.  END will be resolved when assembly is
  346. complete, as a label pointing to the end of the program.
  347.  
  348. For example, suppose you wish to advance the ES segment register
  349. to point immediately beyond your program.  You can code:
  350.  
  351.      MOV AX,CS           ; fetch the program's segment value
  352.      ADD AX,(END+15)/16  ; add in the number of paragraphs
  353.      MOV ES,AX           ; ES is now loaded as desired
  354.  
  355.  
  356.  
  357. The EQU Directive
  358.  
  359. Syntax:  symbol-name EQU expression
  360.          symbol-name EQU built-in-symbol
  361.          symbol-name EQU INT n
  362.  
  363. The expression field may specify an operand of any type that
  364. could appear as an operand to an instruction.
  365.                                                               9-8
  366.  
  367. As a simple example, suppose you are writing a program that
  368. manipulates a table containing 100 names and that you want to
  369. refer to the maximum number of names throughout the source file.
  370. You can, of course, use the number 100 to refer to this maximum
  371. each time, as in MOV CX,100, but this approach suffers from two
  372. weaknesses.  First of all, 100 can mean a lot of things; in the
  373. absence of comments, it is not obvious that a particular use of
  374. 100 refers to the maximum number of names.  Secondly, if you
  375. extend the table to allow 200 names, you will have to locate each
  376. 100 and change it to a 200.  Suppose, instead, that you define a
  377. symbol to represent the maximum number of names with the
  378. following statement:
  379.  
  380. MAX_NAMES EQU 100
  381.  
  382. Now when you use the symbol MAX_NAMES instead of the number 100
  383. (for example, MOV CX,MAX_NAMES), it will be obvious that you are
  384. referring to the maximum number of names in the table.  Also, if
  385. you decide to extend the table, you need only change the 100 in
  386. the EQU directive to a 200 and every reference to MAX_NAMES will
  387. reflect the change.
  388.  
  389. You could also take advantage of A86's strong typing, by changing
  390. MAX_NAMES to a variable:
  391.  
  392. MAX_NAMES  DB ?
  393.  
  394. or even an indexed quantity:
  395.  
  396. MAX_NAMES EQU [BX+1]
  397.  
  398. Because the A86 language is strongly typed, the instruction for
  399. loading MAX_NAMES into the CX register remains exactly the same
  400. in all cases: simply MOV CX,MAX_NAMES.
  401.  
  402.  
  403. Equates to Built-In Symbols
  404.  
  405. A86 allows you to define synonyms for any of the assembler
  406. reserved symbols, by EQUating an alternate name of your choosing,
  407. to that symbol.  For example, suppose you were coding a source
  408. module that is to be incorporated into several different
  409. programs.  In some programs, a certain variable will exist in the
  410. code segment.  In others, it will exist in the stack segment. You
  411. want to address the variable in the common source module, but you
  412. don't know which segment override to use.  The solution is to
  413. declare a synonym, QS, for the segment register.  QS will be
  414. defined by each program: the code-segment program will have a QS
  415. EQU CS at the top of it; the stack-segment program will have QS
  416. EQU SS.  The source module can use QS as an override, just as if
  417. it were CS or SS.  The code would be, for example, QS MOV
  418. AL,VARNAME.
  419.                                                               9-9
  420.  
  421. The NIL Prefix
  422.  
  423. A86 provides a mnemonic, NIL, that generates no code.  NIL can be
  424. used as a prefix to another instruction (which will have no
  425. effect on that instruction), or it can appear by itself on a
  426. line.  NIL is provided to extend the example in the previous
  427. section, to cover the possibility of no overrides.  If your
  428. source module goes into a program that fits into 64K, so that all
  429. the segment registers have the same value, then code QS EQU NIL
  430. at the top of that program.
  431.  
  432.  
  433. Interrupt Equates
  434.  
  435. A86 allows you to equate your own name to an INT instruction with
  436. a specific interrupt number.  For example, if you place  TRAP EQU
  437. INT 3  at the top of your program, you can use the name TRAP as a
  438. synonym for INT 3  (the debugger trap on the 8086).
  439.  
  440.  
  441. Duplicate Definitions
  442.  
  443. A86 contains the unique feature of duplicate definitions.   We
  444. have already discussed local symbols, which can be redefined to
  445. different values without restriction.  Local symbols are the only
  446. symbols that can be redefined.  However, any symbol can be
  447. defined more than once, as long as the symbol is defined to be
  448. the same value and type in each definition.
  449.  
  450. This feature has two uses.  First, it eases modular program
  451. development.  For example, if two independently-developed source
  452. files both use the symbol ESC to stand for the ASCII code for
  453. ESCAPE, they can both contain the declaration ESC EQU 01B, with
  454. no problems if they are combined into the same program.
  455.  
  456. The second use for this feature is assertion checking.  Your
  457. deliberate redeclaration of a symbol name is an assertion that
  458. the value of the symbol has not changed; and you want the
  459. assembler to issue you an error message if it has changed.
  460. Example: suppose you have declared a table of options in your
  461. DATA segment; and you have another table of initial values for
  462. those options in your CODE segment.  If you come back months
  463. later and add an option to your tables, you want to be reminded
  464. to update both tables in the same way.  You should declare your
  465. tables as follows:
  466.  
  467. DATA SEGMENT
  468.   OPTIONS:
  469.     .
  470.     .
  471.   OPT_COUNT EQU $-OPTIONS    ; OPT_COUNT is the size of the table
  472.  
  473. CODE SEGMENT
  474.   OPT_INITS:
  475.     .
  476.     .
  477.   OPT_COUNT EQU $-OPT_INITS  ; second OPT_COUNT had better be the same!
  478.                                                              9-10
  479.  
  480. The = Directive
  481.  
  482. Syntax:  symbol-name = expression
  483.          symbol-name = built-in-symbol
  484.          symbol-name = INT n
  485.  
  486. The equals sign directive is provided for compatibility.  It is
  487. identical to the EQU directive, with one exception: if the first
  488. time a symbol appears in a program is in an = directive, that
  489. symbol will be taken as a local symbol.  It can be redefined to
  490. other values, just like the generic local symbols (letter
  491. followed by digits) that A86 supports. (If you try to redefine an
  492. EQU symbol to a different value, you get an error message.) The =
  493. facility is most often used to define "assembler variables", that
  494. change value as the assembly progresses.
  495.  
  496.  
  497. The PROC Directive
  498.  
  499. Syntax:   name  PROC NEAR
  500.           name  PROC FAR
  501.           name  PROC
  502.  
  503. PROC is a directive provided for compatibility with Intel/IBM
  504. assemblers.  I don't like PROC; and I recommend that you do not
  505. use it, even if you are programming for those assemblers.
  506.  
  507. The idea behind PROC is to give the assembler a mechanism whereby
  508. it can decide for you what kind of RET instruction you should be
  509. providing.  If you specify NEAR in your PROC directive, then the
  510. assembler will generate a near (same segment) return when it sees
  511. RET.  If you specify FAR in your PROC directive, the assembler
  512. will generate a far RETF return (which will cause both IP and CS
  513. to be popped from the stack).  If you simply leave well enough
  514. alone, and never code a PROC in your program, then RET will mean
  515. near return throughout your program.
  516.  
  517. The reason I don't like PROC is because it is yet another attempt
  518. by the assembler to do things "behind your back".  This goes
  519. against the reason why you are programming in assembly language
  520. in the first place, which is to have complete control over the
  521. code generated by your source program.  It leads to nothing but
  522. trouble and confusion.
  523.  
  524. Another problem with PROC is its verbosity.  It replaces a simple
  525. colon, given right after the label it defines.  This creates a
  526. visual clutter in the program, that makes the program harder to
  527. read.
  528.  
  529. A86 provides an explicit RETF mnemonic so that you don't need to
  530. use PROC to distinguish between near and far return instructions.
  531. You can use RET for a near return and RETF for a far return.
  532.                                                              9-11
  533.  
  534. The ENDP Directive
  535.  
  536. Syntax:  [name] ENDP
  537.  
  538. The only action A86 takes when it sees an ENDP directive is to
  539. return the assembler to its (sane) default state, in which RET is
  540. a near return.
  541.  
  542. NOTE that this means that A86 does not support nested PROCs, in
  543. which anything but the innermost PROC has the FAR attribute.  I'm
  544. sorry if I am blunt, but anybody who would subject their program
  545. to that level of syntactic clutter has rocks in their head.
  546.  
  547.  
  548. The LABEL Directive
  549.  
  550. Syntax:  name LABEL NEAR
  551.          name LABEL FAR
  552.          name LABEL BYTE
  553.          name LABEL WORD
  554.          name LABEL DWORD
  555.          name LABEL QWORD
  556.          name LABEL TBYTE
  557.  
  558. LABEL is another directive provided for compatibility with
  559. Intel/IBM assemblers.  A86 provides less verbose ways of
  560. specifying all the above LABEL forms, except for LABEL FAR.
  561.  
  562. LABEL defines "name" to have the type given, and a value equal to
  563. the current output pointer.  Thus, LABEL NEAR is synonymous with
  564. a simple colon following the name; and LABEL BYTE, LABEL WORD,
  565. LABEL DWORD, etc., are synonymous with DB, DW, DD, etc., with no
  566. operands.
  567.  
  568. LABEL FAR does have a unique functionality, not found in other
  569. assemblers.  It identifies "name" as a procedure that can be
  570. called from outside this program's code segment.  Such procedures
  571. should have RETFs instead of RETs. Furthermore, I have provided
  572. the following feature, unique to A86: if you CALL the procedure
  573. from within your program, A86 will generate a PUSH CS instruction
  574. followed by a NEAR call to the procedure.  Other assemblers will
  575. generate a FAR call, having the same functional effect; but the
  576. FAR call consumes more program space, and takes more time to
  577. execute.
  578.  
  579. WARNING: you cannot use the above CALL feature as a forward
  580. reference; the LABEL FAR definition must precede any CALLs to it.
  581. This is unavoidable, since the assembler must assume that a CALL
  582. to an undefined symbol takes 3 program bytes.  All assemblers
  583. will issue an error in this situation.
  584.                                                              9-12
  585.  
  586. The INCLUDE Directive
  587.  
  588. A86 now allows the inclusion of alternate source files within the
  589. middle of a "parent" source file, via the INCLUDE directive.
  590. When you give the name INCLUDE followed by the name of a file,
  591. A86 will insert the contents of the named file into the assembly
  592. source stream, as if it were substituted for the INCLUDE line.
  593. There is no limit to the size of an INCLUDE file, and INCLUDEs
  594. may be nested (the file included may itself contain INCLUDE
  595. directives) to any level within reason.  Parentheses are optional
  596. around the file name; if you don't give them, there must be at
  597. least one blank between the INCLUDE and the file name.
  598.  
  599. If there is no file name whatever following the INCLUDE, A86 will
  600. perform an A86LIB library search (see Chapter 13), and INCLUDE
  601. all library files necessary to resolve all undefined symbols at
  602. the point of the INCLUDE.  This provides an "in-file" equivalent
  603. to the pound-sign given on the invocation line.
  604.  
  605.