changeset 2329:a894bfdef5b3

Updated
author boisy
date Wed, 13 Jan 2010 05:22:08 +0000
parents cfb7dcf4322c
children 8dc0e99eeeb6
files lib/makefile lib/os9defs.a lib/rbfdefs.a lib/scfdefs.a lib/sys.a
diffstat 5 files changed, 628 insertions(+), 256 deletions(-) [+]
line wrap: on
line diff
--- a/lib/makefile	Wed Jan 13 04:44:24 2010 +0000
+++ b/lib/makefile	Wed Jan 13 05:22:08 2010 +0000
@@ -12,19 +12,19 @@
 	echo "DRAGON equ 0" > dragon
 	echo "Level equ 1" > level
 	echo "H6309 equ 0" > h6309
-	$(MERGE) dragon level h6309 os9defs.a > $@
+	$(MERGE) dragon level h6309 sys.a > $@
 
 sys6809l2.a:
 	echo "DRAGON equ 0" > dragon
 	echo "Level equ 2" > level
 	echo "H6309 equ 0" > h6309
-	$(MERGE) dragon level h6309 os9defs.a > $@
+	$(MERGE) dragon level h6309 sys.a > $@
 
 sys6309l2.a:
 	echo "DRAGON equ 0" > dragon
 	echo "Level equ 2" > level
 	echo "H6309 equ 1" > h6309
-	$(MERGE) dragon level h6309 os9defs.a > $@
+	$(MERGE) dragon level h6309 sys.a > $@
 
 clean:
 	$(RM) *.l *.r sys6809l1.a sys6809l2.a sys6309l2.a
--- a/lib/os9defs.a	Wed Jan 13 04:44:24 2010 +0000
+++ b/lib/os9defs.a	Wed Jan 13 05:22:08 2010 +0000
@@ -72,8 +72,6 @@
                ENDC      
                ENDC      
 
-               psect     OS9Defs_a,0,0,0,0,0
-
 * Common definitions
 true:          EQU       1                   useful name
 false:         EQU       0                   useful name
@@ -1307,254 +1305,3 @@
                ENDC      
 
                ENDC      
