sources for DOS-16bit

Adam DePrince adam at
Sat Dec 11 06:10:08 CET 2004

On Fri, 2004-12-10 at 16:30, Peter Hansen wrote:
> McBooCzech wrote:
> > I am looking for Python binaries for DOS-16bit!!!!
> > Not for Win-16bit or DOS-32 which are the only DOS availabele sources
> > on Python official site and on the other sites as well!!!
> > I will prefere sources for Borland C 3.x.
> > 
> > I was trying to use Python 1.0.1 (16python.exe file) for my
> > application,
> > but I realized it doesn't work on NEC V25 CPU (8086/8088 compatible
> > CPU developed by NEC).
> > 
> > I was involved in to our school computer "research" :) and we need
> > this piece of code to reach our goal.
> > 
> > We have to demonstrate the power of the free software (mainly its
> > compatiblity for different platforms)!!!
> > 
> > Can you please search your archives or route me somewhere?
> Does it have to be Python?  There are other languages that
> are arguably as portable, and certainly more compact.  Lua,
> for example, has been ported to quite small devices.  See
> for more on that, but note there are
> other options as well.  Python's not the only "free portable
> software" around, though it's the best in many ways.

You may want to consider some of the programming languages of the day.  
Pascal comes to mind; it was popular when the 8086 was "The Machine to
Own" (tm).  Much as Java of a decade and a half later had "bytecode",
there was a byte code for pascal called "p-code" courtesy of UCSD.   
Look at for the "pascal programming language."   There
are executables and source code files for lots of pascal compilers. 
IMHO this is your best chance at getting a complex program into a
limited machine.

For more insight, look at uClinux and elks.  They are both linux
derivatives for small machines like the 8086.  

BTW, how much RAM does your machine have?   Also, remember that if your
chip is anything like the V20 or V30 from NEC it also can emulate the
8080 (which the Z80 is a clone of.)  I have no clue how to use this

I might be recalling this incorrectly, but the V20 and V30 do have one
incompatibility with the 8086.  There is an op code called AAD.  It was
intended to help with BCD (base 10) arithmetic and would basically
perform the operation 10 * X + Y.  The value 10 happened to be encoded
into the op code.  The 8086, when executing this operation, would pull
the value from the op code.  The V20-V30 would pull it from a constants
table.  So, using any value other than 10 would result in the operation
K * X + Y for some unsigned 4 bit value; on the V20-V30 it was an
undefined operation.  What this an accident?  I don't know, but a lot of
assembly coders came to depend on the one or two CPU cycles it would
save over a proper mul and add.  One or two cycles per array reference
was a big thing back then ... 

Anyhow, sorry about babbling on about this non-python related nonsense
and good luck.

Adam DePrince 

More information about the Python-list mailing list