Coder Social home page Coder Social logo

davidly / ntvdm Goto Github PK

View Code? Open in Web Editor NEW
35.0 35.0 5.0 26.8 MB

NT Virtual DOS Machine. Not the real one, but this one runs on 64-bit Windows (x64 and ARM64). It also runs on Linux (32 and 64 bit) and MacOS.

License: Creative Commons Zero v1.0 Universal

C++ 57.61% Batchfile 0.42% BASIC 6.20% Pascal 16.03% OpenEdge ABL 0.35% Max 0.19% C 15.26% Assembly 3.90% Shell 0.04%
8086-emulator emulator msdos-emulator

ntvdm's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @davidly
  • ๐Ÿ‘€ Iโ€™m interested in photography, music, coding, retro computing, and combinations of these.
  • ๐ŸŒฑ I continue to test/enhance emulators that run apps targeting 6502 + Apple 1, 8080/Z80 + CP/M 2.2, 8086 + DOS 3.3, and 64-bit RISC-V + Linux.

The repos found here are apps I built for my own use and amusement. I code when I need a tool or am curious about something.

All of the code is freely available for use as you like.

ntvdm's People

Contributors

arcnor avatar davidly avatar mike632t avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ntvdm's Issues

Output buffers not flushed on Linux Console

Using commit 94f38de.

Attempting to compile TP.BAS from the command line using BC.EXE appears to hang after displaying the copyright message.

/DOS/UTL$ ../ntvdm BC.EXE
Microsoft (R) BASIC Compiler Version 7.10
Copyright (C) Microsoft Corporation 1982-1990. All rights reserved.

However, it hasn't really hung but is just waiting for the name of the source file to be entered. No prompt is shown on the console since although it has been printed by ntvdm file buffer hasn't been flushed so nothing shows on the console...

Entering TP.BAS and pressing twice results in the following, with the output being displayed as ntvdm exits.

/DOS/UTL$ ../ntvdm BC.EXE
Microsoft (R) BASIC Compiler Version 7.10
Copyright (C) Microsoft Corporation 1982-1990. All rights reserved.
TP.BAS



45684 Bytes Available
45620 Bytes Free

    0 Warning Error(s)
    0 Severe  Error(s)

Source Filename [.bas]: 
Object Filename [TP.obj]: 
Source Listing [nul.lst]: /DOS/UTL$ 

Unhanded 8086 instruction

This may be a bit of an edge case but I tried running ICOPY.EXE which is a utility used (created by Microsoft) to extract files from disk images.

$ ../ntvdm -u ICOPY.EXE  DISK1.IMG SETUP
unhandled 8086 instruction 6a
  built for amd64 debug on Oct  1 2023 20:08:49 by g++ on linux

$

Hex dump of first page of the executable (addresses start at 0x0100)

0100 4D5A6F00 2200BE00 4000B709 FFFF9D08  MZo."...@.......
0110 00500000 1C003901 1E000000 01000900  .P....9.........
0120 00001C00 00003600 00004E00 00006600  ......6...N...f.
0130 00007E00 00009600 0000AE00 0000C600  ..~.............
0140 0000DE00 0000F600 00000E01 00002601  ..............&.
0150 00003E01 00007C01 0000A701 00000903  ..>...|.........
0160 00002503 00005203 00006703 00007903  ..%...R...g...y.
0170 00009D03 0000B503 0000C903 0000FD03  ................
0180 00001104 00004404 00005704 00007804  ......D...W...x.
0190 0000C504 0000F404 00001605 00002D05  ..............-.
01A0 00003B05 00004D05 00006305 00007905  ..;...M...c...y.
01B0 00009505 0000A005 0000B305 0000C505  ................
01C0 0000E705 0000F905 00002406 00006806  ..........$...h.
01D0 00008006 00009906 0000A006 0000BA06  ................
01E0 0000E306 0000EA06 00000407 00002D07  ..............-.
01F0 00006707 00007407 00008607 0000BB07  ..g...t.........

Expected output

