QModem 4.51 源代码
QModem 4.51 Source Code

原始链接: https://github.com/AaronFriel/qmodem-4.51

此版本发布了QModem 4.51的源代码,这是一个由John Friel III创建的流行的MS-DOS电信程序。其1992年初的“试驾版”记录了这个经典通信软件包的内部运作。QModem是Procomm和Telix的竞争对手,拥有多种调制解调器协议、脚本编写、用户自定义以及甚至用于基本BBS功能的“主机模式”等功能。 代码使用Turbo Pascal 5.x/6.0编写,并使用了汇编程序例程、批处理文件以及Turbo Professional之类的库。构建项目需要兼容的环境,可能是MS-DOS或带有Turbo Pascal的DOSBox,并且需要仔细调整构建脚本。代码大量使用了覆盖和直接访问PC硬件。 此版本作为历史文物,适合学习、教育和复古计算爱好者。请注意,它并非直接面向现代环境,移植工作需要大量的调整。诸如Turbo Professional之类的第三方库对于编译至关重要。

Hacker News 上的一个帖子讨论了 QModem 4.51 源代码的发布,引发了人们对 BBS 时代的怀旧之情。用户们回忆起拨号连接、用于离线阅读和回复消息的 QWK 数据包,以及像 OLX、RoboMail 和 SLMR 这样的工具。他们分享了 BBS 文化的回忆,例如通过 ZModem 下载软件,以及使用 QModem、Telix 和 Procomm 等终端程序连接到远程系统。还提到了 QModem 创建时 Pascal 语言的流行程度。许多人感谢 Aaron Friel(原帖作者),因为他保留了他父亲 John Friel(QModem 的创造者,不幸在一次 swatting 事件中去世)的作品。帖子也指出发布的代码缺乏许可证,这可能会限制其进一步的维护和分发。一些人深情地回忆起使用终端程序访问 Linux 系统上的互联网资源。

原文

The source code release of QModem 4.51, an MS-DOS telecommunications program authored by John Friel III (1960–2024). This source snapshot reflects the state of QModem "Test-Drive" edition, version 4.51, as it existed in early 1992. The release is presented in the hope it may prove valuable as a historical artifact, for telecommunications enthusiasts, retrocomputing hobbyists, or anyone interested in the inner workings of a classic DOS comms package.

QModem was a widely-used terminal communications program for MS-DOS, supporting a rich array of modem protocols, scripting, user customization, modem auto-configuration, and even a "Host Mode" for basic BBS-like operation.


QModem was developed throughout the 1980s and early 1990s as a competitor to programs such as Procomm, Telix, and others. It provided robust support for:

  • Many modem speeds and hardware types (8250, 16450, 16550 UARTs, and special hardware)
  • Internal and external file transfer protocols: XMODEM, YMODEM, ZMODEM, and user-defined protocol support via external drivers
  • Full-screen dialing directory (the .FON phonebook)
  • Extensive scripting and automation via its built-in script language
  • In-program configuration via a full-featured setup menu (Alt-N)
  • ANSI/VT100/TTY/Avatar terminal emulations
  • Host Mode: a mini BBS server included in the client!
  • Scrollback buffer, split screen terminal
  • Mouse support, custom keyboard macros, and more

File Layout and Project Structure

This repository contains the complete Turbo Pascal source code, as well as supporting assembler, batch, and utility files.

Main Directories and Files

  • .PAS — Turbo Pascal source files implementing the main program, modules, and utilities
  • .ASM — x86 assembler routines for performance-critical sections and hardware interfacing
  • .BAT — DOS batch files for building, testing, and packaging
  • .OBJ, .INC — Included binaries and Pascal include files
  • .KEY, .FON, .CNF, etc. — Sample data, key, configuration, or phonebook files

Significant modules include:

  • QMODEM.PAS — Main entry point
  • QMMAIN.PAS — Main application logic
  • INITIAL.PAS — Global configuration, terminal, and comm settings
  • COMM.PAS / COMM2.PAS — Serial communications support
  • DOWNLD*.PAS / UPLD*.PAS — File transfer protocol implementations
  • TP*, OP* — Support code, likely Turbo Professional or custom libraries
  • HOST.PAS — Host Mode/BBS functionality
  • FONESTUF.PAS, QDIAL.PAS, etc. — Dialing directory and phonebook features
  • SCRIPTS*.PAS — Script engine and automation
  • INSTALL*.PAS, QINSTALL.PAS, RUNQINST.PAS — On-disk configuration and setup utility

This is a historical codebase. QModem 4.51 targets MS-DOS using Turbo Pascal 5.x/6.0, with Turbo Professional and potentially other Borland or third-party libraries.

Potential Build Approaches

  • Turbo Pascal 5.5/6.0 (MS-DOS or DOSBox): This is almost certainly the original toolchain. If you have a copy, opening QMODEM.PAS as the project and compiling (after possibly setting appropriate memory and overlay paths) may work. Some makefiles or batch files, e.g. BUILD.BAT, may be helpful, but will need adaptation to your environment.

  • TP/BP Emulation or Cross-Compilers: Free Pascal includes some support for Turbo Pascal compatibility, but differences are likely extensive (including use of inline assembler, overlays, and third-party libraries).

  • Turbo Professional & Dependencies: Many of the TP* units (e.g. TpDos, TpCrt, etc.) are from the Turbo Professional library. You'll need the corresponding TPUs and sources for your compiler version.

  • Manual Assembly of .ASM Files: Assembler files need to be assembled (e.g. with TURBO assembler or MASM) and linked or compiled as .OBJ for use with Turbo Pascal.

  • Overlay Management: Note the project extensively uses Borland/Turbo Pascal overlays (.OVR files, see OVR01.INC and overlay units). Disk layout and path settings for overlays must be matched as the original program expects.

Several build-automation batch files are included, such as:

  • BUILD.BAT
  • BUILDOVR.BAT
  • BUG.BAT
  • DEBUGOVR.BAT

Inspect and adapt these scripts as necessary for your own environment.

  • No supported modern environment targets this code directly. Efforts to port or run on anything but MS-DOS/Turbo Pascal 5.x/6.x are purely experimental and will require code and/or dependency adaptation.
  • Third-party libraries (Turbo Professional, OpKey, possibly others) are required.
  • Hardware-dependence: Much code assumes direct access to PC hardware, BIOS, and serial port interrupts.
  • Overlay management: The overlay system (OVERLAY.PAS, etc.) must be supported as originally intended.

This repository is for study, education, restoration, and historical curiosity. See the original QModem documentation (not included here) for user guidance. The commands, batch files, and source code reflect MS-DOS conventions and expectations.


John Friel III, 1960–2024

联系我们 contact @ memedata.com