File format · .asi
Borland Assembler Include (.INC) Files — Structure, Errors & Repair
Borland Turbo Assembler .INC include files define macros, constants, and structures. Learn how these source files work, why they fail to assemble, and how to recover their contents.
Borland's assembler toolchain — including Turbo Assembler (TASM) and the inline assemblers built into Turbo C++, Turbo Pascal, and Borland C++ — relied heavily on include files to manage reusable code. These files, typically given the .INC extension, contain assembly-language source code rather than compiled binaries. When they become corrupted, truncated, or accidentally overwritten, assembly fails and development stalls. At FileRepair.net, we frequently help developers recover the contents of legacy source files like these so that historical software projects can be rebuilt and maintained.
What a Borland Assembler Include File Is
An .INC file is a plain-text source-code container used by Borland's development tools. Rather than representing a distinct compiled binary format, these files hold raw assembly-language instructions, macro definitions, constant declarations (EQU), segment definitions, and procedure prototypes. A developer references them from a primary .ASM file using a directive such as INCLUDE MYMACROS.INC, instructing the Turbo Assembler to insert the contents of the include file at that exact point during processing.
Borland Software Corporation, founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad, and Philippe Kahn, built a highly successful line of programming tools for MS-DOS and early Windows environments. Turbo Assembler shipped alongside popular compilers like Turbo C++ — version 1.01 of which was distributed with TASM in early 1991 — and Borland C++. Later versions of the toolchain integrated the assembler directly into the high-level language compilers via inline assembly, but the .INC include mechanism remained a standard way to share structural definitions and macro libraries across multiple assembly projects.
Structure and Technical Characteristics
Because .INC files are plain text, they do not possess a proprietary binary signature, magic bytes, or a complex internal file allocation table. Their structure is defined entirely by Borland's assembly-language syntax. A typical include file might contain:
- Macro definitions: Reusable blocks of assembly instructions defined with
MACROandENDMdirectives. - Symbolic constants: Values assigned with the
EQUor=directives. - Structure and record definitions: Memory layout templates defined with
STRUCandENDS. - External declarations: References to procedures or variables located in other object modules, declared with
EXTRNorGLOBAL. - Conditional assembly blocks: Code wrapped in
IF,ELSE, andENDIFdirectives to control what gets assembled based on defined symbols.
The files are typically encoded in standard ASCII or in the code page (such as CP437) native to the MS-DOS environment in which they were originally authored. They have no mandatory header, footer, or checksum mechanism, which makes them structurally simple but entirely dependent on the integrity of the raw character data.
Why Include Files Become Corrupt or Unreadable
Despite being plain text, .INC files are vulnerable to several forms of data loss and corruption:
- Storage media degradation: Many of these files reside on aging floppy disks, aging IDE hard drives, or legacy backup tapes prone to magnetic degradation, bad sectors, and read errors.
- Filesystem corruption: Improper shutdowns of MS-DOS or early Windows environments could corrupt the File Allocation Table (FAT), leading to cross-linked clusters or truncated files.
- Encoding and character set mismatches: Transferring files from legacy DOS environments to modern operating systems can result in mangled characters, incorrect line endings (such as converting Carriage Return/Line Feed to Unix-style Line Feeds), or unintended byte substitutions.
- Accidental overwriting: Because
.INCfiles are plain text, they are easily overwritten by text editors or confused with similarly named files during batch processing or version control mishaps. - Partial writes: If a system crashed or lost power while an editor or source control system was saving the file, the resulting
.INCfile might be incomplete, missing criticalENDMorENDIFclosing directives.
What Data Can Be Recovered
In nearly all cases involving physical corruption or truncation, the recoverable data consists of the original ASCII text. Because there is no complex binary encoding to decrypt, successful recovery usually yields the raw source code. If the original file was partially overwritten, the unaffected portions — often including vital macro definitions and constant lists — can typically be extracted. If filesystem corruption has broken the pointer to the file's data clusters, raw disk scanning can often locate the plain-text strings and rebuild the file.
How Recovery Works
Recovering a Borland assembler include file requires a different approach than repairing a compiled binary database or media file. Our process focuses on raw data extraction and structural validation:
- Imaging and cloning: If the file resides on failing legacy media (such as a 3.5-inch floppy disk), we first create a sector-by-sector image to prevent further data loss during analysis.
- Filesystem repair: If the FAT or directory entry is damaged, we reconstruct the file's cluster chain to restore the file to its original size.
- Raw carving: If the filesystem metadata is entirely destroyed, we scan the underlying storage media for recognizable plain-text patterns — such as the
MACRO,STRUC, orEQUkeywords characteristic of Borland assembly — and carve the readable text into a new file. - Encoding normalization: We repair character encoding issues, restoring proper MS-DOS code page characters and ensuring standard Carriage Return/Line Feed (CRLF) line endings so the file can be read by both legacy tools and modern text editors.
- Syntax validation: Finally, we review the recovered text to ensure that conditional blocks and macro definitions are properly closed, preventing immediate assembly failures when the file is reintroduced to the toolchain.
Frequently Asked Questions
Are Borland assembler include files a binary format?
No. Files with the .INC extension used by Borland Turbo Assembler and related tools are plain-text files containing assembly-language source code. They do not have a binary structure, magic bytes, or a proprietary header.
Can a corrupted .INC file still be assembled by Turbo Assembler?
It depends on the nature of the corruption. If the corruption introduces stray non-printable characters or truncates a macro block (leaving out an ENDM directive), the assembler will generate fatal syntax errors. If the file is merely missing its filesystem pointer but the data is intact, recovery will yield a perfectly functional file.
What is the difference between an .ASM file and an .INC file?
Functionally, they contain the same type of plain-text source code. The .ASM extension denotes the primary source file fed directly to the assembler, while the .INC extension denotes a supplementary file meant to be pulled into an .ASM file via the INCLUDE directive.
How do I open an .INC file without Borland software?
Because they are plain text, you can open a healthy .INC file using any standard text editor, such as Notepad, VS Code, or Notepad++. However, to actually process and assemble the code into a working executable, you would need an x86 assembler like TASM, MASM, or a modern compatible tool like JWASM.
Can you recover .INC files from old floppy disks?
Yes. We frequently recover plain-text source files from legacy storage media. The key is to avoid repeatedly attempting to read the failing disk in a legacy drive, which can cause further physical degradation, and instead perform a single, careful sector-by-sector imaging procedure.
Let Us Evaluate Your File
If you have a Borland assembler include file — or any legacy source code file — that has become corrupted, truncated, or unreadable, we can help. Our team has extensive experience dealing with legacy MS-DOS environments, FAT filesystem corruption, and raw text recovery. Send us your file or a disk image today for a free, no-obligation evaluation, and we will detail exactly what can be recovered.
Send us your .asi file for a free evaluation
Our recovery engineers will tell you exactly what can be recovered — at no cost. There is no charge if we cannot recover your data.
Start a free evaluation