home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 432a.lha / ReqLibrary_v2.2 / include / libraries / reqbase.i < prev   
Text File  |  1990-11-10  |  17KB  |  488 lines

  1.  
  2. ; reqlibrary.i © 1988/1989 reserved by Colin Fox and Bruce Dawson */
  3.  
  4.     IFND    REQ_LIBRARY_I
  5.  
  6. REQ_LIBRARY_I    SET    1
  7.  
  8.         INCLUDE    "intuition/intuition.i"
  9.  
  10.         INCLUDE    "libraries/dos.i"
  11.         INCLUDE    "libraries/dosextens.i"
  12.  
  13.         INCLUDE    "exec/memory.i"
  14.         INCLUDE    "exec/initializers.i"
  15.         INCLUDE    "exec/alerts.i"
  16.  
  17. REQVERSION    EQU    2
  18.  
  19.  
  20. PairsSize    EQU    20
  21.  
  22.  STRUCTURE    GadgetBlock.,0        ;a boolean button style text gadget
  23.     STRUCT    gb_Gadget,gg_SIZEOF
  24.     STRUCT    gb_Border,bd_SIZEOF
  25.     STRUCT    gb_Pairs,PairsSize
  26.     STRUCT    gb_Text,it_SIZEOF
  27.     LABEL    gb_SIZEOF
  28.  
  29.  STRUCTURE    StringBlock.,0        ;a string gadget
  30.     STRUCT    sb_Gadget,gg_SIZEOF
  31.     STRUCT    sb_Info,si_SIZEOF
  32.     STRUCT    sb_Border,bd_SIZEOF
  33.     STRUCT    sb_Pairs,PairsSize
  34.     LABEL    sb_SIZEOF
  35.  
  36.  STRUCTURE    PropBlock.,0        ;a prop gadget
  37.     STRUCT    pb_Gadget,gg_SIZEOF
  38.     STRUCT    pb_Info,pi_SIZEOF
  39.     STRUCT    pb_Image,ig_SIZEOF
  40.     LABEL    pb_SIZEOF
  41.  
  42.  STRUCTURE    SliderBlock.,0        ;a slider (two arrows & a prop)
  43.     STRUCT    slb_ArrowUpLt,gg_SIZEOF
  44.     STRUCT    slb_ImageUpLt,ig_SIZEOF
  45.     STRUCT    slb_ArrowDnRt,gg_SIZEOF
  46.     STRUCT    slb_ImageDnRt,ig_SIZEOF
  47.     STRUCT    slb_Prop,pb_SIZEOF    ;this is at the end for REFRESH GLIST purposes
  48.     LABEL    slb_SIZEOF
  49.  
  50.  STRUCTURE    TwoImageBlock,0
  51.     STRUCT    tib_Gadget,gg_SIZEOF
  52.     STRUCT    tib_Image1,ig_SIZEOF
  53.     STRUCT    tib_Image2,ig_SIZEOF
  54.     LABEL    tib_SIZEOF
  55.  
  56. ATTITUDEB    EQU    16    ;Bit# of the attitude bit.
  57.  
  58. HorizSlider    EQU    0        ;which way the slider stands
  59. VertSlider    EQU    1<<ATTITUDEB    ;This is so that it bypasses all gadget flags.
  60.  
  61.  
  62.  
  63. ;         This structure is use with the TextRequester function.
  64.  
  65.  STRUCTURE TRStructure,0
  66.     APTR    TR_Text            ;This is the message text, including printf() style formatting if desired.
  67.     APTR    TR_Controls        ;This is the address of the parameter list, if printf() style formatting is used.
  68.     APTR    TR_Window        ;This is an optional (zero if not used) pointer to a window on the screen you 
  69.                     ;would like the requester to show up on.
  70.     APTR    TR_MiddleText        ;If non-zero, this is the text for the gadget in the lower middle (returns 2).
  71.     APTR    TR_PositiveText        ;If non-zero, this is the text for the gadget in the lower left hand corner (returns 1).
  72.     APTR    TR_NegativeText        ;If non-zero, this is the text for the gadget in the lower right (returns 0).
  73.     APTR    TR_Title        ;This is the title for the window.
  74.     WORD    TR_KeyMask        ;This is the qualifier mask for the keyboard shortcuts.
  75.                     ;Use $FFFF to allow any qualifiers (or none).
  76.                     ;Zero means that no keyboard shortcuts are allowed.
  77.     WORD    TR_textcolor        ;Color of the text.  Uses Color 1 if no Color specified.
  78.     WORD    TR_detailcolor        ;Detail and block color, as in a NewWindow structure.  If
  79.     WORD    TR_blockcolor        ;both are left zero, block pen will be set to 1.
  80.     WORD    TR_versionnumber    ;Make SURE this is set to the current version of REQVERSION.
  81.     UWORD    TR_Timeout        ;The timeout value, in seconds.
  82.     LONG    TR_AbortMask        ;
  83.     UWORD    TR_rfu1
  84.     LABEL    TR_SIZEOF
  85.  
  86. ;/* NOTE:
  87. ;
  88. ;    The  control  values  mentioned above are used if you choose to insert
  89. ;printf  style directives in your strings and should contain the address of
  90. ;a list of control parameters, usually on the stack.
  91. ;    */
  92.  
  93.  
  94.  
  95. ;         This structure is for use with the GetLong function.
  96.  
  97. GLNODEFAULTB    EQU    0    ;Set this bit in the flags if you don't want a default
  98.                 ;value to show up in the get long string gadget.  For
  99.                 ;some things this is much better than having a zero
  100.                 ;show up.
  101.  
  102. GLNODEFAULTM    EQU    1<<GLNODEFAULTB
  103.  
  104.  STRUCTURE    GetLongStruct,0
  105.     APTR    gl_titlebar
  106.     LONG    gl_defaultval
  107.     LONG    gl_minlimit
  108.     LONG    gl_maxlimit
  109.     LONG    gl_result
  110.     APTR    gl_window
  111.     WORD    gl_versionnumber;    ;Make SURE this is set to REQVERSION
  112.     LONG    gl_flags;        ;Some, uh flags.  See above for bit definitions.
  113.     LONG    gl_rfu2;        ;Make SURE you leave these two zeroed also.
  114.     LABEL    gl_SIZEOF
  115.  
  116.  
  117.  STRUCTURE    GetStringStruct,0
  118.     APTR    gs_titlebar
  119.     APTR    gs_stringbuffer
  120.     APTR    gs_window
  121.     WORD    gs_stringsize
  122.     WORD    gs_visiblesize
  123.     WORD    gs_versionnumber    ;this should be REQVERSION
  124.     LONG    gs_flags
  125.     LONG    gs_rfu1
  126.     LONG    gs_rfu2
  127.     LONG    gs_rfu3
  128.     LABEL    gs_SIZEOF
  129.  
  130.  
  131.  
  132. ;         Remember,   if  you  don't  want  to  go  through  the  hassle  of
  133. ; initializing a ExtendedColorRequester structure, you can always just call
  134. ; ColorRequester  (as opposed to ExtendedColorRequester).  ColorRequester
  135. ; just  takes  a  single  parameter, in D0, the color that should start out
  136. ; being highlit.  It returns a single value, the color that was selected at
  137. ; the end.
  138.  
  139. ;         This structure is for use with the ExtendedColorRequester (_not_,
  140. ; the ColorRequester) function.
  141.  
  142.  STRUCTURE    ExtendedColorRequesterStruct,0
  143.     LONG    ecr_defcolor        ;The color that is initially highlit.
  144.     APTR    ecr_window        ;The window the 'requester' opens up in (zero normally).
  145.     LONG    ecr_rfu1            ;Who knows what these will be used for,
  146.     LONG    ecr_rfu2            ;but I'm sure we'll think of something.
  147.     LONG    ecr_rfu3            ;Until then, just keep these zeroed.
  148.     LONG    ecr_rfu4            ;Okay?
  149.     LONG    ecr_rfu5
  150.     LABEL    ecr_SIZEOF
  151.  
  152.  
  153.  
  154.     IFND    DSIZE
  155. DSIZE        EQU    130
  156. FCHARS        EQU    30
  157.     ENDC
  158. WILDLENGTH    EQU    30
  159.  
  160. ;     These  are  the  bit  numbers  of various bits that you can set in the
  161. ; Flags  field of the file requester structure.  The actual values that come
  162. ; out of these bit numbers are defined in the set of includes below with the
  163. ; same  names  but  with  an  M  (for  mask) ending instead of a B (for bit)
  164. ; ending.
  165.  
  166. FRQSHOWINFOB    EQU    0    ;Set this in Flags if you want .info files to show.  They default to hidden.
  167. FRQEXTSELECTB    EQU    1    ;Set this in Flags if you want extended select.  Default is not.
  168. FRQCACHINGB    EQU    2    ;Set this in Flags if you want directory caching.  Default is not.
  169. FRQGETFONTSB    EQU    3    ;Set this in Flags if you want a font requester rather than a file requester.
  170. FRQINFOGADGETB    EQU    4    ;Set this in Flags if you want a hide-info files gadget.
  171. FRQHIDEWILDSB    EQU    5    ;Set this in Flags if you DON'T want 'show' and 'hide' string gadgets.
  172. FRQABSOLUTEXYB    EQU    6    ;Use absolute x,y positions rather than centering on mouse.
  173. FRQCACHEPURGEB    EQU    7    ;Purge the cache whenever the directory date stamp changes if this is set.
  174. FRQNOHALFCACHEB    EQU    8    ;Don't cache a directory unless it is completely read in when this is set.
  175. FRQNOSORTB    EQU    9    ;Set this in Flags if you DON'T want sorted directories.
  176. FRQNODRAGB    EQU    10    ;Set this in Flags if you DON'T want a drag bar and depth gadgets.
  177. FRQSAVINGB    EQU    11    ;Set this bit if you are selecting a file to save to.
  178. FRQLOADINGB    EQU    12    ;Set this bit if you are selecting a file(s) to load from.
  179.                 ;These two bits (save and load) aren't currently used for
  180.                 ;anything, but they may be in the future, so you should
  181.                 ;remember to set them.  Also, these bits make it easier if
  182.                 ;somebody wants to customize the file requester for their
  183.                 ;machine.  They can make it behave differently for loading
  184.                 ;vs saving.
  185. FRQDIRONLYB    EQU    13    ;Allow the user to select a directory, rather than a file.
  186.  
  187. ;     These  are the mask values that you can OR into the Flags field of the
  188. ; file requester structure.
  189.  
  190. FRQSHOWINFOM    EQU    1<<FRQSHOWINFOB
  191. FRQEXTSELECTM    EQU    1<<FRQEXTSELECTB
  192. FRQCACHINGM    EQU    1<<FRQCACHINGB
  193. FRQGETFONTSM    EQU    1<<FRQGETFONTSB
  194. FRQINFOGADGETM    EQU    1<<FRQINFOGADGETB
  195. FRQHIDEWILDSM    EQU    1<<FRQHIDEWILDSB
  196. FRQABSOLUTEXYM    EQU    1<<FRQABSOLUTEXYB
  197. FRQCACHEPURGEM    EQU    1<<FRQCACHEPURGEB
  198. FRQNOHALFCACHEM    EQU    1<<FRQNOHALFCACHEB
  199. FRQNOSORTM    EQU    1<<FRQNOSORTB
  200. FRQNODRAGM    EQU    1<<FRQNODRAGB
  201. FRQSAVINGM    EQU    1<<FRQSAVINGB
  202. FRQLOADINGM    EQU    1<<FRQLOADINGB
  203. FRQDIRONLYM    EQU    1<<FRQDIRONLYB
  204.  
  205.  
  206.  STRUCTURE    ESStructure,0        ;ExtendedSelectStructure
  207.         LONG    es_NextFile    ;This must be the first element!
  208.         WORD    es_NameLength    ;File name length, not including the terminating zero.
  209.         WORD    es_Pad
  210.         APTR    es_Node        ;Node that the user has extended selected.
  211.         LABEL    es_SIZEOF
  212.  
  213. ;         When  using  extended  select,  the  directory pointer is required
  214. ; since  only  the  file  names  are stored in the frq_ExtendedSelect linked
  215. ; list.   When  not  using  extended select, you can either have frq_Dir and
  216. ; frq_File  point  be initialized, or you can have frq_PathName initialized,
  217. ; or  both.   frq_PathName will contain the concatenation of the file and
  218. ; directory chosen.
  219.  
  220.  STRUCTURE    .FileRequester,0
  221.     UWORD    frq_VersionNumber        ;MUST BE REQVERSION!!!!!!!!!!!!!!!!!!
  222.  
  223.     ;You will probably want to initialize these three variables.
  224.     APTR    frq_Title            ; Hailing text
  225.     APTR    frq_Dir                ; Directory array (must be DSIZE+1 characters long)
  226.     APTR    frq_File            ; Filename array (must be FCHARS+1 characters long)
  227.     ;If you initialize this variable then the file requester will place the complete path name in here on exit.
  228.     APTR    frq_PathName            ; Complete path name array - (must be DSIZE+FCHARS+2 long)
  229.     ;If you want the file requester to pop up on your custom screen, put one of your window pointers here.
  230.     ;Or better yet, you can leave this field zeroed and put a pointer to one of your windows in the
  231.     ;pr_WindowPtr field in your process structure.
  232.     APTR    frq_Window            ; Window requesting or NULL
  233.     ;Initialize these to the number of lines and columns you want to appear in the inner window that
  234.     ;displays the file names.  If you leave these set to zero then default values will be used.
  235.     UWORD    frq_MaxExtendedSelect        ; Zero implies a maximum of 65535, as long as FRQEXTSELECT is set.
  236.     UWORD    frq_numlines            ; Number of lines in file window.
  237.     UWORD    frq_numcolumns            ; Number of columns in file window.
  238.     UWORD    frq_devcolumns            ; Number of columns in device window.
  239.     ULONG    frq_Flags            ; Various - umm - flags.  See above for more info.
  240.     UWORD    frq_dirnamescolor    ;These five colors will all default
  241.     UWORD    frq_filenamescolor    ;to color one if you don't specify
  242.     UWORD    frq_devicenamescolor    ;a color (ie; if you specify color zero).
  243.     UWORD    frq_fontnamescolor    ;If you want color zero to be used, specify
  244.     UWORD    frq_fontsizescolor    ;color 32, or some other too large number
  245.                     ;which mods down to zero.
  246.  
  247.     UWORD    frq_detailcolor        ;If both of these colors are specified as
  248.     UWORD    frq_blockcolor        ;zero then the block pen will be set to one.
  249.  
  250.     UWORD    frq_gadgettextcolor    ;The color for the text of the five boolean gadgets.  Defaults to 1.
  251.     UWORD    frq_textmessagecolor    ;The color for the message at the screen top.  Defaults to 1.
  252.     UWORD    frq_stringnamecolor    ;The color for the words Drawer, File, Hide and Show.  Defaults to 3.
  253.     UWORD    frq_stringgadgetcolor    ;The color for the borders of the string gadgets.  Defaults to 3.
  254.                     ;Unfortunately it is not possible to specify
  255.                     ;the color of the actual text in an Intuition
  256.                     ;string gadget.
  257.     UWORD    frq_boxbordercolor    ;The color for the boxes around the file and directory areas.  Defaults to 3.
  258.     UWORD    frq_gadgetboxcolor    ;The color for the boxes around the five boolean gadgets.  Defaults to 3.
  259.  
  260.     STRUCT    frq_RFU_Stuff,36        ;This area, which is reserved for
  261.                         ;future use, should all be zero.
  262.  
  263.     STRUCT    frq_DirDateStamp,ds_SIZEOF    ; A copy of the cached directories date stamp.
  264.                         ; There should never be any need to change this.
  265.  
  266.     UWORD    frq_WindowLeftEdge;        ;These two fields are only used when the
  267.     UWORD    frq_WindowTopEdge;        ;FRQABSOLUTEXY flag is set.  They specify
  268.                         ;the location of the upper left hand
  269.                         ;corner of the window.
  270.  
  271.     UWORD    frq_FontYSize            ;These fields are used to return the selected
  272.     UWORD    frq_FontStyle            ;font size and style, only applicable when the
  273.                         ;font bit is set.
  274.  
  275.     ;If you set the extended select bit and the user extended selects, the list of filenames will start from here.
  276.     APTR    frq_ExtendedSelect        ; Linked list of ESStructures if more than one filename is chosen.
  277.     ;All of the following variables you shouldn't need to touch.  They contain fields that the file
  278.     ;requester sets and likes to preserve over calls, just to make life easier for the user.
  279.     STRUCT    frq_Hide,WILDLENGTH+2        ; Wildcards for files to hide.
  280.     STRUCT    frq_Show,WILDLENGTH+2        ; Wildcards for files to show.
  281.     WORD    frq_FileBufferPos        ; Cursor's  position  and first
  282.     WORD    frq_FileDispPos            ; displayed character number in
  283.     WORD    frq_DirBufferPos        ; the three string gadgets.  No
  284.     WORD    frq_DirDispPos            ; need  to initialized these if
  285.     WORD    frq_HideBufferPos        ; you don't want to.
  286.     WORD    frq_HideDispPos
  287.     WORD    frq_ShowBufferPos
  288.     WORD    frq_ShowDispPos
  289.  
  290. ;         The  following  fields are PRIVATE!  Don't go messing with them or
  291. ; wierd  things may/will happen.  If this isn't enough of a warning, go read
  292. ; the one in intuition.h, that should scare you off.
  293.  
  294.     APTR    frq_Memory            ; Memory allocated for dir entries.
  295.     APTR    frq_Memory2            ; Used for currently hidden files.
  296.     APTR    frq_Lock            ; Contains lock on directories being read across calls.
  297.     STRUCT    frq_PrivateDirBuffer,DSIZE+2    ; Used for keeping a record of which
  298.                         ; directory we have file names for.
  299.     APTR    frq_FileInfoBlock
  300.     WORD    frq_NumEntries
  301.     WORD    frq_NumHiddenEntries
  302.     WORD    frq_filestartnumber
  303.     WORD    frq_devicestartnumber
  304.     LABEL    frq_SIZEOF
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312. ;         This is used with the RealTimeScroll function.
  313.  
  314.  STRUCTURE    ScrollStruct,0
  315.     ULONG    ss_TopEntryNumber    ;This is the ordinal number of the first
  316.                     ;displayed entry.
  317.     ULONG    ss_NumEntries        ;This is the total number of entries in
  318.                     ;the list.
  319.     UWORD    ss_LineSpacing        ;This is how many pixels high each entry is.
  320.     ULONG    ss_NumLines        ;This is how many entries can be displayed simultaneously.
  321.     APTR    ss_PropGadget        ;This is a pointer to the prop gadget being monitored.
  322.  
  323.     APTR    ss_RedrawAll        ;This routine is used to redraw all of the
  324.                     ;entries when the user moves far enough
  325.                     ;that scrolling will take too long.
  326.  
  327.     APTR    ss_ReadMore        ;An optional routine that is called when
  328.                     ;the scroll routine is waiting for movement.
  329.                     ;This allows reading of new data while real
  330.                     ;time scrolling.
  331.     APTR    ss_ScrollAndDraw    ;This routine is called when the data needs
  332.                     ;to be scrolled and updated.  This routine is
  333.                     ;passed five long parameters (on the stack and
  334.                     ;in D0-D3/A0) which are, respectively:
  335.                     ;D0 - entry number of first line to be drawn.
  336.                     ;D1 - pixel offset to draw first line at.
  337.                     ;D2 - amount to scroll before doing any drawing.
  338.                     ;D3 - number of lines of data to draw.
  339.                     ;A0 - the Scroll structure itself.
  340.     WORD    versionnumber        ;REQVERSION should be put here.
  341.     LONG    rfu1            ;Make SURE you leave these two zeroed also.
  342.     LONG    rfu2            ;Make SURE you leave these two zeroed also.
  343.     LABEL    ss_SIZEOF
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  STRUCTURE    Arrows,0
  350.     STRUCT    ArrowUp,20
  351.     STRUCT    ArrowDown,20
  352.     STRUCT    ArrowLeft,18
  353.     STRUCT    ArrowRight,18
  354.     STRUCT    Letter_R,20
  355.     STRUCT    Letter_G,20
  356.     STRUCT    Letter_B,20
  357.     STRUCT    Letter_H,20
  358.     STRUCT    Letter_S,20
  359.     STRUCT    Letter_V,20
  360.     LABEL    chipstuff_SIZEOF
  361.  
  362. ; These are the positions relative to the rl_Images pointer.
  363. ;ie
  364. ;    MOVE.L    rl_Images(A6),A0
  365. ;    ADD.L    #ArrowLeft,A0        ;A0 now points at the left arrow.
  366.  
  367.  
  368.  STRUCTURE    ReqLib,LIB_SIZE
  369.     APTR    rl_SysLib
  370.     APTR    rl_DosLib        ;These must be kept in the same order,
  371.     APTR    rl_IntuiLib        ;the library expunge code depends on it.
  372.     APTR    rl_GfxLib        ;
  373.     APTR    rl_SegList
  374.     APTR    rl_Images        ;pointer to the arrow images.
  375.     BYTE    rl_Flags
  376.     BYTE    rl_Pad
  377.     APTR    rl_ConsoleDev        ;for RawKeyToAscii
  378.     APTR    rl_ConsoleHandle    ;so we can close the device later
  379.     APTR    rl_RexxSysBase        ;pointer to rexxsyslib.library
  380.     LABEL    MyLib_Sizeof
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.     LIBINIT
  388.     LIBDEF    _LVOCenter        ;1e
  389.  
  390.     LIBDEF    _LVOSetSize        ;24
  391.     LIBDEF    _LVOSetLocation        ;2a
  392.     LIBDEF    _LVOReadLocation    ;30
  393.  
  394.     LIBDEF    _LVOReqFormat        ;36
  395.  
  396.     LIBDEF    _LVODispatch        ;3c  Was Old function. Now is ARexx hook
  397.     LIBDEF    _LVOFakeFunction2    ;42  Old function.  Don't use.
  398.  
  399.     LIBDEF    _LVOFakeFunction3    ;48  Old function.  Don't use.
  400.     LIBDEF    _LVOFakeFunction4    ;4e  Old function.  Don't use.
  401.  
  402.     LIBDEF    _LVOFileRequester    ;54
  403.  
  404.     LIBDEF    _LVOColorRequester    ;5a
  405.  
  406.     LIBDEF    _LVODrawBox        ;60
  407.  
  408.     LIBDEF    _LVOMakeButton        ;66
  409.     LIBDEF    _LVOMakeScrollBar    ;6c
  410.  
  411.     LIBDEF    _LVOPurgeFiles        ;72
  412.  
  413.     LIBDEF    _LVOGetFontHeightAndWidth ;78
  414.  
  415.     LIBDEF    _LVOMakeGadget        ;7e
  416.     LIBDEF    _LVOMakeString        ;84
  417.     LIBDEF    _LVOMakeProp        ;8a
  418.  
  419.     LIBDEF    _LVOLinkGadget        ;90
  420.     LIBDEF    _LVOLinkStringGadget    ;96
  421.     LIBDEF    _LVOLinkPropGadget    ;9c
  422.  
  423.     LIBDEF    _LVOGetString        ;a2
  424.  
  425.     LIBDEF    _LVORealTimeScroll    ;a8
  426.  
  427.     LIBDEF    _LVOTextRequest        ;ae
  428.  
  429.     LIBDEF    _LVOGetLong        ;b4
  430.  
  431.     LIBDEF    _LVORawKeyToAscii    ;ba
  432.  
  433.     LIBDEF    _LVOExtendedColorRequester ;c0
  434.  
  435.     LIBDEF    _LVONewGetString    ;c6
  436.  
  437.  
  438.  
  439. REQNAME    MACRO
  440.     DC.B    'req.library',0
  441.     ENDM
  442.  
  443. ; This macro will open the RequesterLibrary for you. At the end, A6 will
  444. ;contain the library and D0/A0 will be correct. (What dos passed you)
  445.  
  446. OpenReq    MACRO
  447.     BRA.S    opnrq
  448.  
  449. dname    DC.B    'dos.library',0
  450. rlibmsg    DC.B    'You need V2+ of '
  451. ReqName    REQNAME
  452.     DC.B    10,13,0
  453. ;;;rliblng    EQU    *-rlibmsg
  454. rliblng    EQU    30
  455.     DS.W    0
  456.     EVEN
  457.  
  458. opnrq:
  459.     MOVEM.L    d0/a0,-(sp)
  460.     MOVE.L    4,A6
  461.     LEA.L    ReqName,a1
  462.     MOVEQ.L    #REQVERSION,d0
  463.     SYS    OpenLibrary
  464.     TST.L    d0
  465.     BNE.S    itsokay
  466.     LEA    dname,A1
  467.     SYS    OpenLibrary
  468.     TST.L    D0
  469.     BEQ.S    1$
  470.     MOVE.L    D0,A6
  471.     SYS    Output
  472.     MOVE.L    d0,d1
  473.     BEQ.S    1$            ;No output. Phooey.
  474.     MOVE.L    #rlibmsg,d2        ;Tell user he needs to find library.
  475.     MOVE.L    #rliblng,D3
  476.     SYS    Write
  477. 1$:    ADDQ    #8,sp
  478.     RTS
  479.  
  480. itsokay:
  481.     MOVE.L    D0,A6
  482.     MOVEM.L    (SP)+,D0/A0
  483.     ENDM
  484.  
  485.  
  486.  
  487.     ENDC
  488.