home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / EFFO / pd1.lzh / SYS / HELP / modules.hlp < prev    next >
Text File  |  1989-10-24  |  13KB  |  244 lines

  1. @H
  2. @T0
  3. This help file contains the most often used offsets into OS-9 memory modules.
  4.  
  5. The module header is the same for all type of modules:
  6.  
  7.   Offset  Size  Name       Description
  8.   ------  ----  ---------  --------------------------------------------------
  9.    0/$00  word  M$ID       Sync Bytes ($4AFC = M$ID12)
  10.    2/$02  word  M$SysRev   Module format Revision ID
  11.    4/$04  long  M$Size     Module size in bytes
  12.    8/$08  long  M$Owner    Owner ID
  13.   12/$0C  long  M$Name     Offset to module name string
  14.   16/$10  word  M$Accs     Access permissions
  15.   18/$12  byte  M$Type     Module Type: 1=Prgrm, 2=Sbrtn, 3=Multi, 4=Data
  16.                                         5=CSDData, 11=TrapLib, 12=Systm
  17.                                         13=Flmgr, 14=Drivr, 15=Devic
  18.   19/$13  byte  M$Lang     Language: 0=Objct,2=ICode,3=PCode, >3=future.
  19.   20/$14  byte  M$Attr     Attributes: ReEntBit=7, GhostBit=6, SupStBit=5
  20.   21/$15  byte  M$Revs     Revision level
  21.   22/$16  word  M$Edit     Edition number
  22.   24/$18  long  M$Usage    Offset to usage string
  23.   28/$1C  long  M$Symbol   Offset to symbol table (not in use)
  24.   32/$20  14    -           reserved (7 words)
  25.   46/$2E  word  M$Parity   Header parity check
  26.   48/$30                   module type dependent (see subtopics)
  27. @D1
  28. Executables : 2
  29. Init_Module : 3
  30. Descriptors : 4 , 5
  31. @T2
  32. Executable modules can be Traphandlers, Programs, Device Drivers, File
  33. Managers and System Modules.
  34.  
  35. For all executable modules:
  36.  
  37.   Offset  Size  Name       Description
  38.   ------  ----  ---------  --------------------------------------------------
  39.   48/$30  long  M$Exec     Execution offset
  40.   52/$34  long  M$Excpt    Default User Trap Execution Entry Point
  41.  
  42. For device drivers, programs and traphandlers:
  43.  
  44.   Offset  Size  Name       Description
  45.   ------  ----  ---------  --------------------------------------------------
  46.   56/$38  long  M$Mem      Memory Size (data space)
  47.  
  48. For programs and traphandlers:
  49.  
  50.   Offset  Size  Name       Description
  51.   ------  ----  ---------  --------------------------------------------------
  52.   60/$3C  long  M$Stack    Stack size (stack data space)
  53.   64/$40  long  M$IData    Offset to initialisation data (in the module)
  54.   68/$44  long  M$IRefs    Offset to reference initialisation data
  55.  
  56. For traphandlers only:
  57.  
  58.   72/$48  long  M$Init     Offset to Traphandler initialisation routine
  59.   76/$4C  long  M$Term     Offset to Traphandler termination routine
  60. @T3
  61. The init module contains system startup parameters.
  62.  
  63.   Offset  Size  Name       Description
  64.   ------  ----  ---------  --------------------------------------------------
  65.   48/$30  long  -          reserved
  66.   52/$34  word  M$Pollsz   Number of IRQ polling table entries
  67.   54/$36  word  M$DevCnt   Number of entries in the device table
  68.   56/$38  word  M$Procs    Initial process table size (in # of processes)
  69.   58/$3A  word  M$Paths    Initial path table size (in # of paths)
  70.   60/$3C  word  M$Sparam   Offset to parameter string for startup module
  71.   62/$3E  word  M$SysGo    Offset to name of startup module (usually: "sysgo")
  72.   64/$40  word  M$SysDev   Offset to path of system device (usually a disk)
  73.   66/$42  word  M$Consol   Offset to initial standard I/O path (often "/term")
  74.   68/$44  word  M$Extens   Offset to name of customisation module
  75.   70/$46  word  M$Clock    Offset to name of clock module
  76.   72/$48  word  M$Slice    Number of ticks per time slice
  77.   74/$4A  6     -          reserved (3 words)
  78.   80/$50  word  M$Instal   Offset to installation name string
  79.   82/$52  long  M$CPUTyp   CPU Type: 68000,68010,68020,68030 (as a number !)
  80.   86/$56  long  M$OS9Lvl   Byte0=Level, Byte1.Byte2=Version, Byte3=Edition
  81.   90/$5A  word  M$OS9Rev   Offset to revision name string
  82.   92/$5C  word  M$SysPri   Initial system priority
  83.   94/$5E  word  M$MinPty   Initial system minimum executable priority
  84.   96/$60  word  M$MaxAge   Initial system maximal natural age
  85.   98/$62  4     -          reserved (2 words)
  86.  102/$66  word  M$Events   Initial event table size (in # of events)
  87.  104/$68  byte  M$Compat   Revision compatibility byte: Bit0:1=save regs on IRQ
  88.                            Bit1:1=ignore ghost bit, Bit2:1=kernel doesn't STOP
  89.                            Bit3:1=no cache burst (68030), Bit4:1=memory fill on
  90.                            allocate/deallocate, Bit5:1=do not start clock.
  91.  105/$69  byte  -          reserved
  92.  106/$6A  word  M$MemList  Offset to colored memory list (0 if none)
  93.  108/$6C  word  M$IRQStk   Size of IRQ stack (in long words)
  94.  110/$6E  word  M$ColdTrys # of retries to CHD to system device at coldstart
  95.  112/$70  20    -          reserved
  96.  
  97.  here the strings (+ ev. the colored memory list) referenced above will follow.
  98. @T4
  99. All device descriptors have the following module offsets in common:
  100.  
  101.   Offset  Size  Name       Description
  102.   ------  ----  ---------  --------------------------------------------------
  103.   48/$30  long  M$Port     absolute port address of the device
  104.   52/$34  byte  M$Vector   Vector number for IRQ
  105.   53/$35  byte  M$IRQLvl   IRQ interrupt level
  106.   54/$36  byte  M$Prior    IRQ polling priority
  107.   55/$37  byte  M$Mode     Device mode capabilities (Bits: dsi--ewr)
  108.   56/$38  word  M$FMgr     Offset to file manager name
  109.   58/$3A  word  M$PDev     Offset to device driver name
  110.   60/$3C  word  M$DevCon   Offset to device dependent configuration data
  111.   62/$3E  8     -          reserved (4 words)
  112.   70/$46  word  M$Opt      number of option bytes
  113.   72/$48  byte  M$DTyp     device type  (0=SCF, 1=RBF, 2=PIPE, 3=SBF, 4=NFM)
  114.  
  115.   the following fields are dependent on the file manager (see subtopics).
  116. @D5 W=19
  117. SCF_Descriptor : 6
  118. RBF_Descriptor : 7
  119. SBF_Descriptor : 8
  120. @T6
  121. The following fields are specific for SCF device descriptors.
  122.  
  123. (*) The names (PD_xxx) refer to offsets into the path descriptor and therefore
  124.     are not module offsets. Use the following expression to obtain real device
  125.     descriptor offsets: PD_xxx-PD_Opt+M$Opt. Please note also that the numbers
  126.     in the "Offset column" *are* module offsets, not path descriptor offsets!
  127.  
  128.   Offset  Size  Name (*)   Description
  129.   ------  ----  ---------  --------------------------------------------------
  130.   72/$48  byte  PD_DTP     Device type (=same offset as M$DTyp), value=0 (SCF)
  131.   73/$49  byte  PD_UPC     if<>0: uppercase lock is on.
  132.   74/$4A  byte  PD_BSO     if=0: SCF echoes PD_BSE for backspace (PD_BSP)
  133.                            if<>0: SCF echoes PD_BSE, space, PD_BSE
  134.   75/$4B  byte  PD_DLO     if=0: SCF erases line using repeated backspace
  135.                            if<>0: SCF echoes CR/LF when the line is deleted
  136.   76/$4C  byte  PD_EKO     if<>0: input characters will be echoed
  137.   77/$4D  byte  PD_ALF     if<>0: automatic linefeed sent after CR
  138.   78/$4E  byte  PD_NUL     # of null ($00) chars to be sent after CR/LF
  139.   79/$4F  byte  PD_PAU     if<>0: auto page pause enabled (after PD_PAG lines)
  140.   80/$50  byte  PD_PAG     page length in lines (used for auto page pause)
  141.   81/$51  byte  PD_BSP     Backspace input character (usually ^H)
  142.   82/$52  byte  PD_DEL     Delete line input character (usually ^X)
  143.   83/$53  byte  PD_EOR     End of record input character (alomst always CR=^M)
  144.   84/$54  byte  PD_EOF     End of file input character (usually ESC=^[ or ^Z)
  145.   85/$55  byte  PD_RPR     Reprint line input character (usually ^R)
  146.   86/$56  byte  PD_DUP     Duplicate from previous line input char (usually ^A)
  147.   87/$57  byte  PD_PSC     Pause character (usually ^W)
  148.   88/$58  byte  PD_INT     Keyboard interrupt (S$Intrpt=3, usually ^C)
  149.   89/$59  byte  PD_QUT     Keyboard abort character (S$Abort=2, usually ^E)
  150.   90/$5A  byte  PD_BSE     Backspace echo character (often ^H)
  151.   91/$5B  byte  PD_OVF     Line overflow signal character (usually BEL=^G)
  152.   92/$5C  byte  PD_PAR     Serial Params: Bits1&0: 00=no 01=odd, 11=even parity
  153.                                           Bits3&2: 00=8, 01=7, 02=6, 03=5 bits
  154.                                           Bits5&4: 00=1, 01=1.5, 10=2 stop bits
  155.                                           Bits7&6: reserved
  156.   93/$5D  byte  PD_BAU     Baudrate: 0=50, 1=75, 2=110, 3=134.5, 4=150, 5=300,
  157.                                      6=600, 7=1200, 8=1800, 9=2000, A=2400,
  158.                                      B=3600, C=4800, D=7200, E=9600, F=19200,
  159.                                      FF=external
  160.   94/$5E  word  PD_D2P     Output device name string offset (usually=M$Name)
  161.   96/$60  byte  PD_XON     X-on character (0=none, usually DC1=^Q)
  162.   97/$61  byte  PD_XOFF    X-off character (0=none, usually DC3=^S)
  163.   98/$62  byte  PD_Tab     Tab character (usually ^I)
  164.   99/$63  byte  PD_Tabs    Tab field size (usually 4)
  165. @T7
  166. The following fields are specific for RBF device descriptors.
  167.  
  168. (*) The names (PD_xxx) refer to offsets into the path descriptor and therefore
  169.     are not module offsets. Use the following expression to obtain real device
  170.     descriptor offsets: PD_xxx-PD_Opt+M$Opt. Please note also that the numbers
  171.     in the "Offset column" *are* module offsets, not path descriptor offsets!
  172.  
  173.   Offset  Size  Name (*)   Description
  174.   ------  ----  ---------  --------------------------------------------------
  175.   72/$48  byte  PD_DTP     Device type (=same offset as M$DTyp), value=1 (RBF)
  176.   73/$49  byte  PD_DRV     Drive number (0..n-1, where n= max # of drives)
  177.   74/$4A  byte  PD_STP     Step rate (0=fast..3=slow, see manual)
  178.   75/$4B  byte  PD_TYP     Disk type: Bit0: 0=5"floppy, 1=8"floppy
  179.                                       Bit5: 0=track0 SD, 1=track0 DD
  180.                                       Bit7: 0=floppy disk, 1=hard disk
  181.   76/$4C  byte  PD_DNS     Density:   Bit0: 0=SD, 1=DD
  182.                                       Bit1: 0=40 Track, 1=80 Track (48/96TpI)
  183.                                       Bit2: reserved for quad density
  184.   77/$4D  byte  -          reserved
  185.   78/$4E  word  PD_CYL     Number of cylinders
  186.   80/$50  byte  PD_SID     Number of heads (harddisks) or sides (floppies)
  187.   81/$51  byte  PD_VFY     0=verify disk writes, 1=don't verify
  188.   82/$52  word  PD_SCT     Number of sectors per track (default)
  189.   84/$54  word  PD_TOS     Number of sectors on track 0 (default)
  190.   86/$56  word  PD_SAS     Segment allocation size
  191.   88/$58  byte  PD_ILV     Sector interleave factor (1 = no interleaving)
  192.   89/$59  byte  PD_TFM     DMA transfer mode (implementation specific)
  193.   90/$5A  byte  PD_TOffs   Track base offset
  194.   91/$5B  byte  PD_SOffs   Sector base offset
  195.   92/$5C  word  PD_SSize   Sector size in bytes (currently fixed on 256)
  196.   94/$5E  word  PD_Cntl    Control word: Bit0: 1=formatting disabled
  197.                                          Bit1: 1=multisector I/O possible
  198.                                          Bit3: 1=autosizing media
  199.                                          Bit4: 1=can format single track
  200.   96/$60  byte  PD_Trys    Number of retries: 0=default, 1=none, 2..255=#trys
  201.   97/$61  byte  PD_LUN     Logical Unit number of SCSI Drive
  202.   98/$62  word  PD_WPC     Cylinder to begin write precomensation
  203.  100/$64  word  PD_RWR     Cylinder to begin reduced write current
  204.  102/$66  word  PD_PARK    Cylinder to park disk head
  205.  104/$68  long  PD_LSNOffs Logical sector offset (for partitioned SCSI drives)
  206.  108/$6C  word  PD_TotCyls Total number of cylinders on partitioned SCSI drive
  207.  110/$6E  byte  PD_CtrlrID SCSI controller ID (bitmask/number, impl.dependent)
  208.  112/$70  long  PD_ScsiOpt SCSI option flags: Bit0: 1=SCSI parity enabled
  209.                                               Bit1: 1=ATN support enabled
  210.                                               Bit2: 1=synchronous transfer
  211.                                               Bit3: 1=target mode supported
  212.  
  213. here device specific data may follow if M$DevCon is<>0. This often includes
  214. additional parameters for SCSI controller setup etc. DevCon data is highly
  215. hardware and implementation specific.
  216. @T8
  217. The following fields are specific for SBF device descriptors.
  218.  
  219. (*) The names (PD_xxx) refer to offsets into the path descriptor and therefore
  220.     are not module offsets. Use the following expression to obtain real device
  221.     descriptor offsets: PD_xxx-PD_Opt+M$Opt. Please note also that the numbers
  222.     in the "Offset column" *are* module offsets, not path descriptor offsets!
  223.  
  224.   Offset  Size  Name (*)   Description
  225.   ------  ----  ---------  --------------------------------------------------
  226.   72/$48  byte  PD_DTP     Device type (=same offset as M$DTyp), value=3 (SBF)
  227.   73/$49  byte  PD_TDrv    Tape Drive number (0..n-1, where n= max # of drives)
  228.   74/$4A  byte  PD_SBF     reserved
  229.   75/$4B  byte  PD_NumBlk  Maximum number of blocks to allocate
  230.   76/$4C  long  PD_BlkSiz  Size of blocks allocated
  231.   80/$50  word  PD_Prior   Driver process priority
  232.   82/$52  byte  PD_Flags   Drive capability flags: Bit0: 1=rewind on close
  233.                                                    Bit1: 1=offline on close
  234.                                                    Bit2: 1=erase to eot on clos
  235.   83/$53  byte  -          reserved for driver
  236.   84/$54  word  PD_DMAMode DMA mode. Hardware and implementation specific
  237.   86/$56  byte  PD_ScsiID  SCSI controller ID (bitmask/number, impl.dependent)
  238.   87/$57  byte  PD_ScsiLUN Logical Unit number of SCSI Tape Drive
  239.   88/$58  long  ??         SCSI option flags: Bit0: 1=SCSI parity enabled
  240.                                               Bit1: 1=ATN support enabled
  241.                                               Bit2: 1=synchronous transfer
  242.                                               Bit3: 1=target mode supported
  243.  
  244.