Coder Social home page Coder Social logo

xmachine's Introduction

xmachine

A PDP-11 themed virtual machine.

The goal

While away my waking hours keeping myself amused.

What?

Oh right. Building this "thing". You'll need clang and make. Armed with those tools, run the following:

make all

You'll end up with a newly created bin/ directory containing this stuff.

Alright... now what?

With bin/xmachine built you can now do some stuff. Namely, run some simple PDP-11 assembly programs. For generating the machine code, I've been using MACRO-11. Currently, only loading a OBJ file with no offsets is supported. Basically, I just grab the TEXT section and load it into memory.

xmachine

Take your shiny new OBJ file generated by MACRO-11 and run:

bin/xmachine -o foo.obj

Usage

bin/xmachine -o <OBJ file>

Options:
    -d <disk image>     : file to use with the disk controller

Why?

Bit operations are fun, probably because I don't get to do much of that stuff in my working life. Something about working on simple virtual machines is fun. Probably because (in the simple cases at least) there's not much time investment until you have a program that does your limited bidding courtesy of a program written in its language. And finally, getting used to octal is interesting. I know there's not much to get used to, but having lived my life never having to think about it outside of file permissions, it's a change from hexadecimal.

This will probably never be finished, or useful. The more I end up working on these things, I don't think that was the goal anyway. In any case, this might morph into more of a PDP-11 as time goes on. Right now I'm just borrowing its opcode format and some registers, while having fun.

References

  • Michael Singer, PDP-11. Assembler Language Programming and Machine Organization, John Wiley & Sons, NY: 1980.
    • This helped me out with immediate addressing, as the Wikipedia article, while pretty good, is a little unclear for someone who never programmed a PDP-11 in their lifetime.

DEC Manuals

You can find most of these on bit savers or bit saver mirrors.

  • EK-RX01-0P-001 RX8/RX11 floppy disk system user's manual, Digital Equipment Corporation: 1976.
  • PDP11/40 Processor Handbook, Digital Equipment Corporation: 1972.
  • DEC-11-HIAA-D Unibus Interface Manual, Digital Equipment Corporation: 1970.
  • PDP11 Peripherals Handbook, Digital Equipment Corporation: 1976.
  • RT-11 Volume and File Formats Manual, Digital Equipment Corporation: 1991.

xmachine's People

Contributors

zni avatar

Watchers

 avatar

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.