Previous Next Contents Index
The DISCiPLE RAM layout

The DISCiPLE RAM not only holds the system file but contains also a number of 'system
variables' used for various housekeeping tasks.

Address Length  Name        Contents
#0000   6656    SYSTEM      Holds the system file.
#1A00   195     BITMAP      Here the complete disk bitmap is stored.
#1AC3   2       SECT_USED   The number of sectors used by the CATalogue entry
                            currently being printed; start of the Disk File
                            Channel Area (DFCA), except the first 13 bytes it's an
                            exact copy of a "D" write channel.
#1AC5   2       BYTESLEFT   Number of bytes left to be loaded or saved.
#1AC7   1       SCAN_TYPE   Holds the scan-type during a CATalogue scan.
#1AC8   2       FILEADDR    Address of first byte to be loaded or saved.
#1ACA   2       BUFLEN      Length of a disk data buffer.
#1ACC   2       IFF         Contents of the F register with IFF held in the  P/V
                            flag.
#1ACE   1       CUR_DRIVE   Drive number of current drive.
#1ACF   1       FLAGS3      Various flags to signal various states: (meaning
                            with bit set)
                             0 - there has at least one file been handled.
                             1 - serving the network or CLEAR # executing.
                             2 - stealing from or forcing to a PUPIL.
                             3 - using network.
                             4 - LOAD command executing.
                             5 - SAVE command executing.
                             6 - MERGE command executing.
                             7 - VERIFY command executing.
#1AD0   2       RPT         Offset of next byte to be read from buffer. The
                            following 774 bytes (up to and including #1DD5) are
                            exactly the same as byte 13 (CHRPT) and onwards in a
                            write channel.
#1AD2   2       BUFF        Offset of buffer from start of channel = 39.
#1AD4   1       CUR_SECT    Sector number of sector where this buffer will be
                            written.
#1AD5   1       CUR_TRACK   Track number of sector where this buffer will be
                            written.
#1AD6   1       DIRDESC     Directory description. Please note that the next 256
                            bytes are the same as a CATalogue entry.
#1AD7   10      NAME        Filename.
#1AE1   2       CNT         Sectors used, MSB first!
#1AE3   1       FRST_TRK    First track.
#1AE4   1       FRST_SECT   First sector.
#1AE5   195     BITMAP      File bitmap.
#1BA8   1       LENGTH_HI   File length MSB (number of 64K blocks).
#1BA9   1       TYPE        File type.
#1BAA   2       LENGTH      MID and LOW bytes of file length.
#1BAC   2       ADDR        File address.
#1BAE   2       LENGTH_2    Length excluding variables if a BASIC file.
#1BB0   2       AUTOSTART   Autostart line or address.
#1BB2   22      Z80REGS     Contains IY, IX, DE', BC', HL', IF, DE, BC, HL, IF
                            and SP respectively (only with SNAPSHOT files).
#1BC8   14                  Not used.
#1BD6   510     BUFFER      Data bytes.
#1DD4   1       NXT_TRACK   Next track number.
#1DD5   1       NXT_SECT    Next sector number.
#1DD6   2       D_CH_ADD    Address of the next character to be interpreted; the
                            DISCiPLE uses this address while checking a statement.
#1DD8   2       TOTAL_USED  Number of used sectors on disk being CATalogued.
#1DDA   1       IN_31       Current control port state; because port 31 as control
                            port is write only (IN 31 reads Kempston joystick) the
                            contents send to it are stored here.
#1DDB   1       RETRIES     Retry counter; it counts the number of retries being
                            made before giving an error.
#1DDC   6       ID_FIELD    Whenever the FDC reports an error the ID Field of
                            the first encountered sector on the current track is
                            read and stored here; the track number is then
                            stored into the track register of the FDC.
#1DE2   2                   Not used ?
#1DE4   1       SYST_TYPE   System configuration; #44: system loaded, #4E: Pupil
                            station, #53: minimal system, #00: resetted once.
#1DE5   1       CALBASSING  Holds #47 when executing a CALBAS.
#1DE6   2                   Not used ?
#1DE8   2       LBYT_ADDR   Address used while verifying from disk or while loading
                            or verifying from network.
#1DEA   1       A_REG       Used as a temporary store for the A register.
#1DEB   2       RPT'        Alternative disk buffer offset; used with SAVE TO.
                            RPT'-lo holds the column counter while CATalogueing
                            a disk.
#1DED   2       SECTOR'     Alternative track and sector number; used with SAVE
                            TO, also used as temporary store for stream data.
#1DEF   1       MAPUSED     Number of files which use the bitmap at #1A00, this is
                            @6999.
#1DF0   4                   Not used ?
#1DF4   1       NTRESP      Store for network response code.
#1DF5   1       NTDEST      Destination station number 0-64; start of the 8 byte
                            network header.
#1DF6   1       NTSRCE      Source station number.
#1DF7   2       NTNUMB      Network block number.
#1DF9   1       NTTYPE      Network packet type; 0 = normal, 1 = EOF.
#1DFA   1       NTLEN       Data block length.
#1DFB   1       NTDCS       Data block checksum.
#1DFC   1       NTHCS       Header block checksum.
#1DFD   1       SRV_DEST    Destination station number during network service;
                            start of the 28 byte command block (so including next
                            27 bytes).
#1DFE   1       SRV_SRCE    Source station number during service.
#1DFF   1       COMMAND     BASIC-command code.
#1E00   1       SRV_PRT     Byte to be printed by the master station during a
                            PRINT command. Also used during COPY SCREEN$ to hold
                            the type (ASCII value).
#1E01   24      UFIA1       First User File Information Area (UFIA) in DISCiPLE
                            RAM.
#1E19   1       PAGE_CONF   Page configuration during 128K snapshot.
#1E1A   24      UFIA2       Second UFIA.
#1E32   2       D_CURCHL    Store for CURCHL during network servicing; start of
                            11 byte file descriptor during SAVE TO.
#1E34   2       D_FLAGS     Store for FLAGS during network servicing.
#1E36   7                   Remainder of file descriptor storage.
#1E3D   275     N_CHANNEL   Whenever the network is used, this holds genuine
                            network channel data; when booting the system, this
                            holds the 13 byte 'LOAD_SYS' load system file
                            routine (see #220C).
#1FFD   X       IN_STACK    Internal stack grows down from here.
#1FFE   2       D_OLD_SP    Old SP when DISCiPLE internal stack in use.
Previous Next Contents Index