home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD v1.2 / amidev_cd_12.iso / devcon / washington_1988 / devcon88.3 / autoboot / demobootromcode < prev    next >
Text File  |  1992-08-27  |  19KB  |  794 lines

  1.  
  2. *   ------------------
  3. *   Demo_Boot_ROM_Code
  4. *   ------------------
  5. *   By Bart Whitebook
  6. *
  7. *   This code fragment may be used as one model for autoboot rom code.
  8. *
  9. *   Copyright (c) 1988 Commodore-Amiga, Inc.
  10. *
  11. *   Title to this software and all copies thereof remain vested in the
  12. *   authors indicated in the above copyright notice.  The object version
  13. *   of this code may be used in software for Commodore Amiga computers.
  14. *   All other rights are reserved.
  15. *
  16. *   NO REPRESENTATIONS OR WARRANTIES ARE MADE WITH RESPECT TO THE
  17. *   ACCURACY, RELIABILITY, PERFORMANCE OR OPERATION OF THIS SOFTWARE,
  18. *   AND ALL USE IS AT YOUR OWN RISK.  NEITHER COMMODORE NOR THE
  19. *   AUTHORS ASSUME ANY RESPONSIBILITY OR LIABILITY WHATSOEVER WITH
  20. *   RESPECT TO YOUR USE OF THIS SOFTWARE.
  21. *
  22.  
  23.  ******************************************************************************
  24.  *
  25.  * Source Control
  26.  * --------------
  27.  * $Header: autoboot,v 35.3 88/03/23 17:04:41 bart Exp $
  28.  *
  29.  * $Locker:  $
  30.  *
  31.  ******************************************************************************
  32.  
  33.    INCLUDE "bootrom.i"
  34.   
  35.  Boot_Rom: 
  36.   
  37.    dc.b    (DAC_WORDWIDE+DAC_CONFIGTIME)
  38.    dc.b    (NULL)
  39.    dc.w    Boot_EndCode+(*-Boot_Rom)
  40.    dc.w    (Rom_Diagnostics-Boot_Rom)
  41.    dc.w    (AutoBoot_Vector-Boot_Rom)
  42.    dc.w    (Boot_Name-Boot_Rom)
  43.    dc.w    (NULL)
  44.    dc.w    (NULL)
  45.   
  46.   
  47.  Rom_Diagnostics:          ;   config time entry point
  48.  
  49.  ; upon entry
  50.  ; d0 == 0
  51.  ; a0 == pointer to boardbase
  52.  ; a2 == pointer to copy of diagarea
  53.  ; a3 == pointer to configdev structure for this board
  54.  ;
  55.  ; N.B.: rom/diagnostic MAY ONLY ACCESS exec.library FUNCTIONS !!!
  56.  ;                      === ==== ====== ============
  57.  
  58.    ; must resolve references in romtag if loaded as raw memory image
  59.  
  60.    LEA     deviceName(PC),A0
  61.    LEA     rt_Name(PC),A1
  62.    MOVE.L  A0,(A1)
  63.  
  64.    LEA     ResidentTag(PC),A0
  65.    LEA     rt_MatchTag(PC),A1
  66.    MOVE.L  A0,(A1)
  67.  
  68.    LEA     deviceIDString(PC),A0
  69.    LEA     rt_IDString(PC),A1
  70.    MOVE.L  A0,(A1)
  71.  
  72.  
  73.    LEA     deviceInit(PC),A0
  74.    LEA     rt_Init(PC),A1
  75.    MOVE.L  A0,(A1)
  76.  
  77.    LEA     Boot_EndCode(PC),A0
  78.    LEA     rt_EndCode(PC),A1
  79.    MOVE.L  A0,(A1)
  80.  
  81.    ;------ now let AutoBoot bring us up by the bootstraps
  82.  
  83.    MOVEQ.L #1,D0                   ; indicate "success"
  84.    RTS
  85.  
  86.    DC.W    RTC_MATCHWORD           ; UWORD RT_MATCHWORD
  87.  rt_MatchTag:
  88.    DC.L    ResidentTag             ; APTR  RT_MATCHTAG
  89.  rt_EndCode:
  90.    DC.L    Boot_EndCode            ; APTR  RT_ENDSKIP
  91.    DC.B    RTW_COLDSTART           ; UBYTE RT_FLAGS
  92.    DC.B    VERSION                 ; UBYTE RT_VERSION
  93.    DC.B    NT_DEVICE               ; UBYTE RT_TYPE
  94.    DC.B    20                      ; BYTE  RT_PRI
  95.  rt_Name:
  96.    DC.L    deviceName              ; APTR  RT_NAME
  97.  rt_IDString:
  98.    DC.L    deviceIDString          ; APTR  RT_IDSTRING
  99.  rt_Init:
  100.    DC.L    deviceInit              ; APTR  RT_INIT
  101.                                    ; LABEL RT_SIZE
  102.  
  103.  AutoBoot_Vector:                  ; boot time entry point
  104.  
  105.    LEA AutoBoot_DosName(PC),A1
  106.  
  107.    JSR     _LVOFindResident(A6)    ; locate the DOS
  108.  
  109.    TST.L   D0
  110.    BEQ.S   AutoBoot_Return         
  111.  
  112.    ;------ and open the DOS
  113.  
  114.    MOVE.L  D0,A0
  115.    MOVE.L  RT_INIT(A0),A0          ; set bootstrap vector
  116.  
  117.    JSR     (A0)                    ; rock 'n roll !!!
  118.  
  119.  AutoBoot_Return:
  120.  
  121.    RTS
  122.  
  123.  
  124.  * Remember that Init is run with SysLib in A6, unlike most of
  125.  * the rest of the driver, which has the Device structure in A6
  126.  
  127.    XREF    _LVOAllocMem
  128.    XREF    _LVOMakeLibrary
  129.    XREF    _LVOAddDevice
  130.    XREF    _LVOOpenLibrary
  131.    XREF    _LVOGetCurrentBinding
  132.    XREF    _LVOCloseLibrary
  133.    XREF    _LVOFreeMem
  134.    XREF    _LVOMakeDosNode
  135.  
  136.  deviceInit:
  137.  
  138.    MOVEM.L D2/A2-A4,-(SP)
  139.  
  140.  *     ;------ get temp memory
  141.  
  142.    MOVE.L  #INIT_SIZE,D0
  143.    MOVE.L  #MEMF_CLEAR!MEMF_PUBLIC,D1
  144.    CALLLIB _LVOAllocMem
  145.    TST.L   D0
  146.    BNE.S   Alloc_Success
  147.  
  148.    ALERT   (AN_AMHDDiskDev!AG_NoMemory),,A0
  149.  
  150.  Alloc_Success:    
  151.  
  152.    MOVE.L  D0,A3
  153.  
  154.  *     ;----- call the library initialization routine
  155.  
  156.    LEA devFuncInit(PC),A0
  157.    LEA devStructInit(PC),A1
  158.    SUB.L   A2,A2
  159.    MOVE.L  #DV_SIZE,D0
  160.    CALLLIB _LVOMakeLibrary
  161.  
  162.    TST.L   D0
  163.    BNE.S   Init_Success
  164.  
  165.  Init_Alert:
  166.  
  167.    ALERT   (AN_TrackDiskDev!AG_MakeLib),,A0
  168.  
  169.  Init_Success:
  170.  
  171.  *     ;------ Add your device to the system
  172.  
  173.    MOVE.L  D0,A1
  174.    CALLLIB _LVOAddDevice
  175.  
  176.  
  177.  *     ;------  we will need to access the expansion.library to get bindings
  178.  
  179.    LEA.L   ExLibName(PC),A1                ; Get expansion lib. name
  180.    CLR D0
  181.    CALLLIB _LVOOpenLibrary                 ; Open the expansion library
  182.    TST.L   D0
  183.    BNE.S   Exp_OpSuccess
  184.  
  185.  Exp_OpFail:
  186.  
  187.    ALERT   (AN_AMHDDiskDev!AG_OpenLib),,A0
  188.  
  189.  Exp_OpSuccess:    
  190.  
  191.    MOVE.L  D0,A4
  192.  
  193.    LEA INIT_CBIND(A3),A0                   ; Get the Current Bindings
  194.    MOVE.L  #CurrentBinding_SIZEOF,D0       ; Size of Current Binding struct
  195.    LINKLIB _LVOGetCurrentBinding,A4
  196.    MOVE.L  INIT_CBIND+cb_ConfigDev(A3),D0  ; Get  address of ConfigDev
  197.  
  198.  Config_Test:  
  199.  
  200.    TST.L   D0                              ; If controller not found
  201.    BEQ Init_End                            ; Exit and unload driver
  202.  
  203.    MOVE.L  D0,INIT_CADDR(A3)               ; pass ConfigDev to Init_Unit
  204.  
  205.    BRA Init_Unit                           ; initialize your unit
  206.  
  207.  Init_End:
  208.  
  209.    MOVE.L  A4,A1                           ; Now close expansion library
  210.    CALLLIB _LVOCloseLibrary
  211.  
  212.    MOVE.L  A3,A1
  213.    MOVE.L  #INIT_SIZE,D0
  214.    CALLLIB _LVOFreeMem
  215.    MOVEQ.L #1,D0                           ; Indicate success
  216.    MOVEM.L (SP)+,D2/A2-A4
  217.    RTS
  218.  
  219.  
  220.  *    ---------
  221.  *    Init_Unit:
  222.  *    ---------
  223.  *  this particular routine expects ExpansionBase in A4
  224.  
  225.  Init_Unit:
  226.  
  227.    MOVEM.L D2-D7/A2-A7,-(SP)
  228.  
  229.  *     ; initialize your unit here
  230.  
  231.    NOP
  232.  
  233.  *     ; if everything went OK, put a BootNode on the eb_MountList
  234.  
  235.    CLEAR   D1
  236.    MOVEQ.L #BootNode_SIZEOF,d0
  237.    LINKSYS AllocMem
  238.    TST.L   D0
  239.    BEQ.S   BootNode_Done
  240.    MOVE.L  D0,A1                           ; Get BootNode address
  241.  
  242.    MOVE.L  A1,-(SP)                        ; save pointer to BootNode
  243.    LEA HDB_DOSNPTR+INIT_SECT(A2),A0
  244.    LINKLIB _LVOMakeDosNode,A4              ; Build AmigaDOS structures
  245.    MOVE.L  (SP)+,A1                        ; restore pointer to BootNode
  246.  
  247.    TST.L   D0
  248.    BEQ.S   Free_BootNode
  249.  
  250.    MOVE.W  #0,bn_Flags(A1)
  251.    MOVE.B  #0,LN_PRI(A1)           ; priority 0 for run-of-the-mill device
  252.    MOVE.B  #NT_BOOTNODE,LN_TYPE(A1)    ; type NT_BOOTNODE indicates
  253.    MOVE.L  D0,bn_DeviceNode(A1)        ; that this DeviceNode is associated
  254.    MOVE.L  INIT_CADDR(A3),LN_NAME(A1)  ; with CD address in ln_Name field
  255.  
  256.  *     ; AddDosNode does not currently allow us to pass the CD in the
  257.  *     ; ln_Name field of the BootNode structure added to the eb_MountList.
  258.  *     ; So, we will just Enqueue() it to the MountList directly...
  259.  
  260.    LEA.L   eb_MountList(A4),A0     
  261.    LINKSYS Enqueue                 ; add BootNode to MountList
  262.  
  263.    BRA.S   BootNode_Done
  264.  
  265.  Free_BootNode:
  266.  
  267.    MOVEQ.L #BootNode_SIZEOF,D0
  268.    LINKSYS FreeMem
  269.  
  270.  BootNode_Done:
  271.  
  272.    MOVEM.L (SP)+,D2-D7/A2-A7
  273.    RTS
  274.  
  275.  
  276.  LocalStrings:
  277.  
  278.  AutoBoot_DosName: DOSNAME
  279.  
  280.  Boot_Name: BOOT_NAME
  281.  
  282.  deviceName: DEVICE_NAME
  283.  
  284.  deviceIDString: VSTRING
  285.  
  286.  Boot_EndCode:
  287.  
  288.    DC.L    0
  289.  
  290.    END
  291.  
  292.  
  293.  
  294.  
  295. -------------------------------------------
  296. SMALL_MODEL_Demo_Code:_Executing_out_of_ROM
  297. -------------------------------------------
  298.  
  299.    INCLUDE "bootrom.i"
  300.    INCLUDE "bootrom_rev.i"
  301.    INCLUDE "hddisk.i"
  302.    INCLUDE "libraries/expansion.i"
  303.  
  304.    XREF    Init
  305.    XREF    _LVOFindResident
  306.  
  307.  Small_Rom: 
  308.    dc.b    (DAC_WORDWIDE+DAC_CONFIGTIME)
  309.    dc.b    (NULL)
  310.    dc.w    (EndCode-Small_Rom)
  311.    dc.w    (Rom_Diagnostics-Small_Rom)
  312.    dc.w    (AutoBoot_Vector-Small_Rom)
  313.    dc.w    (Boot_Name-Small_Rom)
  314.    dc.w    (NULL)
  315.    dc.w    (NULL)
  316.  
  317.  AutoBoot_Vector:
  318.    MOVE.L  D0,-(SP)              ; save d0
  319.  
  320.    LEA AutoBoot_Dosname(PC),A1
  321.    JSR     _LVOFindResident(A6)    ; initialize the device driver
  322.  
  323.    TST.L   D0
  324.    BEQ.S   AutoBoot_NoDos
  325.  
  326.    ;------ and let the strap call the dos
  327.  
  328.    MOVE.L  D0,A0
  329.    MOVE.L  RT_INIT(A0),A0  ; set bootstrap vector
  330.  
  331.    JSR     (A0)            ;   rock 'n roll !!!
  332.  
  333.  AutoBoot_Return:
  334.    MOVE.L  (SP)+,D0        ; restore d0
  335.    RTS
  336.  
  337.  AutoBoot_NoDos:
  338.    MOVE.L  D0,A0           ; clear bootstrap vector
  339.    BRA.S   AutoBoot_Return
  340.  
  341.  AutoBoot_Dosname:
  342.    DOSNAME
  343.  
  344.  Boot_Name: 
  345.    BOOT_NAME
  346.  
  347.    DS.W    0
  348.  
  349.  
  350.  initDDescrip:                 ;STRUCTURE RT,0
  351.    DC.W    RTC_MATCHWORD       ; UWORD RT_MATCHWORD
  352.  rt_MatchTag:
  353.    DC.L    initDDescrip        ; APTR  RT_MATCHTAG
  354.  rt_EndCode:
  355.    DC.L    EndCode             ; APTR  RT_ENDSKIP
  356.    DC.B    RTW_COLDSTART       ; UBYTE RT_FLAGS
  357.    DC.B    VERSION             ; UBYTE RT_VERSION
  358.    DC.B    NT_DEVICE           ; UBYTE RT_TYPE
  359.    DC.B    20                  ; BYTE  RT_PRI
  360.  rt_Name:
  361.    DC.L    hdName              ; APTR  RT_NAME
  362.  rt_IDString:
  363.    DC.L    hdIDString          ; APTR  RT_IDSTRING
  364.  rt_Init:
  365.    DC.L    Init                ; APTR  RT_INIT == long offset from ROM base
  366.                                ; LABEL RT_SIZE
  367.  
  368.  ExLibName EXPANSIONNAME   ; Expansion Library Name
  369.  
  370.  IntuitLibName 
  371.        DC.B    'intuition.library',0
  372.  
  373.  hdName:
  374.        HD_NAME
  375.  
  376.  *     ;------ our name identification string
  377.  
  378.  hdIDString:   VSTRING
  379.  
  380.  VERNUM:       EQU VERSION
  381.  
  382.  REVNUM        EQU REVISION
  383.  
  384.        DS.W    0
  385.  
  386.  Rom_Diagnostics:          ;   config time entry point
  387.  
  388.  ; upon entry
  389.  ; d0 == 0
  390.  ; a0 == pointer to boardbase
  391.  ; a2 == pointer to copy of diagarea 
  392.  ; a3 == pointer to configdev structure for this board
  393.  
  394.    MOVEM.L A1,-(SP)
  395.  
  396.    ; must resolve references in romtag if loaded as raw memory image
  397.  
  398.    LEA     rt_Init(PC),A1      ; in order to execute out of ROM
  399.    MOVE.L  (A1),D0             ; get long offset from ROM origin
  400.    ADD.L   A0,D0               ; add the boardbase to the offset
  401.    MOVE.L  D0,(A1)             ; and replace offset with absolute
  402.  
  403.  
  404.    LEA     hdName(PC),A0
  405.    LEA     rt_Name(PC),A1
  406.    MOVE.L  A0,(A1)
  407.  
  408.    LEA     initDDescrip(PC),A0
  409.    LEA     rt_MatchTag(PC),A1
  410.    MOVE.L  A0,(A1)
  411.  
  412.    LEA     hdIDString(PC),A0
  413.    LEA     rt_IDString(PC),A1
  414.    MOVE.L  A0,(A1)
  415.  
  416.    LEA     EndCode(PC),A0
  417.    LEA     rt_EndCode(PC),A1
  418.    MOVE.L  A0,(A1)
  419.  
  420.    ;------ now let AutoBoot bring us up by the bootstraps
  421.  
  422.    MOVEM.L (SP)+,A1
  423.  
  424.    MOVEQ.L #1,D0               ; indicate "success"
  425.    RTS
  426.  
  427.  EndCode:
  428.  
  429.    DC.L    0
  430.  
  431.    END
  432.  
  433.  
  434.  
  435. -------------
  436. Include_Files
  437. -------------
  438.  
  439.  /*********************************************************************
  440.  *
  441.  *   Commodore Amiga -- ROM Operating System Include Files
  442.  *
  443.  *  Copyright (C) 1987,  Commodore-Amiga, Inc., All rights reserved.
  444.  *
  445.  *  exec/nodes.h
  446.  *
  447.  *********************************************************************/
  448.  
  449.  #ifndef   EXEC_NODES_H
  450.  #define   EXEC_NODES_H
  451.  
  452.  /* normal node */
  453.  struct Node { 
  454.      struct  Node *ln_Succ;
  455.      struct  Node *ln_Pred;
  456.      UBYTE   ln_Type;
  457.      BYTE    ln_Pri; 
  458.      char    *ln_Name; 
  459.  };
  460.  
  461.  /* stripped node -- no type checking is possible */
  462.  struct MinNode {
  463.      struct MinNode *mln_Succ;
  464.      struct MinNode *mln_Pred;
  465.  };
  466.  
  467.  /*----- Node Types --------*/
  468.  #define NT_UNKNOWN    0 
  469.  #define NT_TASK       1 
  470.  #define NT_INTERRUPT  2 
  471.  #define NT_DEVICE 3 
  472.  #define NT_MSGPORT    4 
  473.  #define NT_MESSAGE    5 
  474.  #define NT_FREEMSG    6 
  475.  #define NT_REPLYMSG   7 
  476.  #define NT_RESOURCE   8
  477.  #define NT_LIBRARY    9
  478.  #define NT_MEMORY 10
  479.  #define NT_SOFTINT    11
  480.  #define NT_FONT       12
  481.  #define NT_PROCESS    13
  482.  #define NT_SEMAPHORE  14
  483.  #define NT_SIGNALSEM  15  /* signal semaphores */
  484.  #define NT_BOOTNODE   16
  485.  
  486.  #endif
  487.      IFND EXEC_NODES_I
  488.  EXEC_NODES_I SET 1
  489.  
  490.  
  491.  **********************************************************************
  492.  *
  493.  *  Copyright (C) 1987,  Commodore-Amiga, Inc., All rights reserved.
  494.  *
  495.  *  exec/nodes.i
  496.  *
  497.  **********************************************************************
  498.  
  499.  *----------------------------------------------------------------
  500.  *
  501.  *   List Node Structure
  502.  *
  503.  *----------------------------------------------------------------
  504.  
  505.   STRUCTURE  LN,0
  506.      APTR    LN_SUCC
  507.      APTR    LN_PRED
  508.      UBYTE   LN_TYPE
  509.      BYTE    LN_PRI
  510.      APTR    LN_NAME
  511.      LABEL   LN_SIZE
  512.  
  513.  ; min node -- only has minimum necessary, no type checking possible
  514.   STRUCTURE  MLN,0
  515.      APTR    MLN_SUCC
  516.      APTR    MLN_PRED
  517.      LABEL   MLN_SIZE
  518.  
  519.  *------ Node Types:
  520.  
  521.  NT_UNKNOWN      EQU     0
  522.  NT_TASK         EQU     1
  523.  NT_INTERRUPT    EQU     2
  524.  NT_DEVICE       EQU     3
  525.  NT_MSGPORT      EQU     4
  526.  NT_MESSAGE      EQU     5
  527.  NT_FREEMSG      EQU     6
  528.  NT_REPLYMSG     EQU     7
  529.  NT_RESOURCE     EQU     8
  530.  NT_LIBRARY      EQU     9
  531.  NT_MEMORY       EQU     10
  532.  NT_SOFTINT    EQU 11
  533.  NT_FONT   EQU 12
  534.  NT_PROCESS    EQU 13
  535.  NT_SEMAPHORE  EQU 14
  536.  NT_SIGNALSEM  EQU 15  ; signal semaphores
  537.  NT_BOOTNODE   EQU 16
  538.  
  539.      ENDC !EXEC_NODES_I
  540.  
  541.  
  542.  /*************************************************************************
  543.  *  Copyright (C) 1987,  Commodore-Amiga, Inc., All rights reserved.
  544.  *
  545.  *  libraries/expansionbase.h
  546.  **************************************************************************/
  547.  
  548.  #ifndef LIBRARIES_EXPANSIONBASE_H
  549.  #define LIBRARIES_EXPANSIONBASE_H   1
  550.  
  551.  #ifndef EXEC_TYPES_H
  552.  #include "exec/types.h"
  553.  #endif  !EXEC_TYPES_H
  554.  
  555.  #ifndef EXEC_LIBRARIES_H
  556.  #include "exec/libraries.h"
  557.  #endif    !EXEC_LIBRARIES_H
  558.  
  559.  #ifndef EXEC_INTERRUPTS_H
  560.  #include "exec/interrupts.h"
  561.  #endif    !EXEC_INTERRUPTS_H
  562.  
  563.  #ifndef EXEC_SEMAPHORES_H
  564.  #include "exec/semaphores.h"
  565.  #endif    !EXEC_SEMAPHORES_H
  566.  
  567.  #ifndef LIBRARIES_CONFIGVARS_H
  568.  #include "libraries/configvars.h"
  569.  #endif    !LIBRARIES_CONFIGVARS_H
  570.  
  571.  #define TOTALSLOTS 256
  572.  
  573.  struct ExpansionInt
  574.  {
  575.    UWORD   IntMask;
  576.    UWORD   ArrayMax;
  577.    UWORD   ArraySize;
  578.  };
  579.  struct    ExpansionBase
  580.  {
  581.    struct Library  LibNode;
  582.    UBYTE   Flags;
  583.    UBYTE   pad;
  584.    APTR    ExecBase;
  585.    APTR    SegList;
  586.    struct  CurrentBinding  CurrentBinding;
  587.    struct  List    BoardList;
  588.    struct  List    MountList;
  589.    UBYTE   AllocTable[TOTALSLOTS];
  590.    struct  SignalSemaphore BindSemaphore;
  591.    struct  Interrupt   Int2List;
  592.    struct  Interrupt   Int6List;
  593.    struct  Interrupt   Int7List;
  594.  };
  595.  #endif !LIBRARIES_EXPANSIONBASE_H
  596.  
  597.  
  598.  ***************************************************************************
  599.  *
  600.  *  Copyright (C) 1987,  Commodore-Amiga, Inc., All rights reserved.
  601.  *
  602.  *  libaries/expansionbase.i
  603.  *
  604.  ***************************************************************************
  605.  
  606.    IFND    EXPANIONBASE_I
  607.  EXPANIONBASE_I    SET 1
  608.  
  609.  
  610.    IFND    EXEC_TYPES_I
  611.    INCLUDE "exec/types.i"
  612.    ENDC    EXEC_TYPES_I
  613.  
  614.    IFND    EXEC_LIBRARIES_I
  615.    INCLUDE "exec/libraries.i"
  616.    ENDC    EXEC_LIBRARIES_I
  617.  
  618.    IFND    EXEC_INTERRUPTS_I
  619.    INCLUDE "exec/interrupts.i"
  620.    ENDC    EXEC_INTERRUPTS_I
  621.  
  622.    IFND    EXEC_SEMAPHORES_I
  623.    INCLUDE "exec/semaphores.i"
  624.    ENDC    EXEC_SEMAPHORES_I
  625.  
  626.    IFND    LIBRARIES_CONFIGVARS_I
  627.    INCLUDE "libraries/configvars.i"
  628.    ENDC    LIBRARIES_CONFIGVARS_I
  629.  
  630.  
  631.  TOTALSLOTS    EQU 256
  632.  
  633.   STRUCTURE    ExpansionInt,0
  634.      UWORD     ei_IntMask  ; mask for this list
  635.      UWORD     ei_ArrayMax ; current max valid index
  636.      UWORD     ei_ArraySize    ; allocated size
  637.      LABEL     ei_Array    ; actual data is after this
  638.      LABEL     ExpansionInt_SIZEOF
  639.  
  640.   STRUCTURE    ExpansionBase,LIB_SIZE
  641.      UBYTE     eb_Flags
  642.      UBYTE     eb_pad
  643.      ULONG     eb_ExecBase
  644.      ULONG     eb_SegList
  645.      STRUCT        eb_CurrentBinding,CurrentBinding_SIZEOF
  646.      STRUCT        eb_BoardList,LH_SIZE
  647.      STRUCT        eb_MountList,LH_SIZE
  648.      STRUCT        eb_AllocTable,TOTALSLOTS
  649.      STRUCT        eb_BindSemaphore,SS_SIZE
  650.      STRUCT        eb_Int2List,IS_SIZE
  651.      STRUCT        eb_Int6List,IS_SIZE
  652.      STRUCT        eb_Int7List,IS_SIZE
  653.      LABEL     ExpansionBase_SIZEOF
  654.  
  655.  
  656.  ; error codes
  657.  EE_LASTBOARD  EQU 40  ; could not shut him up
  658.  EE_NOEXPANSION    EQU 41  ; not enough expansion mem; board shut up
  659.  EE_NOBOARD    EQU 42  ; no board at that address
  660.  EE_NOMEMORY   EQU 42  ; not enough normal memory
  661.  
  662.  ; flags
  663.    BITDEF  EB,CLOGGED,0    ; someone could not be shutup
  664.    BITDEF  EB,SHORTMEM,1   ; ran out of expansion mem
  665.  
  666.  
  667.    ENDC    !EXPANIONBASE_I
  668.  
  669.  /*****************************************************************************
  670.  *
  671.  *  Copyright (C) 1987,  Commodore-Amiga, Inc., All rights reserved.
  672.  *
  673.  *  libraries/romboot_base.h
  674.  *
  675.  *****************************************************************************/
  676.  
  677.  #ifndef LIBRARIES_ROMBOOTBASE_H
  678.  #define LIBRARIES_ROMBOOTBASE_H
  679.  
  680.  #ifndef EXEC_TYPES_H
  681.  #include <exec/types.h>
  682.  #endif
  683.  #ifndef EXEC_NODES_H
  684.  #include <exec/nodes.h>
  685.  #endif
  686.  #ifndef EXEC_LISTS_H
  687.  #include <exec/lists.h>
  688.  #endif
  689.  #ifndef EXEC_LIBRARIES_H
  690.  #include <exec/libraries.h>
  691.  #endif
  692.  #ifndef EXEC_EXECBASE_H
  693.  #include <exec/execbase.h>
  694.  #endif
  695.  #ifndef EXEC_EXECNAME_H
  696.  #include <exec/execname.h>
  697.  #endif
  698.  
  699.  struct RomBootBase
  700.  {
  701.      struct Library  LibNode;
  702.    struct Execbase *ExecBase;
  703.    struct List     BootList;
  704.    ULONG           Reserved[4];    /* for future expansion */
  705.  };
  706.  
  707.  struct BootNode
  708.  {
  709.    struct Node bn_Node;
  710.    UWORD   bn_Flags;
  711.    CPTR    bn_DeviceNode;
  712.  };
  713.  
  714.  #define   ROMBOOT_NAME "romboot.library"
  715.  
  716.  #endif
  717.  
  718.  ******************************************************************************
  719.  *
  720.  *  Copyright (C) 1987,  Commodore-Amiga, Inc., All rights reserved.
  721.  *
  722.  *  libraries/romboot_base.i
  723.  *
  724.  ******************************************************************************
  725.  
  726.      IFND    LIBRARIES_ROMBOOTBASE_I
  727.  LIBRARIES_ROMBOOTBASE_I  SET 1
  728.  
  729.      IFND    EXEC_TYPES_I
  730.      include "exec/types.i"
  731.      ENDC
  732.      IFND    EXEC_NODES_I
  733.      include "exec/nodes.i"
  734.      ENDC
  735.      IFND    EXEC_LISTS_I
  736.      include "exec/lists.i"
  737.      ENDC
  738.      IFND    EXEC_LIBRARIES_I
  739.      include "exec/libraries.i"
  740.      ENDC
  741.      IFND    EXEC_EXECBASE_I
  742.      include "exec/execbase.i"
  743.      ENDC
  744.      IFND    EXEC_EXECNAME_I
  745.      include "exec/execname.i"
  746.      ENDC
  747.  
  748.   STRUCTURE  RomBootBase,LIB_SIZE
  749.    APTR    rbb_ExecBase
  750.    STRUCT  rbb_BootList,LH_SIZE
  751.    STRUCT  rbb_Reserved,16         ; for future expansion
  752.      LABEL   rbb_SIZEOF
  753.  
  754.   STRUCTURE BootNode,LN_SIZE
  755.    UWORD   bn_Flags
  756.    CPTR    bn_DeviceNode
  757.    LABEL   BootNode_SIZEOF
  758.  
  759.  ROMBOOT_NAME:  MACRO
  760.    DC.B    'romboot.library',0
  761.    DS.W    0
  762.    ENDM
  763.  
  764.    ENDC
  765.  
  766.  
  767. -------
  768. Credits
  769. -------
  770.    Special thanks to: 
  771.  
  772.        jeff porter and jeff boyer  (hardware support)
  773.        andy finkel                 (wc coordination)
  774.        neil katin                  (autoconfig wizardry)
  775.        tim king                    (dos magic)
  776.        and dale luck.              (compiler support)
  777.  
  778.    AutoBoot guru:
  779.  
  780.      //----------------------------------------------------- ----------\\
  781.     //|  Bart Whitebook                                     | {|V|)))  |\\
  782.       |  Comodore-Amiga, Inc.                               | ()^()-)))|
  783.       |  16795 Lark Avenue, Suite #106, Los Gatos, CA 95030 |  /_   ?))|
  784.       |  UUCP: pyramid!oliveb!amiga!bart                    | { _ } )\ |
  785.       |  BIX:  amigabart                                    | \   //   | 
  786.     \\|_____________________________________________________|__\//____ |//
  787.      \\                                                                //
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.