Linux for DOSBox
Version 1.1
Copyright (C) 2016 Joel Yliluoma -- http://iki.fi/bisqwit/
License: zlib
Portions of the code come straight from the Linux kernel.
---------------------------------------------------------
LINUX.EXE is a stand-alone 16-bit realmode program for MS-DOS,
which implements a FAST 4-tty Linux-compatible terminal emulator.
It will emulate a 80x50 256-color terminal
with xterm's 256-color extension.
A status line is also displayed on the screen, which is accomplished
by reprogramming the VGA text mode for 80x51 dimensions.
Compile with Borland C++ 3.1. You need TASM, too.
The packaged version of LINUX.EXE is compressed using UPX.
Due to the compression, it will have a slight startup delay
while it decompresses itself to RAM.
To run, you need a version of MS-DOS (such as DOSBox) that has
a special patch in it that implements the following callback
routine:
INT 21
OPEN A NEW TERMINAL
in:
AX = 5300
CX = rows
DX = columns
out:
BX = fd
CX = pid
CLOSE TERMINAL
in:
AX = 5301
BX = fd
CX = pid
WRITE STRING (NON-BLOCKING)
in:
AX = 5302
BX = fd
DS:DX = string address
CX = string length
out:
CX = number of bytes written
READ STRING (NON-BLOCKING)
in:
AX = 5303
BX = fd
DS:DX = target address
CX = buffer capacity
out:
CX = number of bytes read
DX = error code (or zero if CX != 0xFFFF)
SEND A RESIZE EVENT
in:
AX = 5304
BX = fd
CX = rows
DX = columns
An example of such an implementation is added to DOSBox 0.74 by the following patch.
http://bisqwit.iki.fi/src/patch-dosbox-forkpty.txt
Do be careful when applying this patch. It opens a security hole to your
system, allowing any DOS program to issue arbitrary commands in your host
system with the privileges of the account that you use to run DOSBox.
A