File format · .s1
S1 File: Free Pascal Assembler Output for the GO32 v1 DOS Target
What an .s1 assembler file from Free Pascal's GO32 v1 DOS target contains, why it stops opening, and how our engineers recover damaged S1 files.
An .s1 file is an assembly-language source file produced by the Free Pascal compiler when it builds programs for the Go32 v1 DOS target. The files are plain text, generated as an intermediate step, and normally deleted once the object file exists. They matter today mostly in archival builds, legacy toolchains, and cases where the original Pascal source has been lost.
What is an .s1 file?
Free Pascal, usually abbreviated FPC, is a free, open-source Pascal compiler begun in 1993 and maintained by the project's volunteer development team. It runs on many processors and operating systems, and it can cross-compile between them. See the Free Pascal project site for the official word on supported targets and releases.
The Go32 v1 target aimed the compiler at 32-bit DOS programs running under the GO32 extender used by the first release of the DJGPP toolchain. It was among the compiler's earliest platforms, in the mid-1990s. The team later replaced it with Go32 v2, a DOS target that recent releases still list, so files carrying the .s1 extension almost always date from the compiler's first years.
One caution applies before anything else: extensions get reused. Unrelated products also name files .s1, so the letters alone prove nothing. Open the file in a text editor; Free Pascal output is readable assembly, usually introduced by banner comments naming the compiler version.
The compiler pipeline behind the file
FPC works in two stages. It translates each Pascal unit into assembly language, then assembles that text into an object file. On this platform the second stage was handed to an external assembler, normally the GNU assembler.
The assembler text is scaffolding. The compiler deletes it after assembly unless you pass the -a switch, which tells FPC to keep generated assembler files. A related switch, -al, embeds the original Pascal lines as comments, which is why some .s1 files read like an annotated listing.
A healthy .s1 file is therefore disposable by design. It becomes precious only when the Pascal source is gone and the assembler text is the last surviving copy of the work.
Structure and technical facts
- Extension: .s1, tied to the go32v1 target of Free Pascal.
- Category: intermediate compiler output, assembly-language source for i386.
- Format: plain ASCII text, line-oriented, with no binary header and no magic bytes to scan for.
- Syntax: the AT&T-style i386 assembly that GNU as accepts, with percent-prefixed register names.
- Typical contents: .text, .data, and .bss sections; mangled symbol names derived from unit and identifier names; string literals and constant tables; assembler directives; comment banners naming the FPC version.
- MIME type: none is registered; identification rests on the extension together with the content.
- Related formats: .s for assembler output on many other FPC targets, .asm where Intel-syntax assemblers such as MASM or NASM are used, .pp and .pas for Pascal source, and .o for the object file produced next.
How do .s1 files become corrupt or unreadable?
- Interrupted builds. A power cut or a crashed compiler can leave a half-written file, cut off mid-instruction.
- Aging media. Most .s1 files lived on floppies and early hard disks, where bad sectors and gradual decay punch holes in text.
- Transfer damage. FTP in the wrong mode, careless codepage conversion, or rewritten line endings can leave the text unparsable.
- Build cleanup. Because the compiler deletes these files by default, the usual failure is disappearance rather than corruption, and recovery means undeleting the file from the build media.
- Mismatched tools. Assembling intact text with the wrong assembler, or the wrong syntax mode, produces errors that look like corruption but are not.
What can be recovered from a damaged .s1 file?
Because the format is plain text, our engineers can often read fragments even when the file will not open or assemble cleanly. What typically survives includes the section layout, symbol and label names, string constants, initialized data tables, the compiler version banner, and, with -al listings, the comments that link each block back to its Pascal source line.
Where enough survives, we rebuild a syntactically clean file that a suitable assembler accepts, restoring an object file you can link again. Where the damage is heavy, we extract the readable remainder so it can be ported or studied. Text recovery from this format is usually more forgiving than binary formats, because damage tends to destroy neighborhoods of lines rather than the whole structure.
One constraint deserves plain language. If the original Pascal source still exists, the compiler can regenerate the assembler file, so your effort belongs there. Recovery is the right answer when the .s1 file is itself the last artifact: the source is gone, the build machine is gone, or the file came out of an archive nobody can reproduce.
The recovery process, step by step
- Upload the damaged .s1 file to us for a free evaluation.
- Our engineers assess what survives and send you a fixed quote.
- On approval we recover the content and return a working file.
If nothing can be recovered, there is no charge.
Frequently asked questions
Which programs open .s1 files?
Any text editor opens them, because they are plain text. To go further you need the assembler the text targets, on this platform the GNU assembler, plus a DOS-era toolchain to run it. Free Pascal itself can regenerate such files from Pascal source when compiled with -a.
How can I confirm my file is Free Pascal output?
Read the first lines. FPC assembler files normally begin with comment banners naming the compiler, its version, and the source unit. AT&T-style mnemonics and .text, .data, and .bss sections are the other giveaways.
Is a corrupt .s1 file dangerous?
No. Assembler source is inert text; it cannot execute until an assembler converts it into an object file and a linker builds a program.
Can you recover a file that was deleted rather than damaged?
Often, yes. Undeletion from the original build media works best when that media has seen little use since. Send us what you have and we will tell you honestly what is possible.
If an .s1 file refuses to open, arrived truncated, or holds work you cannot rebuild any other way, send it to our team. The evaluation is free, the quote is fixed, and if we cannot recover your data there is no charge.
Send us your .s1 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