This directory contains the source code for Tbug, 3L's transputer
debugger.  It is intended to be used to build a modern version of Tbug
for use with JAFSERVER.EXE, Gavin Crate's transputer emulator for PCs.
The changes from the original version to support I/O to the modern
Windows terminal rather than direct I/O to the old VGA display buffer
are in the files named at the end of this note, marked with #if MODERN,
so it might be possible to re-build the original version, though
I can't see why you would want to.

I successfully used Parallel C V2.2.4 for the build.  Note
that, for simplicity, the MAKEFILE does _not_ attempt to rebuild the
various *.PDM and *.PHC files from source.  Just start with all the
original binaries from TBUG1V1-32.ZIP in the target directory and then
overwrite TBUG.B4 with the new version produced by the MAKEFILE here;
the original 1990s .PDM files work fine with the new .B4.

Building SACRIFIC.TSK requires a little utility, HFUDGE.EXE/HFUDGE.B4. 
I have simply included those here rather than trying to rebuild from
source.  They need to be on the PATH when the MAKEFILE is run.

TBUG.EXE is an Intel x86 program.  It is included in TBUG1V1-32.ZIP and
you shouldn't need to change it, but if you do want to rebuild it from
the sources here, I used Microsoft Visual C++ 2010, like this:

      cl -c tbug.c
      cl -c csupp.c
      link tbug csupp

The following files have been modified from the originals:

ws-panel.c   Use ANSI escape sequences in place of direct writes to VGA display
WS-KEYBD.C   Use AFSERVER's ReadKey_Cmd in place of DOS interrupts for
             non-blocking keyboard input
main.c       Add /S (screen size) switch, supplied by tbug.c variant driver
getcwd.c     Use "CD" command via system() instead of DOS interrupts
WS-FSEL.C    Use various Windows CMD commands via system() instead of
             DOS interrupts for file-select dialogue
ws-dlg.c     Use plain ASCII characters ('<' etc.) instead of Windows
             code-page 437 codes < 32 that no longer display correctly
             on modern Windows terminal
WS-WIND.C    Use ASCII <- ^ v -> instead of old CP437 arrow codes < 32
             in moving-window message for F6
EX-FILES.C   Use "pale splodge" to show weak breakpoints and "square
             block" for strong ones instead of original "left-pointing
             arrow" and "left-pointing triangle/wedge", which have codes
             < 32 and therefore no longer display at all
tbug.c       Variant driver that uses CSUPP.C module to discover screen
             size and send it to TBUG.B4 via /S command-line switch

Fiona Culloch,
May 2026

