source410: literal 4.10 source reconstruction + BC++ 4.52 fleet toolchain archived

- BORLAND/: Borland C++ 4.52 (chosen over 4.5 by byte-match: CODE/RP/CW32.LIB
  is identical to 4.52's install lib). BCC32/TLINK32/TLIB/MAKE run natively on
  Win11; CODE/BT/OPT.MAK is the shipped BTL4OPT.EXE's exact flag recipe
  (extender = Borland PowerPack DPMI32, not Phar Lap TNT).
- restoration/source410/: the literal 1995-form reconstruction of the missing
  BT game source (never mixed into CODE/). Round 1-3 state:
  * 6 of 10 surviving original TUs COMPILE CLEAN under the period toolchain
    (BTMSSN, BTCNSL, BTSCNRL, BTTEAM, BTL4MODE, BTL4ARND) - first builds
    since 1996.
  * BT_L4/BTL4APP.CPP pilot reconstruction: 12/12 functions, Fail() lands on
    its binary-recorded line 400 exactly.
  * BT/BTCNSL.HPP: console wire IDs recovered from the binary's ctors
    (Killed=9, Damaged=10, ScoreUpdate=13, DeathWithoutHonor=15 [T1];
    TeamScore=12 flagged [T4]).
  * MUNGA/: 8 engine-header backfills back-dated from the BT412 WinTesla tree
    (VDATA numbering decomp-verified; AUDREND's OpenAL-era virtual removed -
    the period compiler is the drift detector).
  * Tooling: backdate.py (WinTesla->1995 header transform), compile410.sh
    (per-TU verification sweep under authentic OPT.MAK flags).
  * README: corrected roadmap - MECH.HPP is the capstone grown with the mech
    TU reconstructions; BTREG.CPP green = the header-family milestone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-07-19 07:33:26 -05:00
co-authored by Claude Fable 5
parent 599b2388a1
commit 63312e07f9
5913 changed files with 756089 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
/* Program CALLTEST */
/* Copyright (c) 1990, 1992, Borland International */
void a(void); void b1(void); void b2(void); void c(void);
void main(void)
{
c();
b2();
b1();
a();
}
void a(void)
{
int i;
for (i=0; i<100; i++)
b2();
b1();
}
void b1(void)
{
int i;
for (i=0; i<33; i++)
c();
}
void b2(void)
{
int i;
for (i=0; i<77; i++)
c();
}
void c(void)
{
int i;
for (i=0; i<3; i++)
;
}
Binary file not shown.
+40
View File
@@ -0,0 +1,40 @@
#-----------------------------------------------------------------------------
# Turbo Profiler - (C) Copyright 1994 by Borland International
#
# MAKEFILE to build all the Turbo Profiler Samples
#
# The following models may be defined on command line or environment:
# 16-bit small model: make MODEL=s
# 16-bit medium model: make MODEL=m
# 16-bit compact model: make MODEL=c
# 16-bit large model: make MODEL=l
# 16-bit huge model: make MODEL=h
#
# Specify TARGET=xxxx.exe to build only one target sample, rather than all.
# For example:
# MAKE TARGET=prime1.exe
#-----------------------------------------------------------------------------
!if !$d(DEBUG) # Define DEBUG=0 to disable DEBUG information
DEBUG=1 # Define to build with debug information
!endif
MODELS=smclh
SYSTEM=DOS16
EXE = sample
EXEALL= calltest.exe plost.exe prime0.exe prime1.exe prime2.exe \
prime3.exe prime4.exe prime5.exe ptoll.exe
EXEMAKE= $(CALLTEST) $(PLOST) $(PRIME0) $(PRIME1) $(PRIME2) \
$(PRIME3) $(PRIME4) $(PRIME5) $(PTOLL)
CALLTEST=$(EXERULE:sample=calltest)
PLOST=$(EXERULE:sample=plost)
PRIME0=$(EXERULE:sample=prime0)
PRIME1=$(EXERULE:sample=prime1)
PRIME2=$(EXERULE:sample=prime2)
PRIME3=$(EXERULE:sample=prime3)
PRIME4=$(EXERULE:sample=prime4)
PRIME5=$(EXERULE:sample=prime5)
PTOLL=$(EXERULE:sample=ptoll)
!include $(BCEXAMPLEDIR)\makefile.gen
+26
View File
@@ -0,0 +1,26 @@
/* Copyright (c) 1990, 1992, Borland International */
#include <stdio.h>
#include <dos.h> /* contains prototype for delay() */
void lost_in_town(void);
void main(void)
{
printf("Entering main\n");
lost_in_town();
delay(1000);
printf("Leaving main\n\n");
delay(1000);
}
void lost_in_town(void)
{
int i;
printf("Looking for highway...\n");
delay(100);
for (i=0; i<10; i++)
{
printf("Ask for directions\n");
printf("Wrong turn\n\n");
delay(1000);
}
printf("On the road again\n");
}
Binary file not shown.
+35
View File
@@ -0,0 +1,35 @@
/* Copyright (c) 1990, 1992, Borland International */
/* Program for generating prime numbers using Euclid's method */
#include <stdio.h>
int primes[1000];
#define MAXPRIMES 1000
void main(void)
{
int j;
int lastprime, curprime;
primes[0] = 2;
primes[1] = 3;
lastprime = 1;
curprime = 3;
printf("prime %d = %d\n", 0, primes[0]);
printf("prime %d = %d\n", 1, primes[1]);
while(curprime < MAXPRIMES)
{
for(j = 0; j <= lastprime; j++)
if((curprime % primes[j]) == 0)
{
curprime += 2;
break;
}
if(j <= lastprime)
continue;
lastprime++;
printf("prime %d = %d\n", lastprime, curprime);
primes[lastprime] = curprime;
curprime += 2;
}
}
Binary file not shown.
+22
View File
@@ -0,0 +1,22 @@
/* Copyright (c) 1990, 1992, Borland International */
#include <stdio.h>
int prime(int n)
{
int i;
for (i=2; i<n; i++)
if (n % i == 0)
return 0;
return 1;
}
void main(void)
{
int i, n;
n = 1000;
for (i=2; i<=n; i++)
if (prime(i))
printf("%d\n", i);
}
Binary file not shown.
+28
View File
@@ -0,0 +1,28 @@
/* Copyright (c) 1990, 1992, Borland International */
#include <stdio.h>
#include <math.h>
int root(int n)
{
return (int) sqrt((float) n);
}
int prime(int n)
{
int i;
for (i=2; i <= root(n); i++)
if (n % i == 0)
return 0;
return 1;
}
void main(void)
{
int i, n;
n = 1000;
for (i=2; i<=n; i++)
if (prime(i))
printf("%d\n", i);
}
Binary file not shown.
+29
View File
@@ -0,0 +1,29 @@
/* Copyright (c) 1990, 1992, Borland International */
#include <stdio.h>
#include <math.h>
int root(int n)
{
return (int) sqrt((float) n);
}
int prime(int n)
{
int i, limit;
limit = root(n);
for (i=2; i <= limit; i++)
if (n % i == 0)
return 0;
return 1;
}
void main(void)
{
int i, n;
n = 1000;
for (i=2; i<=n; i++)
if (prime(i))
printf("%d\n", i);
}
Binary file not shown.
+28
View File
@@ -0,0 +1,28 @@
/* Copyright (c) 1990, 1992, Borland International */
#include <stdio.h>
int prime(int n)
{
int i;
if (n % 2 == 0)
return (n==2);
if (n % 3 == 0)
return (n==3);
if (n % 5 == 0)
return (n==5);
for (i=7; i*i <= n; i+=2)
if (n % i == 0)
return 0;
return 1;
}
void main(void)
{
int i, n;
n = 1000;
for (i=2; i<=n; i++)
if (prime(i))
printf("%d\n", i);
}
Binary file not shown.
+29
View File
@@ -0,0 +1,29 @@
/* Copyright (c) 1990, 1992, Borland International */
#include <conio.h>
int prime(int n)
{
int i;
if (n % 2 == 0)
return (n==2);
if (n % 3 == 0)
return (n==3);
if (n % 5 == 0)
return (n==5);
for (i=7; i*i <= n; i+=2)
if (n % i == 0)
return 0;
return 1;
}
void main(void)
{
int i, n;
n = 1000;
for (i=2; i<=n; i++)
if (prime(i))
cprintf("%d ", i);
}
Binary file not shown.
+29
View File
@@ -0,0 +1,29 @@
/* Copyright (c) 1990, 1992, Borland International */
#include <stdio.h>
#include <dos.h> /* contains prototype for delay() */
void route66(void); void highway80(void);
void main(void)
{
printf("Entering main\n");
route66();
printf("Back in main\n");
delay(1000);
highway80();
printf("Back in main\n");
delay(1000);
printf("Leaving main\n\n");
}
void route66(void)
{
printf("Entering Route 66\n");
delay(2000);
printf("Leaving Route 66\n");
}
void highway80(void)
{
printf("Entering Highway 80\n");
delay(2000);
printf("Leaving Highway 80\n");
}
Binary file not shown.
Binary file not shown.