Acorn ADFS 1.30 Memory Map
Addresses outside the ROM used by Acorn ADFS 1.30 at run time — zero-page
workspace, RAM buffers, and memory-mapped I/O. For the ROM code
itself (&8000–&BFFF), see the
disassembly listing.
WD1770 floppy driver workspace (&A0–&A6)
| Address | Name | Access | Description |
|---|---|---|---|
&00A0 |
zp_floppy_error |
R/W | WD1770 floppy driver: result / error code from the last disc operation. |
&00A1 |
zp_floppy_control |
R/W | WD1770 floppy driver: control flags for the current operation (read vs write direction, etc.). |
&00A2 |
zp_floppy_state |
R/W | WD1770 floppy driver: transfer state-machine flags, rotated through as the operation proceeds. |
&00A3 |
zp_floppy_track |
R/W | WD1770 floppy driver: target track for the current operation. |
&00A4 |
zp_floppy_sector |
R/W | WD1770 floppy driver: target sector for the current operation. |
&00A5 |
zp_floppy_track_num |
R/W | WD1770 floppy driver: physical track number, adjusted for the selected head / side. |
&00A6 |
zp_floppy_dest_page |
R/W | WD1770 floppy driver: high byte of the host transfer address (destination page). |
Filing-system scratch space (&B0–&BF)
| Address | Name | Access | Description |
|---|---|---|---|
&00B0 |
zp_ctrl_blk_lo |
R/W | Pointer to the current OSWORD &72 disc-access control block, low byte. |
&00B1 |
zp_ctrl_blk_hi |
R/W | Pointer to the current OSWORD &72 disc-access control block, high byte. |
&00B2 |
zp_mem_ptr_lo |
R/W | Pointer to the host memory address for the current data transfer, low byte. |
&00B3 |
zp_mem_ptr_hi |
R/W | Pointer to the host memory address for the current data transfer, high byte. |
&00B4 |
zp_text_ptr_lo |
R/W | Pointer to the command / text string being parsed, low byte. |
&00B5 |
zp_text_ptr_hi |
R/W | Pointer to the command / text string being parsed, high byte. |
&00B6 |
zp_entry_ptr_lo |
R/W | Pointer to the current directory entry being scanned in the directory buffer, low byte. |
&00B7 |
zp_entry_ptr_hi |
R/W | Pointer to the current directory entry being scanned in the directory buffer, high byte. |
&00B8 |
zp_osfile_ptr_lo |
R/W | Pointer to the OSFILE control block, low byte. |
&00B9 |
zp_osfile_ptr_hi |
R/W | Pointer to the OSFILE control block, high byte. |
&00BA |
zp_wksp_ptr_lo |
R/W | Saved pointer into ADFS workspace, low byte. |
&00BB |
zp_wksp_ptr_hi |
W | Saved pointer into ADFS workspace, high byte. |
&00BC |
zp_buf_src_lo |
R/W | Source pointer for buffer copies, low byte. |
&00BD |
zp_buf_src_hi |
R/W | Source pointer for buffer copies, high byte. |
&00BE |
zp_buf_dest_lo |
R/W | Destination pointer for buffer copies, low byte. |
&00BF |
zp_buf_dest_hi |
R/W | Destination pointer for buffer copies, high byte. |
Filing-system workspace (&C0–&CF)
| Address | Name | Access | Description |
|---|---|---|---|
&00C0 |
zp_name_ptr_lo |
R/W | Pointer to the filename being matched, low byte. |
&00C1 |
zp_name_ptr_hi |
R/W | Pointer to the filename being matched, high byte. |
&00C2 |
zp_save_y |
R/W | Scratch save slot for the Y register (also reused to hold a file handle). |
&00C3 |
zp_save_x |
R/W | Scratch save slot for the X register (zero-page pointer base). |
&00C4 |
zp_osfind_y |
R/W | Saved Y register across OSFIND processing. |
&00C5 |
zp_osfind_x |
R/W | Saved X register across OSFIND processing. |
&00C6 |
zp_gspb_ptr_lo |
R/W | Pointer to the OSGBPB control block, low byte. The free-space-map compaction code at &A069 reuses this location as a scratch map index. |
&00C7 |
zp_gspb_ptr_hi |
R/W | Pointer to the OSGBPB control block, high byte. |
&00C8 |
zp_temp_ptr |
R/W | Temporary 4-byte pointer (byte 0) used for disc-sector address arithmetic, e.g. adding or subtracting a PTR offset. |
&00C9 |
zp_temp_ptr_1 |
R | Temporary 4-byte pointer, byte 1. |
&00CA |
zp_temp_ptr_2 |
R | Temporary 4-byte pointer, byte 2. |
&00CB |
zp_temp_ptr_3 |
R | Temporary 4-byte pointer, byte 3. |
&00CC |
zp_scsi_status |
R/W | Holds a SCSI status byte read back from the host adapter while waiting for the bus to settle. |
&00CD |
zp_adfs_flags |
R/W | Primary ADFS state flags, the most heavily consulted flag byte. Bit 6 = Tube in use; also records Tube presence and other per-operation conditions. |
&00CE |
zp_retry_count |
R/W | Retry counter for disc operations, decremented on each failed attempt. |
&00CF |
zp_channel_offset |
R/W | Index of the current open-file channel within the channel tables. |
MOS zero-page locations (&EF–&FF)
| Address | Name | Access | Description |
|---|---|---|---|
&00EF |
zp_osbyte_last_a |
R | MOS scratch: A on entry to the last OSBYTE / OSWORD. ADFS reads the OSWORD routine number here when dispatching OSWORD &72. |
&00F0 |
zp_osword_pb_ptr |
R/W | MOS scratch (X on the last OSBYTE / OSWORD): pointer to the OSWORD parameter block, low byte. ADFS reads the disc-access control-block address here. |
&00F1 |
zp_osword_pb_ptr_hi |
R | MOS scratch (Y on the last OSBYTE / OSWORD): pointer to the OSWORD parameter block, high byte. |
&00F2–&00F3 |
os_text_ptr |
R | MOS command-line text pointer (&F2/&F3). ADFS reads through it to fetch each character of a *command tail. |
&00F4 |
romsel_copy |
R/W | MOS RAM copy of the paged-ROM select latch. ADFS reads it to discover its own ROM bank number. |
&00F6–&00F7 |
osrdsc_ptr |
R/W | MOS address pointer (&F6/&F7) used with paged-ROM / OSRDSC access. |
&00FF |
zp_escape_flag |
R | MOS Escape flag (bit 7 set when an Escape is pending); ADFS polls it during long operations. |
MOS vector table (page 2)
| Address | Name | Access | Description |
|---|---|---|---|
&0212–&0213 |
filev |
W | MOS FILEV vector (OSFILE). ADFS points it at its own OSFILE handler when the filing system is selected. |
&0214–&0215 |
argsv |
W | MOS ARGSV vector (OSARGS), claimed by ADFS on selection. |
&0216–&0217 |
bgetv |
W | MOS BGETV vector (OSBGET), claimed by ADFS on selection. |
&0218–&0219 |
bputv |
W | MOS BPUTV vector (OSBPUT), claimed by ADFS on selection. |
&021A–&021B |
gbpbv |
W | MOS GBPBV vector (OSGBPB), claimed by ADFS on selection. |
&021C–&021D |
findv |
W | MOS FINDV vector (OSFIND), claimed by ADFS on selection. |
&021E–&021F |
fscv |
R/W | MOS FSCV vector (filing-system control). ADFS claims it on selection and the MOS calls through it for *commands, file-system selection and similar control operations. |
&028D |
last_break_type |
R | MOS last-break-type flag (0=soft, 1=power-on, 2=hard). ADFS reads it during initialisation to decide how much state to rebuild. |
NMI handler and workspace (&0D00–&0D5F)
| Address | Name | Access | Description |
|---|---|---|---|
&0D0A |
nmi_rw_code |
W | Relocated NMI transfer handler. ADFS copies its sector read/write routine into the page-&0D NMI workspace and patches it at runtime; this is the routine's working area. |
&0D0B |
nmi_write_addr_lo |
R/W | Patch site in the NMI handler: host buffer address for sector WRITES, low byte. |
&0D0C |
nmi_write_addr_hi |
R/W | Patch site in the NMI handler: host buffer address for sector WRITES, high byte. |
&0D0E |
nmi_read_addr_lo |
R/W | Patch site in the NMI handler: host buffer address for sector READS, low byte. |
&0D0F |
nmi_read_addr_hi |
R/W | Patch site in the NMI handler: host buffer address for sector READS, high byte. |
&0D56 |
nmi_precomp_mask |
R/W | NMI workspace: write precompensation mask (set from keyboard link 4); ORed into WD1770 write commands to enable precompensation. |
&0D57 |
nmi_tracks_remaining |
R/W | NMI workspace: number of whole tracks still to transfer. |
&0D58 |
nmi_secs_this_track |
R/W | NMI workspace: sectors to transfer on the current track. |
&0D59 |
nmi_secs_last_track |
R/W | NMI workspace: sectors to transfer on the final track. |
&0D5A |
nmi_sec_position |
R/W | NMI workspace: current sector position within the transfer. |
&0D5C |
nmi_step_rate |
R/W | NMI workspace: stepping-rate mask, a copy of wksp_fdc_cmd_step (&10E8, set from keyboard link 3); ORed into WD1770 Type I seek/step/restore commands. |
&0D5D |
nmi_adfs_flags |
R/W | NMI workspace: copy of the ADFS flags consulted by the NMI handler. |
&0D5E |
nmi_drive_ctrl |
R/W | NMI workspace: drive-control byte for the current transfer. |
&0D5F |
nmi_completion |
W | NMI workspace: completion flag the handler sets when the transfer finishes. |
Sideways-ROM private workspace table (&0DF0–&0DFF)
| Address | Name | Access | Description |
|---|---|---|---|
&0DF0 |
rom_wksp_table |
R/W | Base of the sideways-ROM private workspace table (&0DF0-&0DFF, one byte per ROM bank holding the high byte of that ROM's private RAM). ADFS reads and updates its own bank's entry. |
Free space map image (&0E00–&0FFF)
| Address | Name | Access | Description |
|---|---|---|---|
&0E00 |
fsm_sector_0index region &0DFA–&0E03 |
R/W | Free space map sector 0 (&0E00-&0EFF), the RAM image of on-disc sector 0. Holds the START sector address of each free-space fragment, 3 bytes per fragment, lowest first. |
&0EFA |
fsm_s0_reserved |
R | Reserved byte in FSM sector 0, just below the total-disc-size field. The compaction also reaches it as fsm_sector_1-6 (the notional entry before the first length entry). |
&0EFB |
fsm_s0_pre_disc_size |
R | Byte just below the total-disc-size field in FSM sector 0; read by the Y-indexed loop that fetches the size. |
&0EFC |
fsm_s0_disc_size_lo |
R/W | Total number of sectors on the disc (3-byte little-endian), low byte, in FSM sector 0. |
&0EFD |
fsm_s0_disc_size_mid |
R/W | Total number of sectors on the disc, middle byte. |
&0EFE |
fsm_s0_disc_size_hi |
R | Total number of sectors on the disc, high byte. |
&0EFF |
fsm_s0_checksum |
R/W | Checksum byte of FSM sector 0 (validates the free-space start-address map). |
&0F00 |
fsm_sector_1index region &0F00–&0F03 |
R/W | Free space map sector 1 (&0F00-&0FFF), the RAM image of on-disc sector 1. Holds the LENGTH in sectors of each free-space fragment, 3 bytes each, paired by index with the start addresses in sector 0. |
&0FFB |
fsm_s1_disc_id_lo |
R/W | Disc identifier (random 16-bit value assigned at format), low byte, in FSM sector 1. |
&0FFC |
fsm_s1_disc_id_hi |
R | Disc identifier, high byte. |
&0FFD |
fsm_s1_boot_option |
R/W | Boot option (*OPT 4 value, 0-3) stored in FSM sector 1. |
&0FFE |
fsm_s1_end_of_list_ptr |
R/W | Pointer to the end of the free-space list: the number of free-space fragments times 3. Zero means the disc is full. |
&0FFF |
fsm_s1_checksum |
R/W | Checksum byte of FSM sector 1 (validates the free-space length map and disc parameters). |
ADFS private workspace (&1000–&11FF)
| Address | Name | Access | Description |
|---|---|---|---|
&1000 |
wksp |
R/W | Base of ADFS's private workspace (&1000-&11FF); holds the default retry count. |
&1001 |
wksp_buf_sec_lo |
R/W | Sector address of the data currently in the sector buffer, low byte (mid/high at &1002/&1003). |
&1002 |
wksp_buf_sec_mid |
R/W | |
&1003 |
wksp_buf_sec_hi |
R/W | |
&1004 |
wksp_buf_flag |
R/W | Sector-buffer state flag. |
&1008 |
wksp_buf_flag_1 |
W | |
&100C |
wksp_buf_flag_2 |
W | |
&1010 |
wksp_osword_block |
W | OSWORD parameter block used to issue low-level disc operations. |
&1011 |
wksp_entry_calc_base |
R | |
&1014 |
wksp_disc_op_block |
W | Low-level disc-operation control block: the result, transfer address, command, sector, count and control fields follow. |
&1015 |
wksp_disc_op_result |
R/W | Disc-operation result / status byte. |
&1016 |
wksp_disc_op_mem_addr |
R/W | Host transfer address for the disc operation, byte 0 (4-byte address &1016-&1019). |
&1017 |
wksp_disc_op_mem_addr_1 |
R/W | |
&1018 |
wksp_disc_op_mem_addr_2 |
R/W | |
&1019 |
wksp_disc_op_mem_addr_3 |
R/W | |
&101A |
wksp_disc_op_command |
R/W | Disc-operation command byte (read / write / verify, etc.). |
&101B |
wksp_disc_op_sector |
R/W | Target sector for the disc operation, byte 0 (3-byte sector &101B-&101D). |
&101C |
wksp_disc_op_sector_mid |
R/W | |
&101D |
wksp_disc_op_sector_lo |
R/W | |
&101E |
wksp_disc_op_sector_count |
R/W | Number of sectors to transfer in the disc operation. |
&101F |
wksp_disc_op_control |
W | Disc-operation control byte. |
&1020 |
wksp_disc_op_transfer_len |
R/W | Partial-transfer byte count for the disc operation (4 bytes). |
&1021 |
wksp_disc_op_xfer_len_1 |
R/W | |
&1022 |
wksp_disc_op_xfer_len_2 |
R/W | |
&1023 |
wksp_disc_op_xfer_len_3 |
R/W | |
&1024 |
wksp_entry_size_base |
W | Scratch for an object's sector count during directory-entry processing. |
&1026 |
wksp_tube_transfer_addr |
W | Tube transfer address for the current operation (4 bytes), when data is moving via the Tube. |
&1027 |
wksp_tube_transfer_addr_1 |
R/W | |
&1028 |
wksp_tube_xfer_addr_2 |
R/W | |
&1029 |
wksp_tube_xfer_addr_3 |
R/W | |
&102A |
wksp_csd_drive_temp |
R/W | Temporary current-selected-directory (CSD) drive number. |
&102B |
wksp_csd_sector_temp |
R/W | Temporary CSD sector. |
&102C |
wksp_csd_drive_sector |
R/W | CSD drive+sector working copy. |
&102D |
wksp_csd_drive_sector_mid |
R/W | |
&102E |
wksp_alt_sector_hi |
R/W | |
&102F |
wksp_saved_drive |
R/W | Saved drive number. |
&1030 |
wksp_temp_sector |
R/W | Temporary sector store. |
&1033 |
wksp_last_access_drive |
R/W | Drive of the most recent disc access. |
&1034 |
wksp_object_sector |
R/W | Sector address of the object (file or directory) being processed, low byte (3 bytes). |
&1035 |
wksp_object_sector_mid |
R/W | |
&1036 |
wksp_object_sector_hi |
R/W | |
&1037 |
wksp_object_size |
R/W | Size in bytes of the object being processed, low byte (3 bytes). |
&1038 |
wksp_object_size_mid |
R/W | |
&1039 |
wksp_object_size_hi |
R/W | |
&103A |
wksp_alloc_sector |
R/W | Start sector of a newly allocated region. |
&103B |
wksp_saved_count |
R/W | Saved sector / entry count. |
&103C |
wksp_saved_count_1 |
R/W | |
&103D |
wksp_alloc_size |
R/W | Size of a newly allocated region, low byte (3 bytes). |
&103E |
wksp_alloc_size_mid |
W | |
&103F |
wksp_alloc_size_hi |
R/W | |
&1040 |
wksp_osfile_block |
R/W | OSFILE control block built and parsed here: filename pointer, load/exec/start/end addresses and attributes. |
&1041 |
wksp_osfile_block_1 |
R/W | |
&1042 |
wksp_osfile_load_addr |
R/W | OSFILE load address (4 bytes). |
&1043 |
wksp_osfile_load_addr_1 |
R/W | |
&1046 |
wksp_osfile_exec_addr |
W | OSFILE execution address (4 bytes). |
&1047 |
wksp_osfile_exec_addr_1 |
W | |
&1048 |
wksp_osfile_exec_addr_2 |
W | |
&1049 |
wksp_osfile_exec_addr_3 |
W | |
&104A |
wksp_osfile_start_addr |
W | OSFILE start address / length, byte 0 (4 bytes). |
&104B |
wksp_osfile_start_addr_1 |
W | |
&104C |
wksp_osfile_start_addr_2 |
W | |
&104D |
wksp_osfile_start_addr_3 |
W | |
&104F |
wksp_osfile_end_addr_1 |
R/W | |
&1050 |
wksp_osfile_end_addr_2 |
W | |
&1052 |
wksp_osfile_attr |
R/W | Object attributes (access bits) in the OSFILE block. |
&1053 |
wksp_osfile_attr_1 |
W | |
&1054 |
wksp_osfile_attr_2 |
W | |
&105D |
wksp_access_accum |
R/W | Accumulator for summing free space and sizes, low byte (3 bytes). |
&105E |
wksp_access_accum_1 |
W | |
&105F |
wksp_free_space_total |
W | Running total of free space (high byte of the accumulator). |
&1060 |
wksp_compact_start_page |
R/W | Start page of the buffer used during *COMPACT. |
&1061 |
wksp_compact_length |
R/W | Length of data held in the compaction buffer. |
&1062 |
wksp_object_name |
R/W | Name of the object being processed (10 bytes). |
&1063 |
wksp_object_name_1 |
W | |
&106C |
wksp_saved_dir_sector |
R/W | Saved directory sector. |
&106F |
wksp_drive_number |
R/W | Working drive number (e.g. for *MOUNT). |
&1070 |
wksp_new_parent_sector |
R/W | New parent-directory sector for a created or moved object. |
&1073 |
wksp_dest_drive |
R | Destination drive for COPY / RENAME. |
&1074 |
wksp_dest_name |
R/W | Destination object name (for COPY / RENAME). |
&107E |
wksp_dest_filename_end |
W | End marker of the destination filename. |
&107F |
wksp_copy_name_ptr |
W | Pointer to the source name during *COPY, low byte (high at &1080). |
&1080 |
wksp_copy_name_ptr_hi |
W | |
&1089 |
wksp_copy_osfile_params |
R/W | Saved source OSFILE parameters during *COPY. |
&108C |
wksp_copy_osfile_exec |
R/W | |
&108D |
wksp_copy_dest_params |
W | Destination OSFILE parameters during *COPY. |
&1091 |
wksp_filename_save |
R/W | Saved filename pointer, low byte (high at &1092). |
&1092 |
wksp_filename_save_hi |
R/W | |
&1093 |
wksp_entry_save |
R/W | Saved directory-entry pointer, low byte (high at &1094). |
&1094 |
wksp_entry_save_hi |
R/W | |
&1095 |
wksp_osgbpb_end_ptr |
R/W | OSGBPB working end pointer. |
&1096 |
wksp_osgbpb_sector_lo |
R/W | OSGBPB working sector, low byte (3 bytes). |
&1097 |
wksp_osgbpb_sector_mid |
R/W | |
&1098 |
wksp_osgbpb_sector_hi |
R/W | |
&109A |
wksp_new_ptr_lo |
R/W | Newly computed file PTR, low byte (multi-byte). |
&109B |
wksp_new_ptr_mid |
R/W | |
&109C |
wksp_new_ptr_mid_hi |
R/W | |
&109D |
wksp_new_ptr_hi |
R/W | |
&109E |
wksp_new_ptr_4 |
R/W | |
&109F |
wksp_osgbpb_wksp_9f |
R/W | |
&10A0 |
wksp_ch_buf_sector |
R/W | Current sector held in the channel buffer. |
&10A1 |
wksp_ch_buf_sector_1 |
R/W | |
&10A2 |
wksp_copy_read_sector |
R/W | *COPY source (read) sector, byte 0. |
&10A3 |
wksp_copy_read_sector_1 |
R/W | |
&10A4 |
wksp_copy_read_sector_2 |
R/W | |
&10A5 |
wksp_copy_write_sector |
R/W | *COPY destination (write) sector, byte 0. |
&10A6 |
wksp_copy_write_sector_1 |
R/W | |
&10A7 |
wksp_copy_write_sector_2 |
R/W | |
&10A8 |
wksp_copy_src_sector |
R/W | *COPY source sector working copy. |
&10A9 |
wksp_copy_src_sector_1 |
R/W | |
&10AA |
wksp_copy_src_sector_2 |
R/W | |
&10AB |
wksp_copy_dest_sector |
R/W | *COPY destination sector working copy. |
&10AC |
wksp_copy_dest_sector_1 |
W | |
&10AD |
wksp_copy_dest_sector_2 |
W | |
&10B4 |
wksp_osgbpb_func |
R/W | OSGBPB function code (1-8). |
&10B5 |
wksp_osgbpb_mode |
R/W | OSGBPB open mode / extension flag. |
&10B6 |
wksp_osgbpb_start |
R/W | OSGBPB transfer start position. |
&10B7 |
wksp_osgbpb_end |
R/W | OSGBPB transfer end position. |
&10B8 |
wksp_osgbpb_data_addr |
R/W | OSGBPB cumulative data transfer address (4 bytes). |
&10B9 |
wksp_osgbpb_data_addr_1 |
R/W | |
&10BA |
wksp_osgbpb_data_addr_2 |
R/W | |
&10BB |
wksp_osgbpb_data_addr_3 |
R/W | |
&10BC |
wksp_osgbpb_wksp_bc |
R/W | |
&10BD |
wksp_osgbpb_byte_count |
R/W | OSGBPB byte count for the transfer. |
&10BE |
wksp_osgbpb_name_offset |
R/W | OSGBPB offset into the name being read or written. |
&10BF |
wksp_saved_drive_2 |
R/W | Second saved drive number. |
&10C0 |
wksp_search_flag |
R/W | Directory-search state flag. |
&10C1 |
wksp_workspace_checksum |
R/W | Checksum of critical workspace, validated to detect corruption. |
&10C2 |
wksp_drive_change_mask |
R/W | Bit mask of drives whose media may have changed. |
&10C3 |
wksp_prev_clock |
R/W | Previous clock reading, for elapsed-time comparison. |
&10C8 |
wksp_clock |
R/W | Cached system clock value, byte 0 (5-byte TIME). |
&10C9 |
wksp_clock_1 |
R | |
&10CA |
wksp_clock_2 |
R | |
&10CB |
wksp_clock_3 |
R | |
&10CC |
wksp_clock_4 |
R | |
&10CD |
wksp_clock_5 |
R/W | |
&10CE |
wksp_error_suppress |
R/W | Flag suppressing error reporting in some code paths. |
&10CF |
wksp_bput_modified |
R/W | Flag: the current channel buffer was modified by OSBPUT and needs flushing. |
&10D0 |
wksp_err_sector |
R/W | Sector associated with the last disc error, low byte (3 bytes). |
&10D1 |
wksp_err_sector_mid |
W | |
&10D2 |
wksp_err_sector_hi |
R/W | |
&10D3 |
wksp_err_code |
R/W | Last disc error code. |
&10D4 |
wksp_err_handle |
R/W | File handle associated with the last error. |
&10D5 |
wksp_cur_channel |
R/W | Current open-file channel number. |
&10D6 |
wksp_cmd_tail |
R/W | Pointer to the *command tail, low byte (high at &10D7). |
&10D7 |
wksp_cmd_tail_hi |
R/W | |
&10D8 |
wksp_compaction_reported |
R/W | Flag: a compaction-needed condition has already been reported. |
&10E0 |
wksp_fdc_xfer_mode |
R/W | WD1770 transfer direction / mode for the current floppy operation. |
&10E1 |
wksp_nmi_owner |
R/W | Owner of the NMI, claimed during disc transfers and released afterwards. |
&10E2 |
wksp_format_page |
R/W | Page counter / buffer during *FORMAT. |
&10E3 |
wksp_err_number |
R/W | Working error number. |
&10E4 |
wksp_fdc_head_state |
R/W | WD1770 head / load state. |
&10E5 |
wksp_fdc_track_0 |
R/W | Last known track for drive 0 (head-position cache). |
&10E6 |
wksp_fdc_track_1 |
R/W | Last known track for drive 1 (head-position cache). |
&10E7 |
wksp_stack_save |
R/W | Saved stack pointer for error recovery. |
&10E8 |
wksp_fdc_cmd_step |
R/W | WD1770 Type I stepping-rate setting (from keyboard link 3); copied into nmi_step_rate for the NMI transfer. |
&1100 |
wksp_csd_name |
R/W | Name of the current selected directory (CSD), 10 characters. |
&110A |
wksp_lib_name |
W | Name of the library directory, 10 characters. |
&1113 |
wksp_csd_sector |
R/W | CSD sector marker / validity byte. |
&1114 |
wksp_csd_sector_lo |
R/W | Sector of the current selected directory, low byte (3 bytes). |
&1115 |
wksp_csd_sector_mid |
R/W | |
&1116 |
wksp_csd_sector_hi |
R/W | |
&1117 |
wksp_current_drive |
R/W | Current default drive number. |
&1118 |
wksp_lib_sector |
R/W | Library directory sector marker / validity byte. |
&1119 |
wksp_lib_sector_lo |
R | Sector of the library directory, low byte (3 bytes). |
&111A |
wksp_lib_sector_mid |
R/W | |
&111B |
wksp_lib_sector_hi |
R/W | |
&111C |
wksp_prev_dir_sector |
R/W | Previous directory (^) sector marker / validity byte. |
&111D |
wksp_prev_dir_sector_lo |
W | Sector of the previous directory, low byte (3 bytes). |
&111E |
wksp_prev_dir_sector_mid |
W | |
&111F |
wksp_prev_dir_sector_hi |
R/W | |
&1120 |
wksp_flags_save |
R/W | Saved status flags. |
&1121 |
wksp_disc_id_lo |
R/W | Cached disc identifier, low byte (high at &1122). |
&1122 |
wksp_disc_id_hi |
R/W | |
&1131 |
wksp_scsi_status |
R/W | Combined SCSI status from the last hard-disc operation. |
&1132 |
wksp_exec_handle |
R/W | File handle of the current *EXEC file. |
&1133 |
wksp_current_drive_hi |
R/W | Current drive / LUN combined byte for the hard disc. |
&1134 |
wksp_ch_ext_h |
R/W | Channel table - file EXTENT (length), high byte. One byte per open channel. |
&113E |
wksp_ch_ext_mh |
R/W | Channel table - file EXTENT, mid-high byte (per channel). |
&1148 |
wksp_ch_ext_ml |
R/W | Channel table - file EXTENT, mid-low byte (per channel). |
&1152 |
wksp_ch_ext_l |
R/W | Channel table - file EXTENT, low byte (per channel). |
&115C |
wksp_ch_ptr_h |
R/W | Channel table - file PTR (sequential position), high byte (per channel). |
&1166 |
wksp_ch_ptr_mh |
R/W | Channel table - file PTR, mid-high byte (per channel). |
&1170 |
wksp_ch_ptr_ml |
R/W | Channel table - file PTR, mid-low byte (per channel). |
&117A |
wksp_ch_ptr_l |
R/W | Channel table - file PTR, low byte (per channel). |
&1183 |
wksp_ch_alloc_pad |
R | Channel table - allocated size, padding / first byte (per channel). |
&1184 |
wksp_ch_alloc_h |
R/W | Channel table - allocated size, high byte (per channel). |
&118E |
wksp_ch_alloc_mh |
R/W | Channel table - allocated size, mid-high byte (per channel). |
&1198 |
wksp_ch_alloc_ml |
R/W | Channel table - allocated size, mid-low byte (per channel). |
&11A2 |
wksp_ch_alloc_l |
R/W | Channel table - allocated size, low byte (per channel). |
&11AC |
wksp_ch_flags |
R/W | Channel table - per-channel flags (open mode, modified, etc.). |
&11B6 |
wksp_ch_start_sec_h |
R/W | Channel table - file's start sector, high byte (per channel). |
&11C0 |
wksp_ch_start_sec_mh |
R/W | Channel table - file's start sector, mid-high byte (per channel). |
&11CA |
wksp_ch_start_sec_ml |
R/W | Channel table - file's start sector, mid-low byte (per channel). |
&11D4 |
wksp_ch_dir_sec_h |
R/W | Channel table - parent-directory sector, high byte (per channel). |
&11DE |
wksp_ch_dir_sec_mh |
R/W | Channel table - parent-directory sector, mid-high byte (per channel). |
&11E8 |
wksp_ch_dir_sec_ml |
R/W | Channel table - parent-directory sector, mid-low byte (per channel). |
&11F2 |
wksp_ch_seq_num |
R/W | Channel table - directory sequence number when the file was opened, for staleness checks (per channel). |
Directory buffer (&1200–&16FF)
| Address | Name | Access | Description |
|---|---|---|---|
&1200 |
dir_buffer |
R/W | Directory buffer (&1200-&16FF, five sectors). Holds the currently loaded directory - a header, up to 47 26-byte entries, and a footer. This is the start of the header. |
&1205 |
dir_first_entry |
R | First 26-byte directory entry (offset &05 into the buffer, just past the header). |
&16B1 |
dir_last_entry_area |
R | End of the directory entry area; the entry list is searched up to this limit when looking for a free slot. |
&16CC |
dir_name |
R/W | Directory's own name, stored in the footer. |
&16D6 |
dir_parent_sector |
W | Sector address of this directory's parent (3 bytes), stored in the footer. |
&16D9 |
dir_title |
R/W | Directory title string, stored in the footer. |
&16FA |
dir_master_sequence |
R/W | Master sequence number in the footer, bumped on each change to detect concurrent updates. |
&16FB |
dir_identity_string |
R/W | Footer identity string ('Hugo'); must match the header's copy to validate the directory. |
Random-access buffers (&1700–&1BFF)
| Address | Name | Access | Description |
|---|---|---|---|
&1700 |
ra_buffer_1 |
W | General-purpose buffer page 1 (&1700). Used for sector read-ahead and as scratch during directory and free-space operations; also reused as a second directory header. |
&1800 |
ra_buffer_2 |
W | General-purpose buffer page 2 (&1800). |
&1900 |
ra_buffer_3 |
W | General-purpose buffer page 3 (&1900). |
&1A00 |
ra_buffer_4 |
W | General-purpose buffer page 4 (&1A00). |
&1B00 |
ra_buffer_5 |
W | General-purpose buffer page 5 (&1B00); also holds a second directory image when an operation works on two directories at once. |
&1BCC |
dir2_name |
W | Footer name of the second directory held in the &1B00 buffer (used by operations that touch two directories, such as *COPY or rename across directories). |
&1BD6 |
dir2_parent_sector |
W | Parent-directory sector of the second directory, in its footer. |
&1BD9 |
dir2_title |
W | Title of the second directory, in its footer. |
&1BFA |
dir2_master_sequence |
W | Master sequence number of the second directory, in its footer. |
Memory-mapped I/O
| Address | Name | Access | Description |
|---|---|---|---|
&FC40 |
scsi_data |
R/W | SCSI data-bus register. Each read or write transfers one byte to or from the Adaptec ACB-4000 controller during the data, status, message and command phases of the SCSI handshake. |
&FC41 |
scsi_status |
R | SCSI bus-status register. Reflects the control-bus phase lines (BSY, REQ, C/D, I/O, MSG) so the driver can step through the SCSI handshake. |
&FC42 |
scsi_select |
W | SCSI select register. A write asserts SEL to start the selection phase and address the controller. |
&FC43 |
scsi_irq_enable |
W | SCSI interrupt-enable register. Controls whether the host adapter raises IRQ on a SCSI data request. |
&FE30 |
romsel |
W | Paged-ROM select latch. ADFS writes a bank number here to page in sideways ROM 0 (and to restore the previous bank afterwards) when reaching code or data in another bank. |
&FE44 |
system_via_t1c_l |
R | System VIA Timer 1 counter, low byte. ADFS reads the free-running counter to seed the low byte of a newly formatted disc's identifier; the read also clears the Timer 1 interrupt flag. |
&FE80 |
fdc_1770_drive_control |
R/W | WD1770 drive-control latch (external to the FDC). Selects the drive, side and density, and drives the controller reset line. |
&FE84 |
fdc_1770_command_or_status |
R/W | WD1770 command register (write) / status register (read). |
&FE85 |
fdc_1770_track |
R/W | WD1770 track register — current track number under the head. |
&FE86 |
fdc_1770_sector |
R/W | WD1770 sector register — target sector for the next read or write. |
&FE87 |
fdc_1770_data |
R/W | WD1770 data register — byte transferred to or from the disc. |
&FEE5 |
tube_data_register_3 |
R/W | Tube FIFO register 3 data port. When a second processor is attached, ADFS streams file data through Tube R3 rather than moving it through host memory. |
Index bases
Addresses used only as an indexing base
— the operand names a base and the byte actually touched is
base + X (or + Y), where the index register is a
caller-supplied offset, never zero. The literal byte at the base address is
never read or written, so these are documented here rather than on the memory
map: they are bases, not locations the ROM owns.
Zero Page
| Base | Name | Description |
|---|---|---|
&0000 |
zp_user_ptr_0 |
Caller's zero-page pointer, byte 0. ADFS copies a 32-bit address / file PTR to and from this X-indexed location (base+0..+3) when servicing transfers, where X is the caller's control-block pointer (never 0). |
&0001 |
zp_user_ptr_1 |
Caller's zero-page pointer, byte 1 (X-indexed base+1). |
&0002 |
zp_user_ptr_2 |
Caller's zero-page pointer, byte 2 (X-indexed base+2). |
&0003 |
zp_user_ptr_3 |
Caller's zero-page pointer, byte 3 (X-indexed base+3). |
ADFS private workspace (&1000–&11FF)
| Base | Name | Description |
|---|---|---|
&100D |
wksp_entry_field_base |
Index base for the directory-entry field copy: an entry's load/exec/length/attribute fields are read/written as base+Y with Y a field offset (&0A-&15), landing in the disc-op block at &1017-&1022. |
&100E |
wksp_entry_len_base |
Index base for writing the entry length field (accessed as base+Y with Y a directory-entry field offset >= &12). |
&10FE |
wksp_alt_csd_sector |
Index base for setting the CSD sector during subdirectory traversal: written as base+Y with Y=&16-&18, landing on wksp_csd_sector at &1114-&1116. |
