DOS Subsystem for Linux breaks cover

By

Penguinistas cop a load of HIMEM.SYS.

A software engineer in Melbourne is whiling away the city’s lockdown by creating a tool that DOS users so far have lacked: an integrated Linux environment similar to what Windows 10 users enjoy.

DOS Subsystem for Linux breaks cover

Charlie Somerville told iTnews that he developed the DOS Subsystem for Linux (DSL) as he enjoys system programming and has an interest in retro computing, expecially 1990s Microsoft DOS and Windows things.

The first version of Microsoft Disk Operating System for Intel 8086 processor-based personal computers appeared in 1981, after the fledgling software house hired developer Tim Paterson who had cloned the Control Program/Monitor (CP/M) software to create what was originally named 86-DOS.

Microsoft paid Paterson US$75,000 for version 1.10 of 86-DOS and renamed it to MS-DOS.

Character-based MS-DOS went through eight major versions over the coming years, the last one being 8.0 and released as part of the Windows ME graphical user interface operating system that Microsoft was moving towards.

Development of standalone DOS continues to this day with the open source FreeDOS.

Inspired by Microsoft's Windows Subsystem for Linux (WSL), Somerville wrote DSL as an amusement.

"I first started out just seeing if I could get Linux booting from the DOS command line, and that turned out to be straightforward enough so I thought it'd be fun to see if I could continue executing DOS once Linux was running," Somerville said.

"I'm mostly surprised by how smoothly the whole thing works given how *dodgy* it all is haha," he added.

DSL runs a real copy of MS-DOS under the QEMU virtual machine, and starts up from that, Somerville said.

The first PCs had a segmented memory model where the first megabyte of random access memory (RAM) was split into 640 kilobytes for user programs and DOS itself, and 384 KB above that for mapping read-only memory and peripheral input/output which ended up being mostly unused.

RAM was expensive in those days, and DOS developers wanting to use the valuable 384 KB of memory had to resort to various coding contortions such as the HIMEM.SYS device driver to store data there.

Somerville found that Linux made life easy for him here.

"Helpfully Linux seems to leave the first megabyte of memory (where DOS lives) intact during its own boot process, so it's just a matter of jumping back to the right place to continue DOS execution," he added.

Somerville had it pointed out to him that this approach of running DOS under vm8086 is actually how early Windows worked. 

"Kinda cool to rediscover the technique so many years later," Somerville said.

DSL is available on the Github open source code repository, and has been tried out with MS-DOS 6.22 and FreeDOS.

Got a news tip for our journalists? Share it with us anonymously here.
Copyright © iTnews.com.au . All rights reserved.
Tags:

Most Read Articles

Rio Tinto AI tool aids defect elimination in rail operations

Rio Tinto AI tool aids defect elimination in rail operations

Curtin University makes headway on 'radical' tech shakeup

Curtin University makes headway on 'radical' tech shakeup

GO Markets chases former CIO over IT contracts

GO Markets chases former CIO over IT contracts

Salesforce blocks AI rivals from using Slack data

Salesforce blocks AI rivals from using Slack data

Log In

  |  Forgot your password?