!lm10
!rm76
DOS Disassembly:  $B052-B0B5 AND $B35F-B7FF

Everything from $B800 through $BFFF has now been covered in previous issues of AAL.  Also, the 3.3 boot ROM was covered in the August issue.  In this issue I present the rest of the boot code and part of the File Manager (FM).

Lines 1000-1570 are a subroutine inside FM which calls RWTS.  The main entry at line 1170 assumes (A)=opcode, (X)=track, and (Y)=sector.  A subsidiary entry at line 1200 assumes (A)=opcode, and track and sector were already set up.  The valid opcodes are SEEK=0, READ=1, WRITE=2, and FORMAT=4.

Lines 1580-1970 are the various exits from FM.  Upon exit, (A)=error code and CARRY status is set if there was an error, clear if not.

Lines 1980-2560 are various buffers, constants, and variables for FM.  Notice there are some apparently unused bytes in this area.

Lines 2570-3690 are what is written on track 0 sector 0.  It loads and executes BOOT.STAGE1 at $0800 (execution starts at $0801).  This code reads in RWTS and BOOT.STAGE2.  Since most of this area was unused, patches to solve the APPEND problem are here (lines 3020-3640).

Lines 3700-4080 are BOOT.STAGE2, which read in the rest of DOS and jump to $9D84.

Routines to write the DOS image on tracks 0-2, to enter RWTS with interrupts disabled, and to clear a 256-byte buffer are in lines 4090-4990.

Lines 5100-5300 are the IOB and DCT used by FM for all calls to RWTS.  The contents of these are described in the DOS Reference Manual pages 95-98.
