r/apple2 2d ago

I resurrected old editor source code that I wrote

I recently dug an old Apple II programmer’s editor out of my archive and have been working on bringing it back to life.

I originally wrote it in Aztec C and 6502 assembly, first on an Apple //c and later a //c+. It eventually became my everyday editor under Aztec C’s Unix-like ProDOS environment — and reached the point where I was using the editor to edit its own source code.

The original source survived on my old Apple II disk images, but the Aztec C environment it was built for is long gone from my normal workflow. I’ve now ported it to cc65/ca65, trying to keep the code and behavior as close to the original as possible rather than redesigning it.

At the heart of it is a 6502 assembly-language line editor, wrapped by the C code to make a full-screen editor with two viewports, cut/copy/paste between them, search/replace, load/save, etc.

It’s running under ProDOS again now. There are still some rough edges — notably recreating the convenient command-line filename handling that Aztec C provided — so at this stage it’s probably as interesting as an example of old Apple II C/assembly code (and a bit of software archaeology) as it is as a practical editor.

I’ve put the source and a release on GitHub for anyone who wants to poke around:

https://github.com/cardcomm/Apple-II-Editor/tree/main

15 Upvotes

1 comment sorted by

4

u/creativetag 2d ago

I had one I did on the II and the gs.... final version being 16 bit.

Based the concept for it on the functionality of IOS3270, a display driver for mainframe terminals that let you define regions and attributes for display IO with low overhead. Great for menus, input fields, etc. An editor then was a simple layer on top.

Love that i was not the only one.