What is this?

I have a genuine IBM 5160 XT, manufacturing date November 1984. It's equivalent in almost all aspects to the IBM 5150 PC, which is the direct ancestor of the machine I'm writing this on (and, almost certainly, the machine you're reading this on). I've decided to allow anybody who wants to (and who can access this web page) to run programs on this XT.

How can I write a program that will run on the XT?

I suggest writing assembly code and assembling it with yasm (though it other compilers or assemblers capable of targetting 8088/8086 should also work). Use "org 0" and "cpu 8086" at the beginning of your program. The CPU in the XT is an 8088, which uses the same instruction set as the 8086. The bootloader program that loads your code onto the XT loads it as low in memory as possible (right after the bootloader) and starts it with IP=0. The program may be more than 64K, though if it is too long it will stamp on the stack (which is just under the 640K boundary) and crash.

What software is installed?

None, except for the standard IBM BIOS and my bootloader. There is no DOS on the machine, so DOS calls cannot be used unless you include a DOS as part of your program.

How do I obtain output from my program?

Any data that you send over COM1 (115200 baud, 8 data bits, 1 stop bit, no parity) will be returned over the web interface to you. I have provided some interrupts to make this easier:

Interrupts 0x63, 0x64 and 0x65 will write data to the screen as well as the serial port unless int 0x69 is executed first.

What hardware does the XT have installed?

If you have any other pieces of compatible (and not too noisy) hardware that you'd to send me for connection to the machine, they would be very welcome. In return, your requests would get priority processing.

Can I have an example "Hello World" program to get started?

Sure:


org 0
cpu 8086

  mov ax,cs
  mov ds,ax
  mov si,message
  mov cx,messageEnd-message
  int 0x64
  int 0x67

message:
  db "Hello, World!",10
messageEnd:

How does the remote access software work?

The power good line has a pulldown line spliced in and connected to an Arduino, enabling the machine to be remotely power cycled. After a power cycle, the Arduino pretends to be the IBM manufacturing test device connected to the keyboard port. This loads my bootloader code into the XT early in the BIOS boot sequence, allowing the RAM test (which takes ages) to be skipped. Once the bootloader is in place it watches for data from COM1 (i.e. your program), copies it into RAM and executes it.

All the code for this is available on my github, along with many other example programs.

Where can I find information about 8088 assembler programming and PC/XT BIOS calls and hardware?

This tutorial seems to be a good start.

HELPPC is an excellent reference, and was the main resource I used when I started learning 8086 assembler, along with the A86 manual.

minuszerodegrees.net has a wealth of excellend technical information and manuals, including the IBM Technical Reference manual which is an excellent hardware reference (including BIOS listings and schematics).

If you have other suggestions for links to add here, let me know and I'll add them.

How can I see what's on the screen?

There is a TV capture card connected to the CGA's composite output. Sending byte 0x01 over the serial link or executing int 0x60 will cause the current screen image to be captured, saved as a .png file and embedded into the HTTP output. Note that there may be a delay between when this command is issued and when the screenshot is actually taken, so be sure to delay for a few seconds before ending the program or displaying a different image.

How can I hear what's coming out of the PC speaker?

The PC speaker is currently disconnected so that you can't drive me crazy by making annoying noises with it. However, it is connected to a sound card. Executing int 0x61 and int 0x62 will start and stop audio recording respectively, and the latter will cause the audio to be embedded into the HTTP output.

Can you run the assembler on the server so that I can just upload an assembler program?

I don't know of an assembler that is designed to be safe to use with untrusted input. So this will have to wait until I write my own assembler (which may take a while).

I would like to run proper .COM and .EXE files. Also boot from disk images.

Stay tuned, this feature is coming soon.

My program doesn't work - will you help me debug it?

Maybe, if it's an interesting program, or if it seems be a problem with the server software. I won't do your homework for you, though.

Aren't you worried about killer pokes?

No - see this thread on VCF for details.

I'd like to be able to run XT programs from the command line.

Here is a perl script (thanks to Egan Ford) which you can use to automate calls to the API. It may need to be renamed to submit.pl before use.

William Jones (cr1901) has created a Rust binary called `xtpost` to talk to the server. `xtpost` will scrape any serial output, a captured image, a written file, and captured audio from the server and download it locally (See `xtpost cfg -d` for details). You can set an email to use using `xtpost cfg -e`.

Binaries for Linux, OS X, and Windows are provided here. If you want/need to compile it yourself, you can download a toolchain here. Clone the source,and run `cargo build --release` at the root of the tree to compile your binary (available under `target/release`).

Will you claim any kind of ownership of programs I upload here?

No, you keep the copyright on your programs. I will not redistribute them, but I will keep logs and copies of any programs sent so that I can debug if someone manages to send a program that breaks the server. Please don't do anything illegal with this system.

Why do you want my email address?

If the web browser becomes disconnected before your program completes, providing your email address will allow you to get the results anyway, without having to re-run the program. I may also want to send you an email if you run a program that breaks something, if I have a question about your program or if it's just a really awesome program and I want to congratulate you on it. I won't send your email address to anyone else without explicitly asking permission first.

How can I contact you?

Send email to me, andrew@reenigne.org.

What is the current status of the XT server?

The XT server is currently in an unknown state. It may be unreliable at the moment due to new features being added.

How do I run my program?

Upload it into this form:

Thanks to Free DNS from afraid.org for the dynamic DNS.