// Detect It Easy: detection rule file
// Author: horsicq <horsicq@gmail.com>
// Turbo Assembler 32 (TASM32) by Borland.
// Versions: 5.X.  Linker: TLINK32.
// https://en.wikipedia.org/wiki/Turbo_Assembler

meta("compiler", "TASM32");

includeScript("Borland"); // sets bBorlandC
includeScript("TASM32");  // uses bBorlandC; sets bTASM32

function detect() {
    if (bTASM32) {
        // Map TLINK32 linker version to TASM32 product version.
        // TLINK32 always stamps major version 2 in the PE optional header.
        if (PE.getMajorLinkerVersion() == 2 && PE.getMinorLinkerVersion() == 25) {
            sVersion = "5.x";
        }

        bDetected = true;
    }

    sLang = "ASMx86";

    return result();
}
