MS-DOS client brings ChatGPT to the IBM PC

AI-powered chatbots are clearly the future of computing, and it's only a matter of time before we see them appear on every internet-connected gadget. If you thought you were safe from this by sticking to an old MS-DOS PC, think again: [Yeo Kheng Meng] recently wrote a ChatGPT client that runs under DOS.

[Yeo Kheng Meng] also didn't cheat by just running MS-DOS on a modern PC: he tested the client on a real vintage 1984 IBM 5155 laptop PC. This semi-portable PC/XT model features a 4.77 MHz 8088 processor, 640 KB of RAM and a CGA video card with an integrated monochrome monitor. An NE2000 ISA network card, operating in 8-bit mode, allows the Portable to connect to the Internet.

Running the client couldn't be easier: just run doschgpt.exe and type in your question. [Yeo Kheng Meng] developed this program using the Open Watcom C/C++ compiler, which was the compiler of choice for most DOS game developers at the time. Networking support was provided by a then-adapted packet driver with MTCP, a TCP/IP stack developed by [Michael Brutman] for DOS-based Internet applications.

Connecting to the ChatGPT API and parsing the results was fairly straightforward, but implementing the required TLS encryption was not. Even if there was a library available for MS-DOS, the 5155 wouldn't have enough CPU power to run it in real time, so [Yeo Kheng Meng] decided to run that part of the network stack on a modern PC and send an unencrypted HTTP stream to the DOS client.

The end result is a delightful retro-futuristic setup that looks like it's straight out of a 1980s sci-fi movie. We can already imagine it with a Commodore 64 reporting the news and an IRC server running on a IBM PC.

MS-DOS client brings ChatGPT to the IBM PC

AI-powered chatbots are clearly the future of computing, and it's only a matter of time before we see them appear on every internet-connected gadget. If you thought you were safe from this by sticking to an old MS-DOS PC, think again: [Yeo Kheng Meng] recently wrote a ChatGPT client that runs under DOS.

[Yeo Kheng Meng] also didn't cheat by just running MS-DOS on a modern PC: he tested the client on a real vintage 1984 IBM 5155 laptop PC. This semi-portable PC/XT model features a 4.77 MHz 8088 processor, 640 KB of RAM and a CGA video card with an integrated monochrome monitor. An NE2000 ISA network card, operating in 8-bit mode, allows the Portable to connect to the Internet.

Running the client couldn't be easier: just run doschgpt.exe and type in your question. [Yeo Kheng Meng] developed this program using the Open Watcom C/C++ compiler, which was the compiler of choice for most DOS game developers at the time. Networking support was provided by a then-adapted packet driver with MTCP, a TCP/IP stack developed by [Michael Brutman] for DOS-based Internet applications.

Connecting to the ChatGPT API and parsing the results was fairly straightforward, but implementing the required TLS encryption was not. Even if there was a library available for MS-DOS, the 5155 wouldn't have enough CPU power to run it in real time, so [Yeo Kheng Meng] decided to run that part of the network stack on a modern PC and send an unencrypted HTTP stream to the DOS client.

The end result is a delightful retro-futuristic setup that looks like it's straight out of a 1980s sci-fi movie. We can already imagine it with a Commodore 64 reporting the news and an IRC server running on a IBM PC.

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow