Introduction
The Apple II family (the Apple II, II Plus, IIe, IIc and, in emulation mode, the IIgs) runs a 6502, or on the enhanced IIe, IIc and IIgs a 65C02. Its programs live as files on DOS 3.3 and ProDOS disks. A file carries no type of its own: the disk's catalogue says whether it is an Applesoft program, an Integer BASIC program or machine code, and for machine code where it loads.
There is no .a2f file on a real disk. The name is the one the explorer gives to a file it opens from an
Apple II disk image, with what the catalogue said put in brackets:
HELLO [APPLESOFT].a2f, COPY [INTEGER].a2f, LOADER.OBJ0 [BIN A1000].a2f. A file dropped by
itself with another name is shown as Applesoft if its bytes read as an Applesoft program, as Integer BASIC if they read as
one, and as machine code otherwise.
The three kinds
- Applesoft BASIC – a chain of lines with a next-line address, a line number, tokens
$80to$EA, and a zero byte (DOS 3.3 typeA, ProDOSBAS) - Integer BASIC – lines with a length byte, a line number and tokens, ending in
$01(DOS 3.3 typeI, ProDOSINT) - Machine code – disassembled from its load address with the 6502 or 65C02 decoder, with the Monitor routines, soft switches and zero-page locations named (DOS 3.3 type
B, ProDOSBINandSYS)
In the explorer
Open a disk image, then a file in it. A BASIC program is shown as a tree of its lines (each with its fields) and as a listing; machine code is shown disassembled with the shared 6502-family decoder. The options bar has the processor (6502 or 65C02), the load address and the start address. DOS 3.3 text files and ProDOS text files open as text with the high bit removed and carriage returns as line ends.
Not described
Known, not yet covered
- Viewer: the disassembly decodes every byte as an instruction (it does not follow code from the start address), and a file that mixes code and data shows the data as instructions.
- Viewer: the 65C02 differences of the Rockwell and WDC parts beyond what the shared decoder offers, and the 65C816 of the IIgs in native mode, are not decoded.
- Reference: the zero-page and system labels are those of the Monitor and Applesoft; DOS 3.3 and ProDOS internal addresses beyond the ones on the labels page are not named.
Unknown
- Reference: the Integer BASIC keyword table was written from the published list and checked on the real programs of the DOS 3.3 System Master, not against an Integer BASIC ROM listing (none could be read here); see Integer BASIC.
- Viewer: no file type of a DOS 3.3 disk other than
A,I,BandThas a reader, because nothing on this Mac holds anSorRfile to check one against.
Links
Software
- Apple II JS – Apple II emulator that runs in the browser (any browser)
- AppleWin – Apple II emulator (Windows)
Reference
- Apple II documentation archive – scans of Apple's manuals, including the Applesoft and Monitor references