S-C DocuMentor: Applesoft

The S-C DocuMentor for Applesoft provides the most complete documentation of Applesoft internals available anywhere. You will find the information educational, entertaining, and extremely helpful.

The information contained in the comments and labels has been gleaned from many sources over the years since 1978. (There has been no direct involvement of Apple Computer, Inc., in this project.) I have tried my best to provide meaningful, helpful comments and labels throughout. Nevertheless, there may be some mis-interpretations. If you find any errors or have suggestions for improvements, please send them to me.

Many of the label names are deliberately made the same as those published in "Applesoft Internals", by John Crossley. This article first appeard in Volume 1, No. 1, of the Apple Orchard (magazine of the International Apple Corps). It has been re-printed since by various clubs, including Call A.P.P.L.E. in their book "All About Applesoft".

I have flagged about a half dozen bugs in the listing, and several areas of very "improve-able" code. These are marked with "<<<" and ">>>" at each end of the comment lines.

For many years there was only one version of the Applesoft code, as it was distributed in ROM in the Apple II, IIplus, and IIe computers. When the IIc and enhanced IIe were introduced, changes were finally made to the Applesoft ROMs. The IIgs includes still more changes. None of these changes are reflected in the source code included here. Primarily the changes involved removing cassette tape support and adding 80-column support.

You can determine what code is different by comparing the binary object file produced by assembling the DocuMentor code with the code in ROM:

  1. Assemble the S-C DocuMentor source code using the S-C Macro Assembler.
  2. From within BASIC.SYSTEM, BLOAD the object file B.FP at $2000.
  3. Go to the monitor by typing CALL-151.
  4. Compare the code with 2000 Disassemble the areas which differ, using the monitor's L command.

Assembled Source Code

The source code is in 26 separate files, named for the corresponding address in the Applesoft ROM. The S-C Macro Assembler uses .IN operators to include source files, and I use a file named S.ACF to hold all the .IN lines. [In the original S-C Documentor, a .PG line came after each .IN line, so that the assembly listing would start a fresh page for each included source file. I have omitted the .PG lines below, to shorten this page.] Click on a file name below to see the assembly listing of that file.

1000 *SAVE S.ACF
1020  .OR $D000
1030  .TF B.FP
1060   .IN S.D000
1080   .IN S.D260
1100   .IN S.D365
1120   .IN S.D52C
1140   .IN S.D766

1160   .IN S.D912
1180   .IN S.DACF
1200   .IN S.DCF9
1220   .IN S.DD7B
1240   .IN S.DEF9

1260   .IN S.DFE3
1280   .IN S.E1B8
1300   .IN S.E3C5
1320   .IN S.E597
1340   .IN S.E7A0

1360   .IN S.E913
1380   .IN S.EB72
1400   .IN S.EC4A
1420   .IN S.ED0A
1440   .IN S.EE8D

1460   .IN S.EFEA
1480   .IN S.F1D5
1500   .IN S.F3D8
1520   .IN S.F49C
1540   .IN S.F5BA

Assembly Symbol Table

Derivative Works

Several enterprising authors have written excellent articles recently giving credit to the S-C Documentor as one of their information sources.