VOGONS


First post, by mattnz

User metadata
Rank Newbie
Rank
Newbie

Hi all,

I started out wanting to write a 8086/8088 .OBJ file unit test framework, but got side tracked by the ability to run MS-DOS command line programs on my Apple Silicon Mac. I've concentrated on getting Borland development tools working, so the following runs successfully in your command shell/terminal: Turbo Assembler 3.2, Turbo Linker 3.0.1, Turbo Librarian 3.0, Turbo Pascal 5.5 & 6.0, and a program from Fabrice Bellard called INFOEXE.

[user@host ~]# xt run TASM.EXE

Turbo Assembler Version 3.2 Copyright (c) 1988, 1992 Borland International
Syntax: TASM [options] source [,object] [,listing] [,xref]
/a,/s Alphabetic or Source-code segment ordering
/c Generate cross-reference in listing
/dSYM[=VAL] Define symbol SYM = 0, or = value VAL
/e,/r Emulated or Real floating-point instructions
/h,/? Display this help screen
/iPATH Search PATH for include files
/jCMD Jam in an assembler directive CMD (eg. /jIDEAL)
/kh# Hash table capacity # symbols
...

[user@host ~]# xt run TASM.EXE MORE.ASM

Turbo Assembler Version 3.2 Copyright (c) 1988, 1992 Borland International

Assembling file: MORE.ASM
Error messages: None
Warning messages: None
Passes: 1
Remaining memory: 795k

[user@host ~]#

The CPU emulation is rock solid due to it passing Single Step Test suite's 2.5 million tests - 10,000 per opcode (thanks to Daniel Balsom/MartyPC).

If others find it useful that's great. Pull requests welcome, as are suggestions on other MS-DOS command line programs people want to run.

GitHub: https://github.com/electricbolt/XT

XT - Run MS-DOS command line programs on macOS.
https://github.com/electricbolt/xt-swift-usermode

Reply 1 of 9, by Ringding

User metadata
Rank Member
Rank
Member

So it is basically exactly like MS-DOS Player, but more accessible to us Westerners. I am looking forward to trying it!

Reply 2 of 9, by GloriousCow

User metadata
Rank Oldbie
Rank
Oldbie
mattnz wrote on 2025-05-27, 09:29:

Hi all,

I started out wanting to write a 8086/8088 .OBJ file unit test framework, but got side tracked by the ability to run MS-DOS command line programs on my Apple Silicon Mac. I've concentrated on getting Borland development tools working, so the following runs successfully in your command shell/terminal: Turbo Assembler 3.2, Turbo Linker 3.0.1, Turbo Librarian 3.0, Turbo Pascal 5.5 & 6.0, and a program from Fabrice Bellard called INFOEXE.

This is really cool!

mattnz wrote on 2025-05-27, 09:29:

The CPU emulation is rock solid due to it passing Single Step Test suite's 2.5 million tests - 10,000 per opcode (thanks to Daniel Balsom/MartyPC).

Glad you found them useful! It's always great seeing another emulator take advantage of them.

MartyPC: A cycle-accurate IBM PC/XT emulator | web version: https://martypc.net | https://github.com/dbalsom/martypc

Reply 3 of 9, by mattnz

User metadata
Rank Newbie
Rank
Newbie
Ringding wrote on 2025-05-27, 13:49:

So it is basically exactly like MS-DOS Player, but more accessible to us Westerners. I am looking forward to trying it!

I hadn't come across that particular bit of software before, probably because it's Windows only, and I'm pretty much entirely on Mac these days (for my day job requirements). MS-DOS Player is obviously a way more feature complete emulation and handles full screen text mode DOS programs.

Let me know how you get on and what other programs you'd want to run. I'll probably look into getting Microsoft Assembler + Linker running at some point.

XT - Run MS-DOS command line programs on macOS.
https://github.com/electricbolt/xt-swift-usermode

Reply 4 of 9, by mattnz

User metadata
Rank Newbie
Rank
Newbie
GloriousCow wrote on 2025-05-27, 17:26:

Glad you found them useful! It's always great seeing another emulator take advantage of them.

