// Detect It Easy: detection rule file
// Author: horsicq <horsicq@gmail.com>

meta("debug data", "Borland TLINK Symbol Table");

function detect() {
    if (MSDOS.compareOverlay("FB52")) {
        var offset = MSDOS.getOverlayOffset();
        var minor = MSDOS.readByte(offset + 0x2);
        var major = MSDOS.readByte(offset + 0x3);
        var minorStr = ((minor >> 4) * 10 + (minor & 0x0F)).toString();
        var majorStr = ((major >> 4) * 10 + (major & 0x0F)).toString();
        sVersion = majorStr + "." + minorStr;

        sOptions = "TDS";
        bDetected = true;
    }

    return result();
}