??? 03/09/05 15:59 Modified: 03/09/05 16:02 Read: times |
#89340 - no include Responding to: ???'s previous message |
hi,
Jan Waclawek said:
You can also use
$INCLUDE (anyfile.asm) which virtually "stitches" together the files before assembling. This is maybe easier to understand. The drawback is, you don't have internal symbols. I think others can further elaborate on why it is not good to use INCLUDE... Generally you should not include assember (.asm, .a51 etc) files into other assembler files. Only include files (.inc) should be included. The reason is simple: assembler files are complex files which are compiled into own object files. For example, if your project contains 1.asm and 2.asm files and you do compile them then compiler creates files 1.obj and 2.obj which are linked then. If you try to include 1.asm into 2.asm then first of all, you should remove file 1.asm from project workspace (from list of compiled files). Otherwise you will get alot of errors because even file 1.asm is included into 2.asm nevertheless compiler processes 1.asm and 2.asm (which already includes content of file 1.asm) then linker tries to merge them. Another reason: any assembler file must be ended with END keyword and if you include file 1.asm into 2.asm then content of 2.asm will be lost with warning: TEXT FOUND BEYOND END STATEMENT - IGNORED. So make things simple: include files are for including, assembler files for assembling. Regards, Oleg |
Topic | Author | Date |
How to link more than 2 files | 01/01/70 00:00 | |
Hint | 01/01/70 00:00 | |
More hints | 01/01/70 00:00 | |
Link more than two files | 01/01/70 00:00 | |
PUBLIC and EXTERNAL | 01/01/70 00:00 | |
correction: PUBLIC and EXTRN | 01/01/70 00:00 | |
linkining more than one file | 01/01/70 00:00 | |
think more | 01/01/70 00:00 | |
linking more than one file | 01/01/70 00:00 | |
use pair PUBLIC/EXTRN | 01/01/70 00:00 | |
Program Linkage | 01/01/70 00:00 | |
INCLUDE | 01/01/70 00:00 | |
no include | 01/01/70 00:00 | |
about include![]() | 01/01/70 00:00 |