This version of the assembler is no longer supported. The Ophis assembler is now its own project, and should be far easier to install and use.

For historical reasons, or for people who prefer the old Perl code, the old versions are available below.

The P65 Assembler

The P65 assemblers are assemblers for the 6502 microprocessor (such as is used in the Commodore 64, Apple II, and Nintendo Entertainment System). They are designed to be able to support a wide variety of output formats, both to support multiple target platforms and to produce code for emulators.

The eventual goal of P65 is to be as expressive as the more powerful assemblers of the late 80s, such as DASM. It's not there yet, but it's getting there.

If you are here because you have a ".p65" file and you don't know how to deal with it, you're probably dealing with a PageMaker file.

P65-Perl is no longer being supported, in favor of the "Ophis" Python-based releases. See news.

Features of P65


17 Jul 2003: Double Oops. The parser was not properly handling indexed LSR instructions. 0.7.2 is has just been uploaded to fix this.

10 Jul 2003: Oops. A bug in 0.7 caused it to fail to accept macros with no arguments. I had a patch for this once upon a time, but it wasn't available from this website. Version 0.7.1 of Ophis has been uploaded to deal with this.

1 Jan 2003: Version 0.7 of Ophis is complete. The tutorial is currently only in text file format, but it is included with the distribution. I'll HTMLize it and put it online at a later date. A new command reference is ready.

31 Dec 2002: Version 0.7 of Ophis is being readied. The code is done; only documentation remains. Version 0.7 adds macros and a new "require" directive to prevent multiple inclusion. Look for a release, complete with an extensive, completely rewritten tutorial, in January 2003.

28 Nov 2002: Version 0.2 of Ophis has been released, adding big-endian data support and named temporary variables. Only repetition and macros remain before the late-beta 0.9 release.

15 Aug 2002: Version 0.1 of Ophis has been released. Not all features in the draft have been supported yet. Ophis.Main is the "main program."

8 Aug 2002: Read the draft for the new command reference for P65-Ophis.

26 Jul 2002: P65 has been quite an experience, but most of the feedback I've gotten on it has involved powerful features that are going to be very difficult to implement in Perl. P65 is thus moving away from Perl and being reimplemented in Python. A vast number of new abilities will come with this, including ease of extension (write your own optimization passes!), macros, a lexical scoping system, full expressions, and all of the old features of P65. I'm not going to guarantee backwards compatibility, but only minor changes should be needed. The goal is to produce a portable cross-assembler that's open, free, and at least as powerful as TASM and DASM.

9 Apr 2002: Fixed up the P65 tutorial to cover segments. We are back in business.

21 Mar 2002: The HKN server suffered a massive crash a few weeks back which destroyed a lot of the documentation. Thanks to WebArchive (and a timely email from a reader, for which I am most grateful), I recovered the 1.0a era pages. The tutorial is now out of date compared to the command reference and implementation notes, but at least it's a start. Version 1.1 got released in the news interregnum, as well.

3 Jan 2002: Made some bug repairs, and tightened error checking. Newest version is now 1.0a. Incidentally, P65 is being tracked on freshmeat which will let you automatically be informed of updates and such.

14 Dec 2001: P65 1.0 has finally been fully released. The site has been redesigned a good bit too, as I migrate non-P65 material off onto its own page elsewhere.

9 Dec 2001: P65 1.0 is complete, but not documented. I'm making it available for download now, and updating the documentation once I get time to do that (soon).

5 Dec 2001: I'm going to be working on enhancing 0.3 still further over Christmas break - this will tentatively be the 1.0 release. It will have a much stricter grammar as well as support for more pragmas. It will also have anonymous label capability, and the ability to do computations based on the current program counter (allowing for re-linkable data).

3 Dec 2001: Version 0.3 is released! This uses a greatly enhanced lexer/parser that can catch many more errors and cleans up the resulting code considerably. String support is also greatly enhanced. The new design also permits more expansions; I'm already workout out the next release, which will not be source compatible with 0.3 or 0.1. Pragmas will be more tightly integrated with the rest of the program code, and opcode validity will be checked more carefully - this will break the traditional uses of a number of rather important pragmas (like .include). The changes to the source will be fairly trivial, though.


See the Links page for more resources.


P65 releases

Comments may be sent to If you actually use P65 for something significant, do let me know.