ATARI A Warner Communications company.

400/800™

ATARI HOME COMPUTER SYSTEM

OPERATING SYSTEM
SOURCE LISTING


The original text of this document contained a full listing of the Atari OS version B source code. Someone scanned it into greyscale jpg images and incorporated them into a pdf file. The result was barely readable (grey scales and jpg are wrong choices for storing text) and the pdf file was huge (about six megabytes). Extracting screen shots for OCR was not practical, as the poor quality resulted in excessive human intervention.

Sidney Cadot has reverse-engineered source code from the XL ROM binaries, with the help of da65 - an intelligent 6502 disassembler from the excellent cc65 software suite. You can specify information about various labels and tables, then da65 will insert them into the disassembly. Although it cannot do everything - such as coping with multiple usage labels for same bytes, it will do the bulk of the work required.

Sidney had not done the same for the OS version B source code, but he did have the original Atari Technical Reference notes. He kindly fed them through his scanner (with automated sheet feeder) and a couple of hours later had some decent quality (300 DPI) monochrome scans. A massive 60 megabytes of PNG images in a zip file!

These scans were certainly far better than the jpg/pdf file, but the OCR was still having a hard time because the original document was dot matrix printed. I managed to get 13 pages done. The last 27 pages were auto-generated information about labels and cross-references. That still left 114 pages of tedious work to do.

I decided to compromise by disassembling the remaining pages (with da65) which would at least provide source code that could be assembled. Although without the original comments, these could be added in gradually as time allowed.

atari_os_B_dis.bat. - disassembles the ROM, then assembles it to check it can do so.
atari_os_B_dis.inf.txt. - the information file for da65
atari_os_B_dis.s.txt - disassembled source, automatically generated file.

I appended .txt to the usual file names so web browsers can recognise them as text files.

atari_os_B_asm.bat. - assembles the source above.
atari_os_B_src.s.txt - source code, part as per original documentation with comments, but mostly from the automatic disassembly.
Note that this file is supplied 'as is': neither complete nor checked!

The original source code listing seemed to jump around a lot and was a bit confusing to follow - especially when comparing with the orderly output of the disassembly.
Therefore the eventual intention here is to cut the source into modular sections to make it more manageable. The listing will not look identical to the original, bu this is partly inevitable from having to use the modern cc65 tool set instead of the original assembler. I hope you find this acceptable, and just as useful (which is the spirit of the text, if not the letter).


PAGES 1 TO 14 OF 128 ENTERED, 114 MORE TO GO!