-
-
-
-
-
-********************************************************************
-* SCFDefs - Sequential Character File Manager Definitions
-*
-* $Id$
-*
-* SCF stands for 'Sequential Character Filemanager' and is a package of subroutines
-* that define the logical structure of a serial device.
-*
-* The data structures in this file give SCF its 'personality' and are used
-* by SCF itself, as well as applications that will require disk I/O.
-*
-* Edt/Rev  YYYY/MM/DD  Modified by
-* Comment
-* ------------------------------------------------------------------
-*          1984/01/11  YO
-* Added V.KANJI, V.KBUF, V.MODADR for new kanji input process.
-*
-*          1985/04/20  Mark G. Hawkins
-* Added V.PDLHd Path Descriptor List Head.
-*
-*          1985/04/21  Mark G. Hawkins
-* Added PD.PLP and PD.PST for modem handling.
-*
-*          1987/06/23  Kevin K. Darling
-* Updated with Dev Desc info.
-*
-*          1998/10/03  Boisy G. Pitre
-* Consolidated L1/L2 scfdefs.
-*
-*          2003/01/21  Boisy G. Pitre
-* Added symbolics for enhanced SCF line editing.
-*
-*          2003/06/02  Boisy G. Pitre
-* Updated comments for clarity.
-*
-*          2004/05/17  Boisy G. Pitre
-* Added higher baud rates.
-
-               NAM       SCFDefs
-               TTL       Sequential File Manager Definitions
-
-               PAG       
-*******************************
-* SCF Device Descriptor Offsets
-*
-* These definitions are for SCF device descriptors.
-
-               csect
-               RMB       M$DTyp
-IT.DVC:        RMB       1                   Device type (DT.SCF)
-IT.UPC:        RMB       1                   Uppercase flag
-IT.BSO:        RMB       1                   Backspace behavior
-IT.DLO:        RMB       1                   Delete behavior
-IT.EKO:        RMB       1                   Echo flag
-IT.ALF:        RMB       1                   Auto linefeed flag
-IT.NUL:        RMB       1                   End-of-line null count
-IT.PAU:        RMB       1                   Page pause flag
-IT.PAG:        RMB       1                   Number of lines per page
-IT.BSP:        RMB       1                   Backspace character
-IT.DEL:        RMB       1                   Delete-line character
-IT.EOR:        RMB       1                   End-of-record character
-IT.EOF:        RMB       1                   End-of-file character
-IT.RPR:        RMB       1                   Reprint-line character
-IT.DUP:        RMB       1                   Duplicate-last-line character
-IT.PSC:        RMB       1                   Pause character
-IT.INT:        RMB       1                   Interrupt character
-IT.QUT:        RMB       1                   Quit character
-IT.BSE:        RMB       1                   Backspace echo character
-IT.OVF:        RMB       1                   Bell character
-IT.PAR:        RMB       1                   Parity
-IT.BAU:        RMB       1                   Baud rate
-IT.D2P:        RMB       2                   Attached device name string offset
-IT.XON:        RMB       1                   X-ON character
-IT.XOF:        RMB       1                   X-OFF character
-IT.COL:        RMB       1                   Number of columns for display
-IT.ROW:        RMB       1                   Number of rows for display
-IT.XTYP:       RMB       1                   Extended type (added by BRI)
-
-*               IFGT      Level-1
-* Window Descriptor Additions
-* For CoCo window, where IT.PAR = $80
-                RMB       IT.ROW+1
-IT.WND:         RMB       1                   Window number (matches device name) ($2E)
-IT.VAL:         RMB       1                   Use defaults on Init (0=no, 1=yes)
-IT.STY:         RMB       1                   Screen type default
-IT.CPX:         RMB       1                   Column start default
-IT.CPY:         RMB       1                   Row start default
-IT.FGC:         RMB       1                   Foreground color default
-IT.BGC:         RMB       1                   Background color default
-IT.BDC:         RMB       1                   Border color default
-*               ENDC      
-               endsect
-
-               PAG       
-********************
-* SCF Static Storage
-*
-* SCF devices must reserve this space for SCF
-*
-               csect
-               RMB       V.USER
-V.TYPE:        RMB       1                   Device type or parity
-V.LINE:        RMB       1                   Lines left until end of page
-V.PAUS:        RMB       1                   Immediate Pause request
-V.DEV2:        RMB       2                   Attached device's static
-V.INTR:        RMB       1                   Interrupt char
-V.QUIT:        RMB       1                   Quit char
-V.PCHR:        RMB       1                   Pause char
-V.ERR:         RMB       1                   Accumulated errors
-V.XON:         RMB       1                   X-On char
-V.XOFF:        RMB       1                   X-Off char
-V.KANJI:       RMB       1                   Kanji mode flag
-V.KBUF:        RMB       2                   Kana - Kanji convert routine work address
-V.MODADR:      RMB       2                   Kana - Kanji convert module address
-V.PDLHd:       RMB       2                   Open path descriptor list head pointer
-V.RSV:         RMB       5                   Reserve bytes for future expansion
-V.SCF:         EQU       *                   Total SCF manager static overhead
-               endsect
-
-               PAG       
-***********************
-* Character Definitions
-*
-C$NULL:        SET       0                   Null char
-C$RPET:        SET       $01                 (CTRL-A - SOH) Repeat last input line
-C$INTR:        SET       $03                 (CTRL-C - ETX) Keyboard interrupt
-C$RPRT:        SET       $04                 (CTRL-D - EOT) Reprint current input line
-C$QUIT:        SET       $05                 (CTRL-E - ENQ) Keyboard Abort
-C$BELL:        SET       $07                 (CTRL-G - BEL) Line overflow warning
-C$BSP:         SET       $08                 (CTRL-H - BS ) Back space
-C$RARR:        SET       $09                 Right Arrow
-C$EL:          SET       $05                 Erase Line
-C$LF:          SET       $0A                 Line feed
-C$HOME:        SET       $0B                 Home position Code
-C$Clsgr:       SET       $15                 Graphic screen clear (use FM-11)
-C$Clsall:      SET       $16                 Graphic & character clear (use FM-11)
-C$CR:          SET       $0D                 Carriage return
-C$FORM:        SET       $0C                 (CTRL-L - FF ) Form Feed ... screen clear
-C$SI:          SET       $0F                 Shift IN Code
-C$SO:          SET       $0E                 Shift OUT Code
-C$DELETE:      SET       $10                 Delete char (for SCF enhanced line editing)
-C$XON:         SET       $11                 (CTRL-Q - DC1) Transmit Enable
-C$INSERT:      SET       C$XON               Insert char (for SCF enhanced line editing)
-C$XOFF:        SET       $13                 (CTRL-S - DC3) Transmit Disable
-C$PLINE:       SET       C$XOFF              Print remaining line (for SCF enhanced line editing)
-C$PAUS:        SET       $17                 (CTRL-W - ETB) Pause character
-C$DEL:         SET       $18                 (CTRL-X - CAN) Delete line
-C$SHRARR:      SET       $19                 Shift Right-Arrow
-C$EOF:         SET       $1B                 (CTRL-[ - ESC) END of file
-C$RGT:         SET       $1C                 Cursor right
-C$LFT:         SET       $1D                 Cursor left
-C$UP:          SET       $1E                 Cursor up
-C$DWN:         SET       $1F                 Cursor down
-C$SPAC:        SET       $20                 Space
-C$PERD:        SET       '.
-C$COMA:        SET       ',
-
-
-               PAG       
-*********************************************
-* Sequential Character Path Descriptor Format
-*
-* A path descriptor is created for every new path that is open
-* via the I$Open system call (processed by IOMan).  Process
-* descriptors track state information of a path.
-*
-               csect
-               RMB       PD.FST
-PD.DV2:        RMB       2                   Output device table pointer
-PD.RAW:        RMB       1                   Read/Write or ReadLn/WritLn mode
-PD.MAX:        RMB       2                   ReadLn high byte count
-PD.MIN:        RMB       1                   Devices are "mine" if clear
-PD.STS:        RMB       2                   Status routine module addr
-PD.STM:        RMB       2                   Reserved for status routine
-               endsect
-
-               csect
-               RMB       PD.OPT
-               RMB       1                   Device type
-PD.UPC:        RMB       1                   Case (0=both, 1=upper only)
-PD.BSO:        RMB       1                   Backspace (0=BSE, 1=BSE,SP,BSE)
-PD.DLO:        RMB       1                   Delete (0=BSE over line, 1=CRLF)
-PD.EKO:        RMB       1                   Echo (0=No Echo)
-PD.ALF:        RMB       1                   Auto linefeed (0=No auto LF)
-PD.NUL:        RMB       1                   End of Line null count
-PD.PAU:        RMB       1                   Page pause (0=No end of page pause)
-PD.PAG:        RMB       1                   Lines per page
-PD.BSP:        RMB       1                   Backspace character
-PD.DEL:        RMB       1                   Delete Line character
-PD.EOR:        RMB       1                   End of Record character (read only)
-PD.EOF:        RMB       1                   End of File character
-PD.RPR:        RMB       1                   Repront Line character
-PD.DUP:        RMB       1                   Dup Last Line character
-PD.PSC:        RMB       1                   Pause character
-PD.INT:        RMB       1                   Keyboard interrupt character (CTRL-C)
-PD.QUT:        RMB       1                   Keyboard quit character (CTRL-E)
-PD.BSE:        RMB       1                   Backspace echo character
-PD.OVF:        RMB       1                   Line overflow character (BELL)
-PD.PAR:        RMB       1                   Parity code
-PD.BAU:        RMB       1                   ACIA baud rate (Color Computer)
-PD.D2P:        RMB       2                   Offset of DEV2 name
-PD.XON:        RMB       1                   ACIA X-ON character
-PD.XOFF:       RMB       1                   ACIA X-OFF character
-OPTCNT         EQU       *-PD.OPT            Total user settable options
-PD.ERR:        RMB       1                   Most recent I/O error status
-PD.TBL:        RMB       2                   Device table addr (copy)
-PD.PLP:        RMB       2                   Path Descriptor List Pointer
-PD.PST:        RMB       1                   Current path status
-               endsect 
-
-* PD.PST values Path Descriptor Status byte
-*
-PST.DCD:       EQU       %00000001           Set if DCD is lost on Serial port
-
-
-* PD.PAR definitions
-*
-* Parity
-PARNONE:       EQU       %00000000
-PARODD:        EQU       %00100000
-PAREVEN:       EQU       %01100000
-PARMARK:       EQU       %10100000
-PARSPACE:      EQU       %11100000
-
-* PD.BAU definitions
-*
-* Baud rate
-B110:          EQU       %00000000
-B300:          EQU       %00000001
-B600:          EQU       %00000010
-B1200:         EQU       %00000011
-B2400:         EQU       %00000100
-B4800:         EQU       %00000101
-B9600:         EQU       %00000110
-B19200:        EQU       %00000111
-B38400:        EQU       %00001000
-B57600:        EQU       %00001001
-B115200:       EQU       %00001010
-* Word size
-WORD8:         EQU       %00000000
-WORD7:         EQU       %00100000
-* Stop bits
-STOP1:         EQU       %00000000
-STOP2:         EQU       %00010000
-
-               endsect
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/rbfdefs.a	Wed Jan 13 05:22:08 2010 +0000
@@ -0,0 +1,374 @@
+               IFNE      RBFDEFS-1
+
+RBFDEFS        SET       1
+
+********************************************************************
+* RBFDefs - Random Block File Manager Definitions
+*
+* $Id$
+*
+* RBF stands for 'Random Block Filemanager' and is a package of subroutines
+* that define the logical structure of a disk and allows access to the files
+* in that structure.
+*
+* The data structures in this file give RBF its 'personality' and are used
+* by RBF itself, as well as applications that will require disk I/O.
+*
+* Edt/Rev  YYYY/MM/DD  Modified by
+* Comment
+* ------------------------------------------------------------------
+*          1982/07/13  Robert F. Doggett
+* PD.Exten added to path descriptor and PE Entries defined.
+*
+*          1982/07/15  Robert F. Doggett
+* V.FileHd inserted in driver static storage.
+*
+*          1982/09/10  WGP
+* Level One/Level Two condionals added.
+*
+*          1982/09/17  WGP
+*
+*          1982/09/17  Robert F. Doggett
+* PD.SLE renamed to PD.Creat.
+*
+*          1982/09/17  Robert F. Doggett
+* V.DiskID, V.BMapSz, V.MapSct added for smart multi-sector bitmap searching.
+*
+*          1982/09/20  Robert F. Doggett
+* Reserved areas added in static storage.
+
+*          1983/06/07  Robert F. Doggett
+* Added InDriver flag in PD.SMF.
+*
+*          1983/06/13  Robert F. Doggett
+* Added PE.Req tmp save for PE.Lock.
+*
+*          1983/08/08  Robert F. Doggett
+* Reserved PD.SToff for Japanese.
+*
+*          1983/11/19  Robert F. Doggett
+* Added V.ResBit in drive tables.
+*
+*          1983/12/12  Robert F. Doggett
+* Added PE.Prior to save process priority.
+*
+*          1983/12/13  Robert F. Doggett
+* Added BufBusy bit in state flag (PD.SMF).
+*
+*          1984/07/06  Mark G. Hawkins
+* Added Bit Definitions for DD.FMT.
+*
+*          1987/06/23  Kevin K. Darling
+* Updated with Dev Desc Info
+*
+*          2003/06/02  Boisy G. Pitre
+* Updated comments for clarity.
+* Added TYP.256-TYP.2048 definitions for future expansion.
+*
+*          2004/04/14  Boisy G. Pitre
+* Added new entries to device descriptor as per OS-9 Level One V2.00.00
+* addendum.  Pointed out by Rodney Hamilton.
+*
+*	       2005/05/31  P.Harvey-Smith.
+* Added defines for bit 2 of IT.DNS, which the format command uses to 
+* determine if a drive should have it's track 0 as single or double density
+*
+*          2005/11/23  Robert Gault
+* Added IT.MPI giving it duplicate location with IT.TFM. This will not be
+* transferred to the path descriptor, thus the  equ *  rahter than  rmb 1.
+*
+*          2005/12/11  Boisy G. Pitre
+* Added IT.SOFF1-ITSOFF3 and IT.LLDRV for SuperDrivers.
+
+               NAM       RBFDefs
+               TTL       Random Block File Manager Definitions
+
+               PAG       
+*******************************
+* RBF Device Descriptor Offsets
+*
+* These definitions are for RBF device descriptors.
+
+               csect
+               RMB       M$DTyp
+               RMB       1                   Device type (DT.RBF)
+IT.DRV:        RMB       1                   Drive number
+IT.STP:        RMB       1                   Step rate
+IT.TYP:        RMB       1                   Disk device type information
+IT.DNS:        RMB       1                   Density capability
+IT.CYL:        RMB       2                   Number of cylinders
+IT.SID:        RMB       1                   Number of surfaces
+IT.VFY:        RMB       1                   Verify disk writes (0 = verify, 1 = don't)
+IT.SCT:        RMB       2                   Default sectors/track
+IT.T0S:        RMB       2                   Default sectors/track for track 0 sector 0
+IT.ILV:        RMB       1                   Sector interleave offset
+IT.SAS:        RMB       1                   Segment allocation size
+* The following fields are from the OS-9 Level One V2.00.00 Addendum
+IT.TFM:        RMB       1                   DMA Transfer Mode
+IT.Exten:      RMB       2                   Path Extension (PE) for record locking
+IT.SToff:      RMB       1                   Sector/Track offsets (for "foreign" disk formats)
+* The following fields are not copied to the path descriptor
+IT.WPC:        RMB       1                   Write precomp cyl/4 (HD)
+IT.OFS:        RMB       2                   Starting cylinder offset (HD)
+IT.RWC:        RMB       2                   Reduced write current cylinder (HD)
+* These fields have been added because of SuperDriver.  They probably
+* can be used in other drivers
+               ORG       IT.WPC
+IT.SOFF1:      RMB       1
+IT.SOFF2:      RMB       1
+IT.SOFF3:      RMB       1
+IT.LLDRV:      RMB       2
+IT.MPI:        RMB       1
+               endsect
+
+* IT.TYP Definitions
+*
+TYP.HARD:      EQU       %10000000           Hard disk
+TYP.FLP:       EQU       %00000000           Floppy disk
+TYP.NSF:       EQU       %01000000           Non-standard format
+TYP.SOF:       EQU       %00000000           Standard NitrOS-9 format
+
+* IT.TYP bit definitions if bit 7 of IT.TYP is set (hard disk)
+TYPH.256:      EQU       %00000000           256 byte sector media
+TYPH.512:      EQU       %00000001           512 byte sector media
+TYPH.1024:     EQU       %00000010           1024 byte sector media
+TYPH.2048:     EQU       %00000011           2048 byte sector media
+TYPH.SSM:      EQU       %00000011           Sector size mask
+TYPH.DRSV:     EQU       %00001100           Driver-reserved bits
+TYPH.DSQ:      EQU       %00010000           Drive size query flag
+
+* IT.TYP bit definitions if bit 7 of IT.TYP is clear (floppy disk)
+TYP.5:         EQU       %00000000           5" media
+TYP.3:         EQU       %00000001           3.5" media
+TYP.SBO:       EQU       %00000010           Sector base offset (clear = 0; sect = 1)
+TYP.256:       EQU       %00000000           256 byte sector media
+TYP.512:       EQU       %00000100           512 byte sector media
+TYP.CCF:       EQU       %00100000           CoCo format
+TYP.NCCF:      EQU       %00000000           Non-CoCo format
+
+* IT.DNS Definitions
+*
+
+* If bit 7 of IT.TYP is set, IT.DNS is driver-dependent
+
+* IT.DNS bit definitions if bit 7 of IT.TYP is clear (floppy disk)
+DNS.FM:        EQU       %00000000           Single-density (FM)
+DNS.MFM:       EQU       %00000001           Double-density (MFM)
+DNS.STD:       EQU       %00000000           Single track distance (48/135 tpi)
+DNS.DTD:       EQU       %00000010           Double track distance (96 tpi)
+
+* Added PHS,2005-05-31, as format seems to use these
+DNS.FM0:       EQU       %00000000           Single density track 0
+DNS.MFM0:      EQU       %00000100           Double density track 0
+
+* Floppy disk step rate definitions
+STP.30ms:      EQU       0                   30ms step rate
+STP.20ms:      EQU       1                   20ms step rate
+STP.12ms:      EQU       2                   12ms step rate
+STP.6ms:       EQU       3                   6ms step rate
+
+               PAG       
+*************************************
+* Random Block Path Descriptor Format
+*
+* A path descriptor is created for every new path that is open
+* via the I$Open system call (processed by IOMan).  Process
+* descriptors track state information of a path.
+*
+               csect
+               RMB       PD.FST
+PD.SMF:        RMB       1                   State flags
+PD.CP:         RMB       4                   Current logical byte position
+PD.SIZ:        RMB       4                   File size
+PD.SBL:        RMB       3                   Segment beginning lsn
+PD.SBP:        RMB       3                   Segment beginning psn
+PD.SSZ:        RMB       3                   Segment size
+PD.DSK:        RMB       2                   Disk id
+PD.DTB:        RMB       2                   Drive table ptr
+               RMB       PD.OPT-*
+               RMB       1                   Device type
+PD.DRV:        RMB       1                   Drive number
+PD.STP:        RMB       1                   Step rate
+PD.TYP:        RMB       1                   Disk device type (5" 8" other)
+PD.DNS:        RMB       1                   Density capability
+PD.CYL:        RMB       2                   Number of cylinders
+PD.SID:        RMB       1                   Number of surfaces
+PD.VFY:        RMB       1                   0=verify disk writes
+PD.SCT:        RMB       2                   Default sectors/track
+PD.T0S:        RMB       2                   Default sectors/track tr00,s0
+PD.ILV:        RMB       1                   Sector interleave offset
+PD.SAS:        RMB       1                   Segment allocation size
+PD.TFM:        RMB       1                   DMA Transfer Mode
+PD.Exten:      RMB       2                   Path Extension (PE) for record locking
+PD.SToff:      RMB       1                   Sector/Track offsets (for "foreign" disk formats)
+PD.ATT:        RMB       1                   File attributes
+PD.FD:         RMB       3                   File descriptor psn
+PD.DFD:        RMB       3                   Directory file descriptor psn
+PD.DCP:        RMB       4                   File directory entry ptr
+PD.DVT:        RMB       2                   User readable dev tbl ptr
+               endsect
+
+* State Flags
+BUFMOD:        EQU       $01                 Buffer modified
+SINBUF:        EQU       $02                 Sector in buffer
+FDBUF:         EQU       $04                 File descriptor in buffer
+*EOFSEC:equ $08 End of file sector
+*EOF:equ $10 End of file
+InDriver:      EQU       $20                 Currently in Disk Driver, or queued
+BufBusy:       EQU       $40                 Buffer is currently busy
+
+               IFNE      Level-1
+************************************
+* Random Block Path Extension Format
+*
+* RBF paths under Level Two have additional information that
+* is referenced by the path extension area.
+*
+               csect
+PE.PE:         RMB       1                   PE path number
+PE.PDptr:      RMB       2                   Back ptr to this PE's Path Descriptor
+PE.NxFil:      RMB       2                   Drive Open-File list ptr
+PE.Confl:      RMB       2                   Circular File Conflict list
+PE.Lock:       RMB       1                   Path lockout status
+PE.LoLck:      RMB       4                   Low Locked Logical addr
+PE.HiLck:      RMB       4                   High Locked Logical addr
+PE.Wait:       RMB       2                   PE ptr to (next) locked-out PE
+PE.TmOut:      RMB       2                   Max ticks to wait for locked segment
+PE.Owner:      RMB       1                   Process ID of owner of locked segment
+PE.Req:        RMB       1                   Temp for PE.Lock in GAIN when LockSeg fails
+PE.Prior:      RMB       1                   Temp for process priority while in driver
+PE.SigSg:      RMB       1                   Signal code to send
+PE.SigID:      RMB       1                   Process ID to send the signal to
+               RMB       32-*                Reserved
+PE.FilNm:      RMB       32                  Temp for filename during directory search
+               endsect
+
+* PE.Lock status codes
+Unlocked:      EQU       0                   No portion of file is locked
+RcdLock:       EQU       1                   Record from LoLck to HiLck locked
+FileLock:      EQU       2                   Entire file locked
+EofLock:       EQU       4                   End of file is locked
+               ENDC      
+
+
+               PAG       
+***********************
+* LSN0 Disk Data Format
+*
+* Logical Sector Number 0 is the first sector on an RBF formatted device
+* and contains information about the device's size and format.
+*
+               csect
+DD.TOT:        RMB       3                   Total number of sectors
+DD.TKS:        RMB       1                   Track size in sectors
+DD.MAP:        RMB       2                   Number of bytes in allocation bit map
+DD.BIT:        RMB       2                   Number of sectors/bit
+DD.DIR:        RMB       3                   Address of root directory fd
+DD.OWN:        RMB       2                   Owner
+DD.ATT:        RMB       1                   Attributes
+DD.DSK:        RMB       2                   Disk ID
+DD.FMT:        RMB       1                   Disk format; density/sides
+DD.SPT:        RMB       2                   Sectors/track
+DD.RES:        RMB       2                   Reserved for future use
+DD.SIZ:        EQU       .                   Device descriptor minimum size
+DD.BT:         RMB       3                   System bootstrap sector
+DD.BSZ:        RMB       2                   Size of system bootstrap
+DD.DAT:        RMB       5                   Creation date
+DD.NAM:        RMB       32                  Volume name
+DD.OPT:        RMB       32                  Option area
+               endsect
+
+* DD.FMT Bit Definitions - valid only if device is a floppy disk
+FMT.SIDE:      EQU       %00000001           Single Sided=0, Double Sided=1
+FMT.DNS:       EQU       %00000010           Single Density=0, Double Density=1
+FMT.TDNS:      EQU       %00000100           Track Density: 48/135 TPI=0, 96 TPI=1
+FMT.T0DN:      EQU       %00100000           Track 0 Density, see FMT.DNS
+
+
+               PAG       
+************************
+* File Descriptor Format
+*
+* The file descriptor is a sector that is present for every file
+* on an RBF device.  It contains attributes, modification dates,
+* and segment information on a file.
+*
+               csect
+FD.ATT:        RMB       1                   Attributes
+FD.OWN:        RMB       2                   Owner
+FD.DAT:        RMB       5                   Date last modified
+FD.LNK:        RMB       1                   Link count
+FD.SIZ:        RMB       4                   File size
+FD.Creat:      RMB       3                   Segment list extension
+FD.SEG:        EQU       *                   Beginning of segment list
+               endsect
+
+* Segment List Entry Format
+               csect
+FDSL.A:        RMB       3                   Segment beginning physical sector number
+FDSL.B:        RMB       2                   Segment size
+               endsect
+               
+FDSL.S:        EQU       .                   Segment list entry size
+FD.LS1:        EQU       FD.SEG+((256-FD.SEG)/FDSL.S-1)*FDSL.S
+FD.LS2:        EQU       (256/FDSL.S-1)*FDSL.S
+MINSEC:        SET       16
+
+
+               PAG       
+************************
+* Directory Entry Format
+*
+* Directory entries are part of a directory and define the name
+* of the file, as well as a pointer to its file descriptor.
+*
+               csect
+DIR.NM:        RMB       29                  File name
+DIR.FD:        RMB       3                   File descriptor physical sector number
+DIR.SZ:        EQU       *                   Directory record size
+               endsect
+
+
+               PAG       
+********************
+* RBF Static Storage
+*
+* Overall Disk Static Storage
+*
+* Note:  This does not reserve any memory for drive tables.  Each
+*        driver is responsible for reserving sufficient memory for
+*        the appropriate number of tables.
+*
+               csect
+               RMB       V.USER              Reserve required           ($06)
+V.NDRV:        RMB       1                   Number of drives           ($07)
+               RMB       8                   reserved                   ($08)
+DRVBEG:        EQU       *                   Beginning of drive tables  ($10)
+               endsect
+
+               PAG       
+****************
+* Global Storage For Disk Drive Tables
+*
+* Each table contains the first 'DD.SIZ' bytes from
+* LSN 0, and the current track, stepping rate,
+* bitmap use flag, and disk type.
+*
+               csect
+               RMB       DD.SIZ              Device descriptor, LSN 0
+V.TRAK:        RMB       2                   Current track
+V.BMB:         RMB       1                   Bit-map use flag
+V.FileHd:      RMB       2                   Open file list for this drive
+V.DiskID:      RMB       2                   Disk ID
+V.BMapSz:      RMB       1                   Bitmap Size
+V.MapSct:      RMB       1                   Lowest reasonable bitmap sector
+V.ResBit:      RMB       1                   Reserved bitmap sector (for compaction)
+V.ScTkOf:      RMB       1                   Sector/Track byte (Combined from descriptor)
+V.ScOfst:      RMB       1                   Sector offset split from byte above
+V.TkOfst:      RMB       1                   Track offset split from byte above
+               RMB       4                   Reserved
+DRVMEM:        EQU       *
+               endsect
+
+               ENDC      
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/scfdefs.a	Wed Jan 13 05:22:08 2010 +0000
@@ -0,0 +1,244 @@
+********************************************************************
+* SCFDefs - Sequential Character File Manager Definitions
+*
+* $Id$
+*
+* SCF stands for 'Sequential Character Filemanager' and is a package of subroutines
+* that define the logical structure of a serial device.
+*
+* The data structures in this file give SCF its 'personality' and are used
+* by SCF itself, as well as applications that will require disk I/O.
+*
+* Edt/Rev  YYYY/MM/DD  Modified by
+* Comment
+* ------------------------------------------------------------------
+*          1984/01/11  YO
+* Added V.KANJI, V.KBUF, V.MODADR for new kanji input process.
+*
+*          1985/04/20  Mark G. Hawkins
+* Added V.PDLHd Path Descriptor List Head.
+*
+*          1985/04/21  Mark G. Hawkins
+* Added PD.PLP and PD.PST for modem handling.
+*
+*          1987/06/23  Kevin K. Darling
+* Updated with Dev Desc info.
+*
+*          1998/10/03  Boisy G. Pitre
+* Consolidated L1/L2 scfdefs.
+*
+*          2003/01/21  Boisy G. Pitre
+* Added symbolics for enhanced SCF line editing.
+*
+*          2003/06/02  Boisy G. Pitre
+* Updated comments for clarity.
+*
+*          2004/05/17  Boisy G. Pitre
+* Added higher baud rates.
+
+               NAM       SCFDefs
+               TTL       Sequential File Manager Definitions
+
+               PAG       
+*******************************
+* SCF Device Descriptor Offsets
+*
+* These definitions are for SCF device descriptors.
+
+               csect
+               RMB       M$DTyp
+IT.DVC:        RMB       1                   Device type (DT.SCF)
+IT.UPC:        RMB       1                   Uppercase flag
+IT.BSO:        RMB       1                   Backspace behavior
+IT.DLO:        RMB       1                   Delete behavior
+IT.EKO:        RMB       1                   Echo flag
+IT.ALF:        RMB       1                   Auto linefeed flag
+IT.NUL:        RMB       1                   End-of-line null count
+IT.PAU:        RMB       1                   Page pause flag
+IT.PAG:        RMB       1                   Number of lines per page
+IT.BSP:        RMB       1                   Backspace character
+IT.DEL:        RMB       1                   Delete-line character
+IT.EOR:        RMB       1                   End-of-record character
+IT.EOF:        RMB       1                   End-of-file character
+IT.RPR:        RMB       1                   Reprint-line character
+IT.DUP:        RMB       1                   Duplicate-last-line character
+IT.PSC:        RMB       1                   Pause character
+IT.INT:        RMB       1                   Interrupt character
+IT.QUT:        RMB       1                   Quit character
+IT.BSE:        RMB       1                   Backspace echo character
+IT.OVF:        RMB       1                   Bell character
+IT.PAR:        RMB       1                   Parity
+IT.BAU:        RMB       1                   Baud rate
+IT.D2P:        RMB       2                   Attached device name string offset
+IT.XON:        RMB       1                   X-ON character
+IT.XOF:        RMB       1                   X-OFF character
+IT.COL:        RMB       1                   Number of columns for display
+IT.ROW:        RMB       1                   Number of rows for display
+IT.XTYP:       RMB       1                   Extended type (added by BRI)
+
+*               IFGT      Level-1
+* Window Descriptor Additions
+* For CoCo window, where IT.PAR = $80
+                RMB       IT.ROW+1
+IT.WND:         RMB       1                   Window number (matches device name) ($2E)
+IT.VAL:         RMB       1                   Use defaults on Init (0=no, 1=yes)
+IT.STY:         RMB       1                   Screen type default
+IT.CPX:         RMB       1                   Column start default
+IT.CPY:         RMB       1                   Row start default
+IT.FGC:         RMB       1                   Foreground color default
+IT.BGC:         RMB       1                   Background color default
+IT.BDC:         RMB       1                   Border color default
+*               ENDC      
+               endsect
+
+               PAG       
+********************
+* SCF Static Storage
+*
+* SCF devices must reserve this space for SCF
+*
+               csect
+               RMB       V.USER
+V.TYPE:        RMB       1                   Device type or parity
+V.LINE:        RMB       1                   Lines left until end of page
+V.PAUS:        RMB       1                   Immediate Pause request
+V.DEV2:        RMB       2                   Attached device's static
+V.INTR:        RMB       1                   Interrupt char
+V.QUIT:        RMB       1                   Quit char
+V.PCHR:        RMB       1                   Pause char
+V.ERR:         RMB       1                   Accumulated errors
+V.XON:         RMB       1                   X-On char
+V.XOFF:        RMB       1                   X-Off char
+V.KANJI:       RMB       1                   Kanji mode flag
+V.KBUF:        RMB       2                   Kana - Kanji convert routine work address
+V.MODADR:      RMB       2                   Kana - Kanji convert module address
+V.PDLHd:       RMB       2                   Open path descriptor list head pointer
+V.RSV:         RMB       5                   Reserve bytes for future expansion
+V.SCF:         EQU       *                   Total SCF manager static overhead
+               endsect
+
+               PAG       
+***********************
+* Character Definitions
+*
+C$NULL:        SET       0                   Null char
+C$RPET:        SET       $01                 (CTRL-A - SOH) Repeat last input line
+C$INTR:        SET       $03                 (CTRL-C - ETX) Keyboard interrupt
+C$RPRT:        SET       $04                 (CTRL-D - EOT) Reprint current input line
+C$QUIT:        SET       $05                 (CTRL-E - ENQ) Keyboard Abort
+C$BELL:        SET       $07                 (CTRL-G - BEL) Line overflow warning
+C$BSP:         SET       $08                 (CTRL-H - BS ) Back space
+C$RARR:        SET       $09                 Right Arrow
+C$EL:          SET       $05                 Erase Line
+C$LF:          SET       $0A                 Line feed
+C$HOME:        SET       $0B                 Home position Code
+C$Clsgr:       SET       $15                 Graphic screen clear (use FM-11)
+C$Clsall:      SET       $16                 Graphic & character clear (use FM-11)
+C$CR:          SET       $0D                 Carriage return
+C$FORM:        SET       $0C                 (CTRL-L - FF ) Form Feed ... screen clear
+C$SI:          SET       $0F                 Shift IN Code
+C$SO:          SET       $0E                 Shift OUT Code
+C$DELETE:      SET       $10                 Delete char (for SCF enhanced line editing)
+C$XON:         SET       $11                 (CTRL-Q - DC1) Transmit Enable
+C$INSERT:      SET       C$XON               Insert char (for SCF enhanced line editing)
+C$XOFF:        SET       $13                 (CTRL-S - DC3) Transmit Disable
+C$PLINE:       SET       C$XOFF              Print remaining line (for SCF enhanced line editing)
+C$PAUS:        SET       $17                 (CTRL-W - ETB) Pause character
+C$DEL:         SET       $18                 (CTRL-X - CAN) Delete line
+C$SHRARR:      SET       $19                 Shift Right-Arrow
+C$EOF:         SET       $1B                 (CTRL-[ - ESC) END of file
+C$RGT:         SET       $1C                 Cursor right
+C$LFT:         SET       $1D                 Cursor left
+C$UP:          SET       $1E                 Cursor up
+C$DWN:         SET       $1F                 Cursor down
+C$SPAC:        SET       $20                 Space
+C$PERD:        SET       '.
+C$COMA:        SET       ',
+
+
+               PAG       
+*********************************************
+* Sequential Character Path Descriptor Format
+*
+* A path descriptor is created for every new path that is open
+* via the I$Open system call (processed by IOMan).  Process
+* descriptors track state information of a path.
+*
+               csect
+               RMB       PD.FST
+PD.DV2:        RMB       2                   Output device table pointer
+PD.RAW:        RMB       1                   Read/Write or ReadLn/WritLn mode
+PD.MAX:        RMB       2                   ReadLn high byte count
+PD.MIN:        RMB       1                   Devices are "mine" if clear
+PD.STS:        RMB       2                   Status routine module addr
+PD.STM:        RMB       2                   Reserved for status routine
+               endsect
+
+               csect
+               RMB       PD.OPT
+               RMB       1                   Device type
+PD.UPC:        RMB       1                   Case (0=both, 1=upper only)
+PD.BSO:        RMB       1                   Backspace (0=BSE, 1=BSE,SP,BSE)
+PD.DLO:        RMB       1                   Delete (0=BSE over line, 1=CRLF)
+PD.EKO:        RMB       1                   Echo (0=No Echo)
+PD.ALF:        RMB       1                   Auto linefeed (0=No auto LF)
+PD.NUL:        RMB       1                   End of Line null count
+PD.PAU:        RMB       1                   Page pause (0=No end of page pause)
+PD.PAG:        RMB       1                   Lines per page
+PD.BSP:        RMB       1                   Backspace character
+PD.DEL:        RMB       1                   Delete Line character
+PD.EOR:        RMB       1                   End of Record character (read only)
+PD.EOF:        RMB       1                   End of File character
+PD.RPR:        RMB       1                   Repront Line character
+PD.DUP:        RMB       1                   Dup Last Line character
+PD.PSC:        RMB       1                   Pause character
+PD.INT:        RMB       1                   Keyboard interrupt character (CTRL-C)
+PD.QUT:        RMB       1                   Keyboard quit character (CTRL-E)
+PD.BSE:        RMB       1                   Backspace echo character
+PD.OVF:        RMB       1                   Line overflow character (BELL)
+PD.PAR:        RMB       1                   Parity code
+PD.BAU:        RMB       1                   ACIA baud rate (Color Computer)
+PD.D2P:        RMB       2                   Offset of DEV2 name
+PD.XON:        RMB       1                   ACIA X-ON character
+PD.XOFF:       RMB       1                   ACIA X-OFF character
+OPTCNT         EQU       *-PD.OPT            Total user settable options
+PD.ERR:        RMB       1                   Most recent I/O error status
+PD.TBL:        RMB       2                   Device table addr (copy)
+PD.PLP:        RMB       2                   Path Descriptor List Pointer
+PD.PST:        RMB       1                   Current path status
+               endsect 
+
+* PD.PST values Path Descriptor Status byte
+*
+PST.DCD:       EQU       %00000001           Set if DCD is lost on Serial port
+
+
+* PD.PAR definitions
+*
+* Parity
+PARNONE:       EQU       %00000000
+PARODD:        EQU       %00100000
+PAREVEN:       EQU       %01100000
+PARMARK:       EQU       %10100000
+PARSPACE:      EQU       %11100000
+
+* PD.BAU definitions
+*
+* Baud rate
+B110:          EQU       %00000000
+B300:          EQU       %00000001
+B600:          EQU       %00000010
+B1200:         EQU       %00000011
+B2400:         EQU       %00000100
+B4800:         EQU       %00000101
+B9600:         EQU       %00000110
+B19200:        EQU       %00000111
+B38400:        EQU       %00001000
+B57600:        EQU       %00001001
+B115200:       EQU       %00001010
+* Word size
+WORD8:         EQU       %00000000
+WORD7:         EQU       %00100000
+* Stop bits
+STOP1:         EQU       %00000000
+STOP2:         EQU       %00010000
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/sys.a	Wed Jan 13 05:22:08 2010 +0000
@@ -0,0 +1,7 @@
+               psect     sys_a,0,0,0,0,0
+
+               use       os9defs.a
+               use       rbfdefs.a
+               use       scfdefs.a
+
+               endsect