C:\>ICOPY DISK1.IMG SETUP
    Copying SETUP\ACMSETUP.EX_......
    Copying SETUP\ACMSETUP.HL_
    Copying SETUP\ANSI.TR_
    Copying SETUP\ARTGALRY.EX_.....
    Copying SETUP\ARTGALRY.HL_
    Copying SETUP\ARTGALRY.RE_
    Copying SETUP\BELLS.WM_
    Copying SETUP\CAKESLIC.WM_
    Copying SETUP\CAMPING.WM_
    Copying SETUP\CAT.WM_
    Copying SETUP\CELTIC.WM_
    Copying SETUP\CGMIMP.FL_.
    Copying SETUP\CHECKMRK.WM_
    Copying SETUP\COMPASS.WM_
    Copying SETUP\COMPLINC.DL_
    Copying SETUP\CTL3D.DL_
    Copying SETUP\DECO.WM_
    Copying SETUP\DECOMP.EXE..
    Copying SETUP\DISK.WM_
    Copying SETUP\DRINK.WM_
    Copying SETUP\EVERGREN.WM_
    Copying SETUP\FALL.WM_
    Copying SETUP\FIREWORK.WM_
    Copying SETUP\FLYERS.BM_
    Copying SETUP\GLOBE.WM_
    Copying SETUP\HARDHAT.WM_
    Copying SETUP\HEART.WM_
    Copying SETUP\HYPH.DL_
    Copying SETUP\HY_EN.LE_..
    Copying SETUP\IFFTIFF.DL_.
    Copying SETUP\KERMIT.FT_
    Copying SETUP\LIGHTBLB.WM_
    Copying SETUP\LUGGAGE.WM_
    Copying SETUP\MSCPYDIS.DL_
    Copying SETUP\MSINFO.EX_.
    Copying SETUP\MSSETUP.DL_.....
    Copying SETUP\MSWORKS3.RE_
    Copying SETUP\MSWORKS3.TX_
    Copying SETUP\MUSIC.WM_
    Copying SETUP\MWKDBXL.XW_.
    Copying SETUP\MWKSSXL.XW_..
    Copying SETUP\NETWORK.IN_
    Copying SETUP\NOTE-IT.EX_.
    Copying SETUP\NOTE-IT.HL_.
    Copying SETUP\NOTE-IT.RE_
    Copying SETUP\NOTES.WM_
    Copying SETUP\PCXIMP.FL_
    Copying SETUP\PHONE.WM_
    Copying SETUP\PRESENT.WM_
    Copying SETUP\PUSHPIN.WM_
    Copying SETUP\RECYCLE.WM_
    Copying SETUP\SANTA.WM_
    Copying SETUP\SETUP.EXE..
    Copying SETUP\SETUP.INI
    Copying SETUP\SETUP.IN_
    Copying SETUP\SETUP.LST
    Copying SETUP\SETUP.ST_
    Copying SETUP\SOCCER.WM_
    Copying SETUP\SPLAT.WM_
    Copying SETUP\SPRING.WM_
    Copying SETUP\STAR.WM_
    Copying SETUP\SUMMER.WM_
    Copying SETUP\SUN.WM_
    Copying SETUP\TEAMNEWS.WP_
    Copying SETUP\TIFFIMP.FL_
    Copying SETUP\TMPL804.DB_
    Copying SETUP\TMPL805.KS_
    Copying SETUP\TMPL808.DB_
    Copying SETUP\TMPL812.PS_
    Copying SETUP\TMPL815.KS_
    Copying SETUP\TMPL817.DB_
    Copying SETUP\TMPL821.PS_
    Copying SETUP\TMPL822.DB_
    Copying SETUP\TMPL826.DB_
    Copying SETUP\TMPL829.DB_
    Copying SETUP\TMPL830.PS_
    Copying SETUP\TMPL831.KS_
    Copying SETUP\TMPL836.DB_
    Copying SETUP\TMPL838.PS_
    Copying SETUP\TMPL840.DB_
    Copying SETUP\TROPICS.WM_
    Copying SETUP\VT100.TR_
    Copying SETUP\VT220.TR_
    Copying SETUP\VT52.TR_
    Copying SETUP\WHEELCHR.WM_
    Copying SETUP\WINGLIST.WD_
    Copying SETUP\WINGPROP.WP_
    Copying SETUP\WINGSALS.WK_
    Copying SETUP\WINGTIP.BM_
    Copying SETUP\WINTER.WM_
    Copying SETUP\WK3MCNV.CN_..
    Copying SETUP\WKS3ART.ID_
    Copying SETUP\WKS3ART.TH_
    Copying SETUP\WKSLANG.DL_.....
    Copying SETUP\WMFIMP.FL_
    Copying SETUP\WORKSXM.DL_
    Copying SETUP\WORKS_BB.DL_..
    Copying SETUP\XMODEM.FT_
    Copying SETUP\YMODEM.FT_
    Copying SETUP\ZMODEM.FT_
C:\>

ICOPY.EXE.zip

Success

Not really an issue but I thought you would be interested to know that ntdvm compiled and ran successfully (well was able to run TURBO.COM) on Debian 12 (Bookworm) using gcc 12.2.0 on i686 (32-bit) and amd64 (64-bit) hardware.

Nice job!

"SYS2090: Unable to load User Program"

Quick BASIC is one of the compiler you managed to test, but when running on Linux what is the incantation needed to avoid the 'SYS2090: Unable to load User Program' error.

This copy of an old Microsoft KB article Q42591 seems to describe the same problem.

You have already far exceeded my expectations!

Just a question

I don't suppose you have thought about porting this to Linux (obviously command line only, no screen orientated stuff).

(It is probably not worth the effort, but I was just curious!)

Can't break out of a program using Ctrl-C

Can't break out of a program using Ctrl-C (or Ctrl-Z).

If prompted to enter a file name, should entering Ctrl-C terminate the program?

Unfortunately it seems to be ignored.

$ ../ntvdm -u -d -h CL.EXE SIEVE.C
Microsoft C Compiler  Version 3.00
(C)Copyright Microsoft Corp 1984 1985
SIEVE.C

Microsoft 8086 Object Linker
Version 3.01 (C) Copyright Microsoft Corp 1983, 1984, 1985

Object Modules [.OBJ]: SIEVE.OBJ 
Run File [SIEVE.EXE]: SIEVE.EXE/NOI
List File [NUL.MAP]: NUL
Libraries [.LIB]: ;
Cannot find library: EM.LIB
Enter new file spec: ^C

I have not been able to test in a DOS environment yet so I can't be sure if this was supposed to happen. (I do still have a real DOS machine somewhere!).

Generally having far too much 'fun' messing about to see what works. I just wish I was the same age as the last time I used some of this software!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.