I wouldn't had bothered writing this if the test suite wasn't available. Like everyone else on this forum, it's been 35 years since i've done any 8086 assembler so I was very rusty on all the opcodes, segmented memory addressing etc. I must get on with implementing my unit test framework now, the original goal.

XT - Run MS-DOS command line programs on macOS.
https://github.com/electricbolt/xt-swift-usermode

Reply 5 of 9, by mattnz

User metadata
Rank Newbie
Rank
Newbie

1.0.1 now released with updated xt (macOS/Linux) and xt.bat (Windows) scripts to allow running XT from anywhere on your system (assuming PATH is set).

XT - Run MS-DOS command line programs on macOS.
https://github.com/electricbolt/xt-swift-usermode

Reply 6 of 9, by mattnz

User metadata
Rank Newbie
Rank
Newbie

Quick update. I've converted several scans of the 8086 Relocatable Object Module Formats PDF's into an editable Word document named OBJ.docx (and then saved that as a readable PDF named OBJ.pdf). So for anyone (like myself) interested in the .OBJ format from Turbo Assembler etc, this is super useful. Files are in the doc/ directory of the xt repo.

GitHub: https://github.com/electricbolt/XT/blob/main/doc/OBJ.pdf

XT - Run MS-DOS command line programs on macOS.
https://github.com/electricbolt/xt-swift-usermode

Reply 7 of 9, by DosWorld

User metadata
Rank Newbie
Rank
Newbie

obj is "ugly child". Also, avaible "Microsoft OBJ" and "Borland OBJ". Yes, all of them support one format. But in own way.
Check this:

https://github.com/DosWorld/rtools
https://github.com/DosWorld/rtools/blob/maste … /DOC/RDOFF2.TXT
http://github.com/DosWorld/rtools/tree/master/EXAMPLES

CPU: Amd K6/450, RAM: 256M, VIDEO: S3Trio V+, SOUND: EWS64XXL/64M
CPU: iP/100, RAM: 16M, VIDEO: S3Trio V+, SOUND: SB AWE32
IBM Aptiva, CPU i486DX/80, RAM: 96M
Compaq Contura 4/25 2820D, CPU: i486SX/25, RAM: 4M, VGA.
HP 200LX/2M

Reply 8 of 9, by mattnz

User metadata
Rank Newbie
Rank
Newbie

Hi all,

I've released version 2.0.0, which has been rewritten entirely in Swift, and therefore now only targets macOS 26+ (Apple Silicon only). New in this version:

* Same super friendly developer experience for adding new interrupt handling using a combination of Swift property wrappers and annotations:

@Interrupt(function: 0x09, description: "Write string to standard output")
func writeString(_ cpu: CPU, @ASCIZ(terminator: "$") @DS @DX _ s: String) {
Foundation::write(STDOUT_FILENO, s, s.count)
cpu.reg.AL.setValue(("$" as Character).asciiValue!);
}

* Installed via macOS package (signed and notarized). Automatically installs "xt" to /usr/local/bin.
* Now runs MASM 5.10, LINK 3.65 and Undocumented DOS book's MEM.EXE.
* Larger integration test suite.
* Ability to convert MS-DOS command line programs into native macOS apps. e.g. "xt app MASM.EXE masm".
* The CPU emulator is now a Swift Package (https://github.com/electricbolt/xt-swift-cpu8088) available to import into other projects as required.

https://github.com/electricbolt/xt-swift-user … .0/xt-2.0.0.pkg

XT - Run MS-DOS command line programs on macOS.
https://github.com/electricbolt/xt-swift-usermode

Reply 9 of 9, by Jo22

User metadata
Rank l33t++
Rank
l33t++
mattnz wrote on Today, 00:15:

and therefore now only targets macOS 26+ (Apple Silicon only).

Hi, that makes sense, though I really hope there's a future chance to get Swift/Xode 27 to produce applications that will run on Sequoia 15.6+.
Because macOS 26 with the rounded corners is ugly.
It would be a bit depressing to think that good software now requires macOS 26+. IMHO.
But of course, that's a bit off-topic. Please never mind.

Edit: I've searched the web a bit and there's an undocumented switch that enables Xcode 27 Beta to compile to old OS targets again (pre OS X 12).
So maybe, eventually, there's some hope for Swift, too.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//