+------------------------------------------------------------------------
  |
  |      DISK-DRIVE 1541: ZEROPAGE AND EXTENDED ZEROPAGE
  |
  +------------------------------------------------------------------------
  |
  | Zeropage:
  |
  |   $00/0                 Command code for buffer 0
  |   $01/1                 Command code for buffer 1
  |   $02/2                 Command code for buffer 2
  |   $03/3                 Command code for buffer 3
  |   $04/4                 Command code for buffer 4
  |   $05/5                 Command code for buffer 5 (unused)
  |   $06-$07/6-7           Track and sector for buffer 0
  |   $08-$09/8-9           Track and sector for buffer 1
  |   $0A-$0B/10-11         Track and sector for buffer 2
  |   $0C-$0D/12-13         Track and sector for buffer 3
  |   $0E-$0F/14-15         Track and sector for buffer 4
  |   $10-$11/16-17         Track and sector for buffer 5 (unused)
  |   $12-$13/18-19         Disk ID, drive 0
  |   $14-$15/20-21         Unused (was: Disk ID, drive 1)
  |   $16-$17/22-23         Header block: ID
  |   $18/24                Header block: Track
  |   $19/25                Header block: Sector
  |   $1A/26                Header block: Parity
  |   $1B/27                Unused
  |   $1C/28                Flag for disk change, drive 0
  |   $1D/29                Unused (was: Flag for disk change, drive 1)
  |   $1E/30                Flag for write protect sense, drive 0
  |   $1F/31                Unused (was: Flag for write protect sense, drive 1)
  |   $20/32                Drive 0 status (disk and step motor)
  |   $21/33                Unused (was: Drive 1 status (disk and step motor))
  |   $22/34                Current track for drive 0
  |   $23/35                Flag for 1541 (0), 1540 (not 0)
  |   $24-$2B/36-43         Scratch pad of GCR conversion
  |   $2C-$2D/44-45         Unused
  |   $2E-$2F/46-47         Pointer for temporary storage
  |   $30-$31/48-49         Buffer pointer for disk controller
  |   $32/50                Pointer: active track
  |   $33/51                Pointer: active sector
  |   $34/52                Pointer to last converted byte
  |   $35/53                Not used (decode error, GCR)?
  |   $36/54                Byte counter for GCR/BIN conversion
  |   $37/55                Unused
  |   $38/56                Constant 7, ID mark for start of data block
  |   $39/57                Constant 8, ID mark for start of block header
  |   $3A/58                Parity for data buffer
  |   $3B-$3C/59-60         Unused
  |   $3D/61                Motor flag
  |   $3E/62                Active drive (FF, if not active)
  |   $3F/63                Buffer number for disk controller
  |   $40/64                Byte counter for GCR conversion
  |   $41/65                Number of next work in queue (0 - 5)
  |   $42/66                Destination track (to move R/W head to)
  |   $43/67                Number of sectors per track for formatting
  |   $44/68                Temp. work area; Scratch pad
  |   $45/69                Work code temp. storage
  |   $46/70                Unused
  |   $47/71                Data block ID char, default 07.
  |   $48/72                Counter for head movement
  |   $49/73                Stack pointer temp. storage [39]
  |   $4A/74                Step counter for head transport
  |   $4B/75                Temp. storage
  |   $4C/76                Last read sector
  |   $4D/77                Next sector
  |   $4E-$4F/78-79         Pointer to buffer for GCR->BIN conversion
  |   $50/80                Flag for GCR format (0=BIN, 1=GCR)
  |   $51/81                Current track number for formatting [FF]
  |   $52-$55/82-85         Storage for 4 BIN bytes for GCR coding
  |   $56-$5D/86-93         Storage for 5 GCR bytes
  |   $5E/94                Number of steps for head motor accel./decl. [04]
  |   $5F/95                Accelerating/decl. factor [04]
  |   $60-$61/96-97         Unused
  |   $62-$63/98-99         Pointer to routine for head movement [FA05]
  |   $64/100               Minimum number of steps [C8]
  |   $65-$66/101-102       UI vector [$EB22]
  |   $67/103               Flag: NMI
  |   $68/104               Flag for disk initialisation
  |   $69/105               Step size for sector division [0A]
  |   $6A/106               Number of read attempts [5]
  |   $6B-$6C/107-108       Pointer: Start of Jump table for U commands [FFEA]
  |   $6D-$6E/109-110       Pointer: Start of bitmap [0400]
  |   $6F-$70/111-112       Pointer to address for M & B commands
  |   $71/113               Temp. work area
  |   $72/114               Temp. work area [FF]
  |   $73/115               Temp. work area
  |   $74/116               Temp. work area
  |   $75-$76/117-118       Indirect pointer [0100]
  |   $77/119               Listener address (Device number + $20) [28]
  |   $78/120               Talker address (Device number + $40) [48]
  |   $79/121               Flag: Active listener
  |   $7A/122               Flag: Active talker
  |   $7B/123               Unused
  |   $7C/124               Flag for ATN from serial bus receiving
  |   $7D/125               Flag for ATN on serial bus active
  |   $7E/126               Last handled program
  |   $7F/127               Drive number (on 1541 always 00)
  |   $80/128               Current Track number
  |   $81/129               Current Sector number
  |   $82/130               Channel number (Logical index)
  |   $83/131               Secondary address
  |   $84/132               Original Secondary address [6F]
  |   $85/133               Current Data byte [3F]
  |   $86-$8A/134-138       Temp Results
  |   $8B-$8E/139-142       Work storage for division
  |   $8F-$93/143-147       Work storage
  |   $94-$95/148-149       Current buffer pointer
  |   $96-$97/150-151       Unused
  |   $98/152               Bit counter for Transmission
  |   $99-$9A/153-154       Pointer: Next byte in buffer 0 [0300]
  |   $9B-$9C/155-156       Pointer: Next byte in buffer 1 [0400]
  |   $9D-$9E/157-158       Pointer: Next byte in buffer 2 [0500]
  |   $9F-$A0/159-160       Pointer: Next byte in buffer 3 [0600]
  |   $A1-$A2/161-162       Pointer: Next byte in buffer 4 [0700]
  |   $A3-$A4/163-164       Pointer: Next byte in command buffer [0200]
  |   $A5-$A6/165-166       Pointer: Next byte in error message buffer [02D6]
  |   $A7-$AD/167-173       Table: Non-active channel numbers for each buffer
  |   $AE-$B4/174-180       Table:
  |   $B5-$BA/181-186       Table: Record # low , block # low
  |   $BB-$C0/187-192       Table: Record # high, block # high
  |   $C1-$C6/193-198       Write pointer for REL file
  |   $C7-$CC/199-204       Table: Record length for REL file
  |   $CD-$D2/205-210       Table: Side sectors
  |   $D3/211               Pointer to first filename
  |   $D4/212               Pointer in record for REL file
  |   $D5/213               Side sector number
  |   $D6/214               Pointer to data block in side sector
  |   $D7/215               Pointer to record in REL file
  |   $D8-$DC/216-220       Directory sectors
  |   $DD-$E1/221-225       Index: Directory
  |   $E2-$E6/226-230       Default disk drive [00]
  |   $E7-$EB/231-235       File type (wild cards, @, closed)
  |   $EC-$F1/236-241       File type (channel)
  |   $F2-$F7/242-247       Channel status
  |   $F8/248               Flag for EOI
  |   $F9/249               Current work (Buffer number)
  |   $FA-$FE/250-254       Last used table
  |   $FF/255               Flag: Drive 0 not ready
  |
  | Extended Zeropage:
  |
  |   $0100/256             Flag: Drive 1 not ready
  |   $0101/257             Format marker, drive 0
  |   $0102/258             Format marker, drive 1
  |   $0103/259             Unused
  |   $0104-$0145/260-325   Stack area
  |   $0146-$01B9/326-441   Unused
  |   $01BA-$01FF/442-511   Buffer for GCR code
  |   $0200-$0229/512-553   Buffer for command string
  |   $022A/554             Command code
  |   $022B/555             Logical index, channel 0
  |   $022C/556             Logical index, channel 1
  |   $022D/557             Logical index, channel 2
  |   $022E-$0243/558-579   Last read/written byte for each channel
  |   $0244-$0249/580-585   Pointer: Last char on channel.
  |   $024A/586             Type of active file
  |   $024B/587             String length
  |   $024C/588             Temp. channel number (secondary address)
  |   $024D/589             Current work with drive number
  |   $024E/590             Work area to find the best sector
  |   $024F-$0250/591-592   Buffer allocated
  |   $0251/593             Flag: BAM changed, drive 0
  |   $0252/594             Flag: BAM changed, drive 1
  |   $0253/595             Flag for directory entry found
  |   $0254/596             Flag for directory output
  |   $0255/597             Flag: Waiting for command
  |   $0256/598             Bitmap of free channels
  |   $0257/599             Last used buffer
  |   $0258/600             Record length
  |   $0259/601             Track of side sector
  |   $025A/602             Sector of side sector
  |   $025B-$025F/603-607   Last work (buffers)
  |   $0260-$0265/608-613   Directory sector (buffers)
  |   $0266-$026B/614-619   File's index in directory (buffers)
  |   $026C/620             Counter for LED flash
  |   $026D/621             Error LED
  |   $026E/622             Drive for last program
  |   $026F/623             sector for last program
  |   $0270/624             Write LINDX
  |   $0271/625             Read LINDX
  |   $0272-$0273/626-627   Number of blocks (temp)
  |   $0274/628             Length of input line
  |   $0275/629             Char to interpret
  |   $0276/630             Index: End of filename in command buffer
  |   $0277/631             Temporary storage
  |   $0278/632             Temporary storage
  |   $0279/633             Temporary storage
  |   $027A-$027F/634-639   Pointer table: Filenames
  |   $0280-$0284/640-644   Track of a file
  |   $0285-$0289/645-649   Sector of a file
  |   $028A/650             Flag: wild cards
  |   $028B/651             Command syntax byte
  |   $028C/652             Number of drive(s) to look for
  |   $028D/653             Flag: Looking for drive
  |   $028E/654             drive with last write/open error, used as default
  |   $028F/655             Flag: Found in directory
  |   $0290/656             Directory sector
  |   $0291/657             Sector for first available file
  |   $0292/658             Index (in directory) for first available file
  |   $0293/659             For the last directory entry 0
  |   $0294/660             Current buffer-index
  |   $0295/661             Counter: Files
  |   $0296/662             Flag: Name matching wild cards
  |   $0297/663             Active operating mode (R or W)
  |   $0298/664             Flag: Work return
  |   $0299/665             Pointer: Re-read error
  |   $029A/666             Total tracks
  |   $029B-$029C/667-668   Pointer: BAM last update
  |   $029D-$02A0/669-672   BAM: image sector (drives 0 and 1)
  |   $02A1-$02B0/673-688   BAM image
  |   $02B1-$02D4/689-724   Buffer for directory output
  |   $02D5-$02F8/725-760   Buffer for error message
  |   $02F9/761             Flag: Don't write BAM
  |   $02FA-$02FB/762-763   Number of free blocks, low byte (drives 0 and 1)
  |   $02FC-$02FD/764-765   Number of free blocks, hi byte (drives 0 and 1)
  |   $02FE-$02FF/766-767   Stepper motor sequence
  |   $0300-$03FF/768-1023  Buffer 0
  |   $0400-$04FF/1024-1279 Buffer 1
  |   $0500-$05FF/1280-1535 Buffer 2
  |   $0600-$06FF/1536-1791 Buffer 3
  |   $0620/1568            Format: number of retries
  |   $0621+$0622/1569+1570 Format: expected track capacity
  |   $0623/1571            Format: number of read attempts
  |   $0624+$0625/1572+1573 Format: measured track capacity(?)
  |   $0626/1574            Format: temporary storage
  |   $0627/1575            Format: number of sectors/track
  |   $0628/1576            Format: current sector, verify counter
  |   $0700-$07FF/1792-2047 Buffer 4
  |   $07FF/2047            End of RAM
  |
  +------------------------------------------------------------------------