home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / fish / code_examples / a68kex / filerequest2.02.s < prev    next >
Text File  |  1991-01-17  |  72KB  |  1,931 lines

  1. ****************************************************************************
  2. *    FileRequest V2.02                     by   Fabrice LIENHARDT          *
  3. *    Written in january 1990                    7, rue de Leicester        *
  4. *                                               67000 STRASBOURG (France)  *
  5. *    (This is Public Domain)                                               *
  6. *    100% assembler - Written with Hisoft's DEVPAC Assembler V2.12         *
  7. ****************************************************************************
  8.  
  9. A68k    set 1        set 1 for A68k else set 0
  10. devpac  set 0        set 1 for devpac else set 0
  11. module  set 1        set 1 for module 0 for program
  12. NULL    EQU 0
  13.  
  14.         ifne A68k
  15.         include "FileRequest.i"
  16.         endif
  17.  
  18.         ifne devpac
  19.         opt a+,d+,o+                    :PC Modus, labels, optimise instr.
  20.  
  21.         incdir  ":include/"             :Load include files
  22.         include exec/exec_lib.i
  23.         include intuition/intuition.i
  24.         include intuition/intuition_lib.i
  25.         include graphics/graphics_lib.i
  26.         include libraries/dos_lib.i
  27.         include libraries/dos.i
  28.         include libraries/filehandler.i
  29.         include libraries/dosextens.i
  30.         endif
  31.  
  32.         XDEF _Request
  33.  
  34. _Request
  35.         ifne module
  36.         movem.l d3-d7/a1-a6,-(a7)
  37.         moveq   #0,d5
  38.         suba.l  a5,a5
  39.         movem.l d0-d2/a0,-(a7)
  40.         endif
  41.  
  42. ***************************
  43. *   PATCH
  44.  
  45.         clr.l   folddiskname
  46.  
  47. *   END OF PATCH
  48. ***************************
  49.  
  50.         lea     intname,a1
  51.         CALLEXEC OldOpenLibrary         :Open Intuition
  52.         tst.l   d0
  53.         beq     int_error               :quit if error
  54.         move.l  d0,_IntuitionBase
  55.  
  56.         lea     grafname,a1
  57.         CALLEXEC OldOpenLibrary         :Open Graphics
  58.         tst.l   d0
  59.         beq     gfx_error               :quit if error
  60.         move.l  d0,_GfxBase
  61.  
  62.         lea.l   dosname,a1
  63.         CALLEXEC OldOpenLibrary         :Open Dos
  64.         tst.l   d0
  65.         beq     dos_error               :quit if error
  66.         move.l  d0,_DOSBase
  67.  
  68.         move.l #$10000,d1               :clear all reserved memory
  69.         move.l #4832,d0                 :ram with 32*151 characters
  70.         CALLEXEC AllocMem               :allocate memory for buffer (oblig.!)
  71.         tst.l d0
  72.         beq mem_error                   :if error, quit
  73.         move.l d0,filebuffer
  74.  
  75. ****************************************************************************
  76. *-------------------------- CALLING _FileRequest routine -------------------
  77. *
  78. * a0,d0=_FileRequest (Outputhandle, xpos, ypos, windowtitle)
  79. *                          d0        d1    d2        a0
  80. *
  81.         ifne  module
  82.         movem.l (a7)+,d0-d2/a0
  83.         endif
  84.         ifeq  module
  85.         clr.l d0                        :Workbench screen
  86.         move.l #160,d1
  87.         move.l #18,d2
  88.         lea.l a00NewWindowName1,a0
  89.         endif
  90.         bsr _FileRequest                :and call routine FileRequest
  91. *
  92. *
  93. * Result in a0. (a0 is the pointer of drawername/filename)
  94. * Result in d0 too for including this routine in C programms
  95. * Example: (a0)= "DF0:devs/printers/epson"
  96. ****************************************************************************
  97.  
  98.         ifne    module
  99.         move.l  d0,d5
  100.         movea.l a0,a5
  101.         endif
  102.  
  103.         move.l filebuffer,a1
  104.         move.l #4832,d0
  105.         CALLEXEC FreeMem                :free memory for file buffer
  106. mem_error:
  107.         move.l _DOSBase,a1
  108.         CALLEXEC CloseLibrary           :Close dos library
  109. dos_error:
  110.         move.l  _GfxBase,a1
  111.         CALLEXEC CloseLibrary           :Close gfx library
  112. gfx_error:
  113.         move.l  _IntuitionBase,a1
  114.         CALLEXEC CloseLibrary           :Close int library
  115. int_error:
  116.  
  117.         ifne   module
  118.         move.l   d5,d0
  119.         movea.l  a5,a0
  120.         movem.l  (a7)+,d3-d7/a1-a6
  121.         endif
  122.  
  123.         rts
  124.  
  125. ***************************************************************************
  126. * FileRequest -------------------------------------------------------------
  127. ***************************************************************************
  128.  
  129. _FileRequest:
  130.         move.l d0,a00scrp               :move outputhandle in structure
  131.         move.l a0,a00wdnm               :window name
  132.         lea.l a00NewWindowStructure1,a0
  133.         move.w d1,(a0)+                 :x coord to window
  134.         move.w d2,(a0)                  :y coord to window
  135.         sub.l #2,a0
  136.         CALLINT OpenWindow              :and open Window
  137.         move.l d0,filewinhd             :save the handle
  138.  
  139.         move.l d0,a0
  140.         move.l wd_RPort(a0),fRport      :Determine RastPort
  141.         move.l wd_UserPort(a0),fUport   :Determine UserPort
  142.  
  143.         lea.l fdevDF0,a0
  144.         add.l #3,a0
  145.         tst.b (a0)                      :test if df0 is present
  146.         bne fnodevicetest               :(if deviceflags are positionned)
  147.         bsr fdevstat                    :if not, test all hardware devices
  148.  
  149. fnodevicetest:
  150.         lea.l fdevDF0,a5                :Read all device flags
  151.         addq #3,a5
  152.         tst.b (a5)                      :test if DF0 is present
  153.         bne fdf0exists
  154.         lea.l a00Gadget1,a0
  155.         move.l filewinhd,a1
  156.         move.l #0,a2
  157.         CALLINT OffGadget               :if not disable the gadget
  158. fdf0exists:
  159.         addq #4,a5
  160.         tst.b (a5)                      :test if DF1 is present
  161.         bne fdf1exists
  162.         lea.l a00Gadget12,a0
  163.         move.l filewinhd,a1
  164.         move.l #0,a2
  165.         CALLINT OffGadget               :if not disable the gadget
  166. fdf1exists:
  167.         addq #4,a5
  168.         tst.b (a5)                      :test if DF2 is present
  169.         bne fdf2exists
  170.         lea.l a00Gadget13,a0
  171.         move.l filewinhd,a1
  172.         move.l #0,a2
  173.         CALLINT OffGadget               :if not disable the gadget
  174. fdf2exists:
  175.         addq #4,a5
  176.         tst.b (a5)                      :test if DF3 is present
  177.         bne fdf3exists
  178.         lea.l a00Gadget14,a0
  179.         move.l filewinhd,a1
  180.         move.l #0,a2
  181.         CALLINT OffGadget               :if not disable the gadget
  182. fdf3exists:
  183.         addq #4,a5
  184.         tst.b (a5)                      :test if DH0 is present
  185.         bne fdh0exists
  186.         lea.l a00Gadget15,a0
  187.         move.l filewinhd,a1
  188.         move.l #0,a2
  189.         CALLINT OffGadget               :if not disable the gadget
  190. fdh0exists:
  191.         addq #4,a5
  192.         tst.b (a5)                      :test if DH1 is present
  193.         bne fdh1exists
  194.         lea.l a00Gadget16,a0
  195.         move.l filewinhd,a1
  196.         move.l #0,a2
  197.         CALLINT OffGadget               :if not disable the gadget
  198. fdh1exists:
  199.         addq #4,a5
  200.         tst.b (a5)                      :test if JH0 is present
  201.         bne fjh0exists
  202.         lea.l a00Gadget17,a0
  203.         move.l filewinhd,a1
  204.         move.l #0,a2
  205.         CALLINT OffGadget               :if not disable the gadget
  206. fjh0exists:
  207.         addq #4,a5
  208.         tst.b (a5)                      :test if VD0 is present
  209.         bne fvd0exists
  210.         lea.l a00Gadget18,a0
  211.         move.l filewinhd,a1
  212.         move.l #0,a2
  213.         CALLINT OffGadget               :if not disable the gadget
  214. fvd0exists:
  215.         addq #4,a5
  216.         tst.b (a5)                      :test if RAM is present
  217.         bne framexists
  218.         lea.l a00Gadget22,a0
  219.         move.l filewinhd,a1
  220.         move.l #0,a2
  221.         CALLINT OffGadget               :if not disable the gadget
  222. framexists:
  223.         addq #4,a5
  224.         tst.b (a5)                      :test if RAD is present
  225.         bne fstartprocess
  226.         lea.l a00Gadget23,a0
  227.         move.l filewinhd,a1
  228.         move.l #0,a2
  229.         CALLINT OffGadget               :if not disable the gadget
  230.  
  231. fstartprocess:
  232.         bsr frefreshdrawer              :refresh the drawer gadget
  233.         bsr freset                      :Unlock/clr filenames&name/init mover
  234.         move.b #0,flaglock              :lock not opened
  235.         move.l #fdrawer,d1              :adress of drawer
  236.         move.l #$fffffffe,d2            :read mode
  237.         CALLDOS Lock                    :Lock
  238.         tst.l d0
  239.         beq flockerr                    :If error print error message
  240.         move.b #1,flaglock              :lock now activated (no error)
  241.         move.l d0,lockhd
  242.  
  243.         move.l lockhd,d1
  244.         move.l #fileinfo,d2             :buffer = fileinfo
  245.         CALLDOS Examine                 :Examine disk name
  246.         tst.l d0                        :error?
  247.         beq flockerr                    :if yes print error message
  248.  
  249.         move.b #0,flagdiskremoved       :drawer has changed, no diskremove
  250.         lea.l fileinfo,a0
  251.         addq #8,a0
  252.         lea.l folddiskname,a1
  253. ftestifsamedisk:
  254.         move.b (a0)+,d0                 :test if disk inserted is known
  255.         cmp.b (a1),d0
  256.         bne fnosamedisk                 :compare Oldname = Newname
  257.         tst.b (a1)+
  258.         bne ftestifsamedisk
  259.         tst.b flagreadaborted           :last reading was aborted?
  260.         bne frestartreading             :if yes, restart reading disk
  261.         bra fprintonly                  :if not print filenames without reading
  262.  
  263. fnosamedisk:
  264.         subq #1,a0
  265. fcopyNewinOldname:
  266.         move.b (a0)+,(a1)               :if not same diskname,copy Newname
  267.         tst.b (a1)+                     :in Oldname (save it)
  268.         bne fcopyNewinOldname
  269. frestartreading:
  270.         move.b #0,flaglect              :reading possible = new disk
  271.         move.b #0,d                     :number of directories = 0
  272.         move.b #0,f                     :number of filenames = 0
  273.         bra fprocess                    :and begin operations
  274.  
  275. flockerr:
  276.         bsr funlock                     :close lock if possible
  277.         bsr ftestdrawerremoved          :test if disk removed
  278.         bne fnodskindrv                 :if removed print 'No disk...'
  279.         lea.l fileerror3,a0             :else prepare 'Bad drawer'
  280.         bra fbaddrv
  281. fnodskindrv:
  282.         lea.l fileerror1,a0             :prepare 'No disk in drive'
  283. fbaddrv:
  284.         move.b #$ff,flagdiskremoved     :set flag
  285.         lea.l filename,a1
  286.         moveq #4,d0
  287. fcopyerr1:
  288.         move.l (a0)+,(a1)+              :copy message error in filename
  289.         subq #1,d0
  290.         bne fcopyerr1
  291.         bsr frefreshfile                :and print it out on screen
  292.         move.b #1,flaglect              :set flag
  293.  
  294. fprocess:
  295.         move.l fUport,a0
  296.         CALLEXEC GetMsg                 :read message in MessagePort
  297.         tst.l d0
  298.         beq fnomessage                  :if no message continue
  299.         move.l d0,a1
  300.         move.l im_Class(a1),d4
  301.         move.l im_Code(a1),d5
  302.         move.l im_IAddress(a1),a4       :if message, prepare it
  303.         CALLEXEC ReplyMsg               :and Reply
  304.         bra freadgadget                 :read the message
  305.  
  306. fnomessage:
  307.         tst.b flaglect                  :reading directory ?
  308.         bne fnoread
  309.  
  310.         move.l lockhd,d1
  311.         move.l #fileinfo+2,d2
  312.         CALLDOS ExNext                  :if yes continue to read
  313.         tst.l d0
  314.         bne fnofileend                  :if no file more then fileend
  315. fprintonly:
  316.         move.l #0,filename
  317.         bsr frefreshfile                :clear filename (or error msg)
  318.         move.b #0,flagreadaborted       :reading can be aborted
  319.         move.b d,d0
  320.         add.b f,d0
  321.         tst.b d0                        :test if some files are present
  322.         bne fileend                     :ok something is present
  323.         move.b #1,flaglect              :reading is stopped
  324.         bsr funlock                     :Unlock if possible
  325.         bra fprocess                    :and restart the process
  326.  
  327. fnofileend:
  328.         move.b #$ff,flagreadaborted     :reading must not be aborted
  329.         lea.l fileinfo+8,a0             :Begin to sort filenames
  330.         move.b (a0),d7                  :d7,first letter of the name
  331.         cmp.b #$5b,d7
  332.         bcc fnomajuscule                :test if capital letter
  333.         add.b #$20,d7                   :not case sensitive
  334. fnomajuscule:
  335.         tst.l fileinfo+4
  336.         bpl filedir                     :if + then directory
  337.         lea.l fileinfo+8,a0             :else filename
  338.         lea.l filename,a1
  339.         moveq #15,d0
  340. fcopyname1:
  341.         move.w (a0)+,(a1)+              :copy filename in buffer
  342.         subq #1,d0
  343.         bne fcopyname1
  344.         bsr frefreshfile                :print name
  345.         add.b #1,f                      :number of files +1
  346.         moveq #1,d6                     :prepare color
  347.         moveq #1,d1
  348.         add.b d,d1                      :beginning of filenames = d+1
  349.         move.b f,d2
  350.         add.b d,d2                      :end of filenames = f+d
  351.         bra filesavename                :and compare and stock in memory
  352. filedir:
  353.         lea.l fileinfo+8,a0
  354.         lea.l filename,a1
  355.         move.l #'(Dir',(a1)+            :if dir put first 'dir' in buffer
  356.         move.w #') ',(a1)+
  357.         moveq #6,d0
  358. fcopyname2:
  359.         move.l (a0)+,(a1)+              :now copy dir name
  360.         subq #1,d0
  361.         bne fcopyname2
  362.         bsr frefreshfile
  363.         add.b #1,d                      :number of directories +1
  364.         moveq #3,d6                     :and prepare color
  365.         moveq #1,d1                     :beginning of filenames = 1
  366.         move.b d,d2                     :end of filenames = d
  367. filesavename:
  368.         cmp.b d1,d2                     :last filename?
  369.         beq filemove                    :if yes the move buffer
  370.         move.l d1,d3
  371.         subq #1,d3
  372.         mulu #32,d3                     :offset name (d1) in buffer
  373.         move.l filebuffer,a0
  374.         add.l d3,a0
  375.         move.b (a0),d3                  :d3 = first letter name (d1)
  376.         cmp.b #$5b,d3
  377.         bcc filenomajuscule2            :test if Capital letter for sorting
  378.         add.b #$20,d3                   :not case sensitive
  379. filenomajuscule2:
  380.         cmp.b d7,d3
  381.         bcs filenolower                 :if not lower then continue
  382.         bra filemove                    :else move buffer
  383. filenolower:
  384.         addq #1,d1
  385.         bra filesavename                :next name and loop
  386. filemove:
  387.         moveq #1,d3
  388.         add.b d,d3                      :move all names in buffer
  389.         add.b f,d3
  390.         mulu #32,d3
  391.         move.l filebuffer,a0
  392.         add.l a0,d3
  393.         move.l d3,a3                    :a3 = (f+d+1)*32 ad end transfert
  394.         sub.l #32,d3
  395.         move.l d3,a2                    :a2 = a3-32 adress begin transfert
  396.         moveq #1,d3
  397.         add.b f,d3
  398.         add.b d,d3
  399.         sub.b d1,d3                     :d3 = (f+d+1-d1) nb of transferts
  400. filetransfert:
  401.         moveq #8,d4
  402. filetrans:
  403.         move.l -(a2),-(a3)              :transfert 32 octets
  404.         subq #1,d4
  405.         bne filetrans
  406.         subq #1,d3
  407.         bne filetransfert
  408.         clr.l d3                        :prepare saving name
  409.         move.l d1,d3
  410.         subq #1,d3
  411.         mulu #32,d3
  412.         lea.l fileinfo+8,a0             :adress beginning source
  413.         move.l filebuffer,a1
  414.         add.l d3,a1                     :adress beginning destination
  415.         moveq #15,d4
  416. filecopyname:
  417.         move.w (a0)+,(a1)+              :copy name
  418.         subq #1,d4
  419.         bne filecopyname
  420.         move.b #0,(a1)+                 :move 0 at end of name
  421.         move.b d6,(a1)                  :move color value at end name
  422.         move.b f,d0
  423.         add.b d,d0
  424.         cmp.b #150,d0
  425.         bne fprocess
  426. fileend:
  427.         move.b #1,flaglect
  428.         bsr funlock                     :no more reading
  429.         lea.l a00Gadget11,a0
  430.         move.l filewinhd,a1
  431.         move.l #0,a2
  432.         moveq #5,d0
  433.         moveq #0,d1                     :prepare all parameters for Modifyprop
  434.         moveq #0,d2
  435.         moveq #0,d3
  436.         clr.l d5
  437.         move.b f,d5
  438.         add.b d,d5
  439.         cmp.b #9,d5
  440.         bcs filenogreater               :prepare prop gadget
  441.         move.l #$ffff,d4
  442.         divu d5,d4
  443.         and.l #$0000ffff,d4
  444.         mulu #8,d4                      :mover size = $ffff*8/(f+d)
  445.         bra fileprop
  446. filenogreater:
  447.         move.l #$ffff,d4
  448. fileprop:
  449.         CALLINT ModifyProp              :modify prop gadget
  450.         move.b #1,faffstart             :--print at first name--
  451.         clr.l d2                        :print all file names
  452.         move.b f,d2
  453.         add.b d,d2                      :number of names present
  454.         cmp.b #9,d2
  455.         bcs fminuseight
  456.         moveq #8,d2                     :if > 8 then = 8
  457. fminuseight:
  458.         move.l fRport,a0
  459.         lea.l faffnames,a1              :initialise parameters
  460.         moveq #0,d1
  461.         move.l filebuffer,a3            :print 8 first names
  462. filenamesbcle:
  463.         moveq #25,d0
  464.         lea.l fnames,a2
  465. filecopynames:
  466.         move.b (a3)+,(a2)+              :25 caracters to copy
  467.         subq #1,d0
  468.         bne filecopynames
  469.         move.b #0,(a2)
  470.         addq #6,a3
  471.         move.b (a3)+,faffnames          :place color for dir or file
  472.         movem.l a0-a3/d0-d2,-(sp)       :save parameters
  473.         CALLINT PrintIText              :print file name
  474.         movem.l (sp)+,a0-a3/d0-d2       :load parameters
  475.         add.l #9,d1
  476.         subq #1,d2
  477.         bne filenamesbcle               :print all names
  478.         bra fprocess                    :and restart process
  479.  
  480. fnoread:
  481.         tst.b flagdiskremoved
  482.         bne fprocess                    :if disk removed loop
  483.         clr.l d0
  484.         move.b f,d0
  485.         add.b d,d0                      :number of files
  486.         cmp.b #9,d0                     :if <8 loop
  487.         bcs fprocess
  488.         sub.b #8,d0                     :search mover position
  489.         mulu fmoverp,d0
  490.         divu #$ffff,d0
  491.         and.l #$0000ffff,d0
  492.         addq #1,d0                      :d0 = first name to print
  493.         move.b faffstart,d1
  494.         cmp.b d1,d0
  495.         beq fprocess                    :if no modif, then loop
  496.         bcc filescrollup                :else scroll up
  497.  
  498.         sub.b d0,d1                     :or scroll down
  499.         move.l d1,d0
  500.         cmp.b #4,d0                     :if <4 then scroll 1 pixel
  501.         bcc fscrollnot1p
  502.         moveq #9,d6
  503.         moveq #-1,d7
  504.         bra fscroll9p
  505. fscrollnot1p:
  506.         cmp.b #10,d0                    :if <10 then scroll 3 pixels
  507.         bcc fscrollnot3p
  508.         moveq #3,d6
  509.         moveq #-3,d7
  510.         bra fscroll9p
  511. fscrollnot3p:
  512.         moveq #1,d6                     :else if >10 scroll 9 pixels
  513.         moveq #-9,d7
  514. fscroll9p:
  515.         bsr filescroll                  :scroll routine
  516.         sub.b #1,faffstart              :affstart = affstart -1
  517.         move.b faffstart,d0
  518.         subq #1,d0
  519.         move.w #17,faffpos              :print new name up
  520.         bsr fileafterscroll             :and print it
  521.         bra fprocess                    :loop
  522.  
  523. filescrollup:
  524.         sub.b d1,d0
  525.         cmp.b #4,d0                     :if <4 scroll 1 pixel
  526.         bcc fscrollnot1
  527.         moveq #9,d6
  528.         moveq #1,d7
  529.         bra fscroll9
  530. fscrollnot1:
  531.         cmp.b #10,d0                    :if <10 scroll 3 pixels
  532.         bcc fscrollnot3
  533.         moveq #3,d6
  534.         moveq #3,d7
  535.         bra fscroll9
  536. fscrollnot3:
  537.         moveq #1,d6                     :else scroll 9 pixels
  538.         moveq #9,d7
  539. fscroll9:
  540.         bsr filescroll                  :scroll routine
  541.         add.b #1,faffstart              :faffstart = faffstart +1
  542.         move.b faffstart,d0
  543.         addq #6,d0
  544.         move.w #80,faffpos              :print new name down
  545.         bsr fileafterscroll
  546.         bra fprocess
  547.  
  548. freadgadget:
  549.         moveq #0,d0
  550.         move.w gg_GadgetID(a4),d0       :d0 = ID from gadget
  551.         cmp.w #0,d0
  552.         beq fstartprocess               :when CR in drawer string
  553.         cmp.w #01,d0
  554.         beq filedf0                     :Reading all gadgets
  555.         cmp.w #02,d0
  556.         beq filedf1
  557.         cmp.w #03,d0
  558.         beq filedf2
  559.         cmp.w #04,d0
  560.         beq filedf3
  561.         cmp.w #05,d0
  562.         beq filedh0
  563.         cmp.w #06,d0
  564.         beq filedh1
  565.         cmp.w #07,d0
  566.         beq filejh0
  567.         cmp.w #08,d0
  568.         beq filevd0
  569.         cmp.w #09,d0
  570.         beq fileram
  571.         cmp.w #10,d0
  572.         beq filerad
  573.         cmp.w #11,d0
  574.         beq fileparent
  575.         cmp.w #12,d0
  576.         beq filecancel
  577.         cmp.w #13,d0
  578.         beq fileok
  579.         cmp.w #15,d0
  580.         beq filetitre
  581.         cmp.w #16,d0
  582.         beq filetitre
  583.         cmp.w #17,d0
  584.         beq filetitre
  585.         cmp.w #18,d0
  586.         beq filetitre
  587.         cmp.w #19,d0
  588.         beq filetitre
  589.         cmp.w #20,d0
  590.         beq filetitre
  591.         cmp.w #21,d0
  592.         beq filetitre
  593.         cmp.w #22,d0
  594.         beq filetitre
  595.         cmp.w #23,d0
  596.         beq fileok
  597.         btst #15,d4
  598.         beq fdiskremoved
  599.         btst #16,d4
  600.         beq fdiskinserted
  601.         bra fprocess
  602.  
  603. filedf0:
  604.         lea.l fdrawer,a0
  605.         move.l #'DF0:',(a0)+            :put new drawer in buffer (df0:)
  606.         move.b #$00,(a0)
  607.         bra fstartprocess
  608. filedf1:
  609.         lea.l fdrawer,a0
  610.         move.l #'DF1:',(a0)+            :put new drawer in buffer (df1:)
  611.         move.b #$00,(a0)
  612.         bra fstartprocess
  613. filedf2:
  614.         lea.l fdrawer,a0
  615.         move.l #'DF2:',(a0)+            :put new drawer in buffer (df2:)
  616.         move.b #$00,(a0)
  617.         bra fstartprocess
  618. filedf3:
  619.         lea.l fdrawer,a0
  620.         move.l #'DF3:',(a0)+            :put new drawer in buffer (df3:)
  621.         move.b #$00,(a0)
  622.         bra fstartprocess
  623. filedh0:
  624.         lea.l fdrawer,a0
  625.         move.l #'DH0:',(a0)+            :put new drawer in buffer (dh0:)
  626.         move.b #$00,(a0)
  627.         bra fstartprocess
  628. filedh1:
  629.         lea.l fdrawer,a0
  630.         move.l #'DH1:',(a0)+            :put new drawer in buffer (dh1:)
  631.         move.b #$00,(a0)
  632.         bra fstartprocess
  633. filejh0:
  634.         lea.l fdrawer,a0
  635.         move.l #'JH0:',(a0)+            :put new drawer in buffer (jh0:)
  636.         move.b #$00,(a0)
  637.         bra fstartprocess
  638. filevd0:
  639.         lea.l fdrawer,a0
  640.         move.l #'VD0:',(a0)+            :put new drawer in buffer (vd0:)
  641.         move.b #$00,(a0)
  642.         bra fstartprocess
  643. fileram:
  644.         lea.l fdrawer,a0
  645.         move.l #'RAM:',(a0)+            :put new drawer in buffer (ram:)
  646.         move.b #$00,(a0)
  647.         bra fstartprocess
  648. filerad:
  649.         lea.l fdrawer,a0
  650.         move.l #'RAD:',(a0)+            :put new drawer in buffer (rad:)
  651.         move.b #$00,(a0)
  652.         bra fstartprocess
  653.  
  654. filecancel:
  655.         bsr funlock                     :unlock if possible
  656.         move.l filewinhd,a0
  657.         CALLINT CloseWindow             :Close fileselect Window
  658.         move.l #0,a0
  659. ***************************
  660. * PATCH
  661. * return cancel in d0 as well
  662.  
  663.         moveq  #0,d0
  664.  
  665. * END OF PATCH
  666. ***************************
  667.  
  668.         rts                             :and quit
  669.  
  670. fileok:
  671.         bsr funlock                     :unlock if possible
  672.         lea.l filename,a0               :test if filename exists
  673.         tst.b (a0)
  674.         beq filenoload                  :if not print "No file selected"
  675.         cmp.l #'No f',(a0)
  676.         beq filenoload
  677.         cmp.l #'Bad ',(a0)              :test if filename is not an
  678.         beq filenoload                  :error message
  679.         cmp.l #'No d',(a0)
  680.         beq filenoload
  681.         move.l filewinhd,a0
  682.         CALLINT CloseWindow             :Close filerequest Window
  683.         lea.l fdrawer,a0
  684.         lea.l fexitbuffer,a1
  685. fcopyexitbuffer:
  686.         move.b (a0)+,(a1)+              :copy drawer name in exitbuffer
  687.         tst.b (a0)
  688.         bne fcopyexitbuffer
  689. ******************************
  690. *    PATCH
  691.  
  692.         cmpi.b #':',-(a0)
  693.         beq.s  noslash
  694.  
  695.         move.b #'/',(a1)+               :"/" between drawer and filename
  696.  
  697. noslash
  698. *
  699. * END OF PATCH
  700. *******************************
  701.         lea.l filename,a0
  702. fcopyexitbuffer2:
  703.         move.b (a0)+,(a1)+              :copy file name in exitbuffer
  704.         tst.b (a0)
  705.         bne fcopyexitbuffer2
  706.         move.b #0,(a1)
  707.         lea.l fexitbuffer,a0            :a0 = pointer to exitbuffer and
  708.         move.l a0,d0                    :given in d0 too for C programms
  709.         rts                             :and quit FileRequest routine
  710.  
  711. filenoload:
  712.         lea.l fileerror2,a0             :'No file selected'
  713.         lea.l filename,a1
  714.         moveq #4,d0
  715. fcopyerr2:
  716.         move.l (a0)+,(a1)+              :copy error msg in filename
  717.         subq #1,d0
  718.         bne fcopyerr2
  719.         bsr frefreshfile                :and print it
  720.         bra fprocess
  721.  
  722. fileparent:
  723.         lea.l fdrawer,a0
  724.         moveq #49,d0
  725. fileparentex:
  726.         cmp.b #'/',0(a0,d0)              :search an '/'
  727.         beq fileparentexist
  728.         cmp.b #':',0(a0,d0)              :search an ':'
  729.         beq fileparentexist2
  730.         subq #1,d0                      :if not found continue
  731.         bne fileparentex                :and loop
  732.         bra fprocess                    :if nothing loop to process
  733. fileparentexist:
  734.         move.b #0,0(a0,d0)               :if '/' founded, move 0
  735.         bra fileparexit
  736. fileparentexist2:
  737.         addq #1,d0
  738.         tst.b 0(a0,d0)
  739.         beq fprocess                    :if just dfx: then do nothing
  740.         move.b #0,0(a0,d0)               :do not delete ':'
  741. fileparexit:
  742.         bsr freset                      :Unlock-clr filenames&name-initmover
  743.         bsr frefreshdrawer              :and print new drawer
  744.         bra fstartprocess
  745.  
  746. filetitre:
  747.         tst.b flaglect                  :test if reading directory
  748.         beq fprocess                    :if true, ignore selection
  749.         tst.b flagdiskremoved           :same case if disk removed
  750.         bne fprocess
  751.         add.b faffstart,d0              :d0 = position - 16(gadget) -1 (off)
  752.         sub.b #16,d0                    :d0 from 0 to x
  753.         move.b f,d1
  754.         add.b d,d1
  755.         cmp.b d1,d0
  756.         bcc fprocess                    :if field not present then error
  757.         mulu #32,d0
  758.         move.l filebuffer,a0
  759.         add.l d0,a0                     :adress of buffer
  760.         move.b 31(a0),d7
  761.         cmp.b #03,d7                    :d7 = color
  762.         beq fileseldir                  :directory
  763.         lea.l filename,a1               :else filename
  764.         move.l a0,a2
  765. filetittst:
  766.         move.b (a1)+,d5
  767.         cmp.b (a2),d5                   :it is present in filename?
  768.         bne filefirst                   :if not copy it in string filename
  769.         tst.b (a2)+
  770.         bne filetittst
  771.         bra fileok                      :else go to fileok
  772. filefirst:
  773.         moveq #15,d0
  774.         lea.l filename,a1
  775. filecopyfile:
  776.         move.w (a0)+,(a1)+              :copy name in string
  777.         subq #1,d0
  778.         bne filecopyfile
  779.         bsr frefreshfile                :and print name in filename string
  780.         bra fprocess
  781. fileseldir:
  782.         moveq #7,d0                     :it is a directory
  783.         lea.l fdrawer,a1
  784. filetestend:
  785.         tst.b (a1)+                     :search end of drawer
  786.         bne filetestend
  787.         subq #2,a1
  788.         cmp.b #':',(a1)+
  789.         beq filenewdrawer
  790.         move.b #'/',(a1)+               :put slash
  791. filenewdrawer:
  792.         move.b (a0),(a1)+               :copy new drawer
  793.         tst.b (a0)+
  794.         bne filenewdrawer
  795. filenewend:
  796.         bsr freset                      :Unlock-clr titres-no oldname
  797.         bsr frefreshdrawer              :print new drawer
  798.         bra fstartprocess
  799.  
  800. fdiskremoved:
  801.         tst.b flaglect
  802.         beq fprocess                    :is no disk operation now?
  803.         tst.b flagdiskremoved
  804.         bne fprocess                    :is a disk removed?
  805.         bsr funlock
  806.         bsr ftestdrawerremoved          :Z flag if drawer is present
  807.         beq fprocess
  808.         lea.l fdrawer,a0
  809.         move.b #0,4(a0)                 :cut drawer after :
  810.         move.b #$ff,flagdiskremoved     :set flag
  811.         bsr freset
  812.         bsr frefreshdrawer
  813.         bra fprocess
  814.  
  815. fdiskinserted:
  816.         tst.b flaglect
  817.         beq fprocess
  818.         tst.b flagdiskremoved
  819.         beq fprocess
  820.         bsr ftestdrawerremoved          :Z flag if drawer is inserted
  821.         bne fprocess
  822.         bra fstartprocess
  823.  
  824. ****************************************************************************
  825. * Sub-Routines -------------------------------------------------------------
  826. ****************************************************************************
  827.  
  828.  
  829. frefreshdrawer:
  830.         move.w #0,fdrawp                :print starting first character
  831.         move.l #0,a00Gadget2            :Refresh only the string gadget
  832.         lea.l a00Gadget2,a0             :"Drawer"
  833.         move.l filewinhd,a1
  834.         move.l #0,a2
  835.         CALLINT RefreshGadgets          :Refresh it
  836.         lea.l a00Gadget3,a0
  837.         move.l a0,a00Gadget2            :replace the next gadget pointer
  838.         rts
  839.  
  840. frefreshfile:
  841.         move.w #0,ffilep                :print starting first character
  842.         lea.l a00Gadget25,a0            :Refresh the string gadget Filename
  843.         move.l filewinhd,a1
  844.         move.l #0,a2
  845.         CALLINT RefreshGadgets          :Refresh it
  846.         rts
  847.  
  848. funlock:
  849.         tst.b flaglock                  :Unlock possible?
  850.         beq fnounlock                   :if not quit this sub-routine
  851.         move.b #0,flaglock              :else clear flag
  852.         move.l lockhd,d1
  853.         CALLDOS UnLock                  :and unlock
  854. fnounlock:
  855.         rts
  856.  
  857. freset:
  858.         bsr funlock                     :unlock before new drawer
  859.         move.l fRport,a1
  860.         moveq #0,d0
  861.         CALLGRAF SetAPen                :Set color before filling area
  862.         move.l fRport,a1
  863.         moveq #10,d0
  864.         move.l #17,d1
  865.         move.l #208,d2
  866.         move.l #87,d3
  867.         CALLGRAF RectFill               :clear all file names
  868.         bsr frefreshmover               :re init mover
  869.         move.w #1,faffstart
  870.         move.b #$0,filename             :delete old filename
  871.         bsr frefreshfile
  872.         rts
  873.  
  874. frefreshmover:
  875.         lea.l a00Gadget11,a0
  876.         move.l filewinhd,a1
  877.         move.l #0,a2
  878.         moveq #5,d0
  879.         moveq #0,d1                     :replace all original parameters
  880.         moveq #0,d2
  881.         moveq #0,d3
  882.         move.l #$ffff,d4
  883.         CALLINT ModifyProp              :modify the proportionnal gadget
  884.         rts
  885.  
  886. filescroll:
  887.         cmpi.b #1,$dff006
  888.         bne filescroll                  :wait sync. before scrolling
  889.         move.l  fRport,a1               :prepare scrollraster
  890.         move.l  #0,d0
  891.         move.l  d7,d1
  892.         move.l  #10,d2
  893.         move.l  #17,d3
  894.         move.l  #208,d4
  895.         move.l  #87,d5
  896.         CALLGRAF ScrollRaster           :scroll text x pixelline(s) down
  897.         move.l d7,d1
  898.         subq #1,d6
  899.         bne filescroll                  :scroll 8 bits down
  900.         move.l filebuffer,a0
  901.         clr.l d0
  902.         rts
  903. fileafterscroll:
  904.         mulu #32,d0
  905.         add.l d0,a0                     :a0 = adress begin of new title
  906.         lea.l fafftext,a1               :copy text for next title
  907.         moveq #25,d0
  908. fcopy:
  909.         move.b (a0)+,(a1)+              :25 characters to copy
  910.         subq #1,d0
  911.         bne fcopy
  912.         move.b #0,(a1)                  :copy the 0
  913.         addq #6,a0
  914.         move.b (a0),faffnewline         :copy the colour
  915.         move.l fRport,a0
  916.         lea.l faffnewline,a1
  917.         moveq #0,d0
  918.         moveq #0,d1
  919.         CALLINT PrintIText              :print file name
  920.         rts
  921.  
  922. ftestdrawerremoved:
  923.         bsr funlock
  924.         cmp.l #'DF0:',fdrawer
  925.         bne fnodf0rem
  926.         clr.l d0
  927.         bra ftestrem
  928. fnodf0rem:
  929.         cmp.l #'DF1:',fdrawer
  930.         bne fnodf1rem
  931.         moveq #1,d0
  932.         bra ftestrem
  933. fnodf1rem:
  934.         cmp.l #'DF2:',fdrawer
  935.         bne fnodf2rem
  936.         moveq #2,d0
  937.         bra ftestrem
  938. fnodf2rem:
  939.         cmp.l #'DF3:',fdrawer
  940.         beq fdf3rem
  941.         sub.l d0,d0                     :Z > Not DFx or Bad drawer
  942.         bra fexitdrawerremoved
  943. fdf3rem:
  944.         moveq #3,d0
  945. ftestrem:
  946.         clr.l d1
  947.         lea.l fdiskio,a1
  948.         lea.l ftrddevice,a0
  949.         CALLEXEC OpenDevice
  950.         lea.l fdiskio,a1
  951.         move #$e,28(a1)
  952.         CALLEXEC DoIO
  953.         lea.l fdiskio,a1
  954.         CALLEXEC CloseDevice
  955.         lea.l fdiskio,a1
  956.         tst.l 32(a1)
  957. fexitdrawerremoved:
  958.         rts
  959.  
  960. ** Sub-routine that open Ram Disk and search all mounted devices **********
  961. * (see also public domain programm: DevStatus in Fish Disk 292)
  962.  
  963. fdevstat:
  964.         move.l #fdevactram,d1           :Open ram disk
  965.         move.l #$fffffffe,d2            :
  966.         CALLDOS Lock                    :
  967.         move.l d0,d1                    :
  968.         CALLDOS UnLock                  :ram disk is now activated
  969.  
  970.         move.l _DOSBase,a0              :Search pointer of DeviceNodes------
  971.         move.l dl_Root(a0),a1           :search dl_Root
  972.         move.l rn_Info(a1),d0           :search rn_Info (BPTR)
  973.         asl.l #2,d0                     :(convert BPTR in APTR)
  974.         move.l d0,a0                    :
  975.         move.l di_DevInfo(a0),d0        :search di_DevInfo (BPTR)
  976.         asl.l #2,d0                     :
  977.         move.l d0,a5                    :save pointer of Devicenodes
  978.  
  979. fdevDLT_DEVICE:
  980.         cmp.l #DLT_DEVICE,dn_Type(a5)   :is it a harware device?
  981.         bne fdevdevcont
  982.  
  983.         move.l dn_Name(a5),d0
  984.         asl.l #2,d0
  985.         move.l d0,a0
  986.         move.l (a0),d0
  987.         asl.l #8,d0                     :d0 = devicename
  988.  
  989.         moveq #10,d7                    :prepare to compare with all devices
  990.         lea.l fdevDF0,a1
  991. fdevnextdev:
  992.         move.l (a1),d1
  993.         cmp.l d0,d1                     :compare name with names in table
  994.         beq fdevrecon
  995.         subq #1,d7
  996.         beq fdevdevcont                 :next name if not standard name
  997.         add.l #4,a1
  998.         bra fdevnextdev
  999.  
  1000. fdevrecon:
  1001.         add.l #3,a1
  1002.         move.b #$ff,(a1)+               :modify flag of name if founded
  1003.  
  1004. fdevdevcont:
  1005.         move.l dn_Next(a5),d7           :Search the next pointer
  1006.         tst.l d7
  1007.         beq fdevend                     :if no more, then end of sub-routine
  1008.         asl.l #2,d7
  1009.         move.l d7,a5
  1010.         bra fdevDLT_DEVICE              :else search other devicename
  1011.  
  1012. fdevend:
  1013.         rts
  1014.  
  1015. ****************************************************************************
  1016. * Declaration of system variables and handles ------------------------------
  1017. ****************************************************************************
  1018.  
  1019. _IntuitionBase  dc.l 0                  :Bases of libraries
  1020. _DOSBase        dc.l 0
  1021. _GfxBase        dc.l 0
  1022.  
  1023. intname         INTNAME                 :Name of libraries
  1024.                 even
  1025. grafname        GRAFNAME
  1026.                 even
  1027. dosname         DOSNAME
  1028.                 even
  1029.  
  1030. ftrddevice      dc.b 'trackdisk.device',0
  1031.                 even
  1032. fdiskio         ds.l 20
  1033.  
  1034. fRport          dc.l 0
  1035. fUport          dc.l 0
  1036. filewinhd       dc.l 0
  1037.  
  1038. filebuffer      dc.l 0
  1039. fexitbuffer     ds.l 25
  1040. folddiskname    ds.w 25
  1041.  
  1042. fdevDF0         dc.b 'DF0',0
  1043. fdevDF1         dc.b 'DF1',0
  1044. fdevDF2         dc.b 'DF2',0
  1045. fdevDF3         dc.b 'DF3',0
  1046. fdevDH0         dc.b 'DH0',0
  1047. fdevDH1         dc.b 'DH1',0
  1048. fdevJH0         dc.b 'JH0',0
  1049. fdevVD0         dc.b 'VD0',0
  1050. fdevRAM         dc.b 'RAM',0
  1051. fdevRAD         dc.b 'RAD',0
  1052.  
  1053. fdevactram      dc.b 'ram:',0
  1054.                 even
  1055.  
  1056. lockhd          dc.l 0
  1057.  
  1058.                 cnop 0,4
  1059. fileinfo        ds.l 260
  1060.  
  1061. f               dc.w 0
  1062. d               dc.w 0
  1063. faffstart       dc.w 0
  1064.  
  1065. flaglect        dc.w 0
  1066. flaglock        dc.w 0
  1067. flagdiskremoved dc.w 0
  1068. flagreadaborted dc.w 0
  1069.  
  1070. fileerror1      dc.b 'No disk in drive',0
  1071.                 even
  1072. fileerror2      dc.b 'No file selected',0
  1073.                 even
  1074. fileerror3      dc.b 'Bad drawer      ',0
  1075.                 even
  1076.  
  1077. ****************************************************************************
  1078. * Declaration of window and gadgets structures -----------------------------
  1079. ****************************************************************************
  1080.  
  1081. a00NewWindowStructure1:
  1082.         dc.w    114,27  ;window XY origin relative to TopLeft of screen
  1083.         dc.w    420,107 ;window width and height
  1084.         dc.b    0,1     ;detail and block pens
  1085.         dc.l    GADGETDOWN+GADGETUP+DISKINSERTED+DISKREMOVED    ;IDCMP flags
  1086.         dc.l    WINDOWDRAG+ACTIVATE+RMBTRAP     ;other window flags
  1087.         dc.l    a00GadgetList1  ;first gadget in gadget list
  1088.         dc.l    NULL    ;custom CHECKMARK imagery
  1089. a00wdnm dc.l    a00NewWindowName1       ;window title
  1090. a00scrp dc.l    NULL    ;custom screen pointer
  1091.         dc.l    NULL    ;custom bitmap
  1092.         dc.w    5,5     ;minimum width and height
  1093.         dc.w    -1,-1   ;maximum width and height
  1094.         dc.w    WBENCHSCREEN    ;destination screen type ! Replace it with
  1095.                                 ;CUSTOMSCREEN when you use your own screen
  1096. a00NewWindowName1:
  1097.         dc.b    'FileRequest V2.02 by F.Lienhardt',0
  1098.         cnop 0,2
  1099. a00GadgetList1:
  1100. a00Gadget1:
  1101.         dc.l    a00Gadget2      ;next gadget
  1102.         dc.w    251,49  ;origin XY of hit box relative to window TopLeft
  1103.         dc.w    34,9    ;hit box width and height
  1104.         dc.w    NULL    ;gadget flags
  1105.         dc.w    RELVERIFY       ;activation flags
  1106.         dc.w    BOOLGADGET      ;gadget type flags
  1107.         dc.l    a00Border1      ;gadget border or image to be rendered
  1108.         dc.l    NULL    ;alternate imagery for selection
  1109.         dc.l    a00IText1       ;first IntuiText structure
  1110.         dc.l    NULL    ;gadget mutual-exclude long word
  1111.         dc.l    NULL    ;SpecialInfo structure
  1112.         dc.w    01      ;user-definable data
  1113.         dc.l    NULL    ;pointer to user-definable data
  1114. a00Border1:
  1115.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1116.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1117.         dc.b    5       ;number of XY vectors
  1118.         dc.l    a00BorderVectors1       ;pointer to XY vectors
  1119.         dc.l    NULL    ;next border in list
  1120. a00BorderVectors1:
  1121.         dc.w    0,0
  1122.         dc.w    35,0
  1123.         dc.w    35,10
  1124.         dc.w    0,10
  1125.         dc.w    0,0
  1126. a00IText1:
  1127.         dc.b    1,2,RP_JAM1,0   ;front and back text pens, drawmode and fill byte
  1128.         dc.w    5,1     ;XY origin relative to container TopLeft
  1129.         dc.l    NULL    ;font pointer or NULL for default
  1130.         dc.l    a00ITextText1   ;pointer to text
  1131.         dc.l    NULL    ;next IntuiText structure
  1132. a00ITextText1:
  1133.         dc.b    'DF0',0
  1134.         cnop 0,2
  1135. a00Gadget2:
  1136.         dc.l    a00Gadget3      ;next gadget
  1137.         dc.w    251,31  ;origin XY of hit box relative to window TopLeft
  1138.         dc.w    153,8   ;hit box width and height
  1139.         dc.w    NULL    ;gadget flags
  1140.         dc.w    RELVERIFY       ;activation flags
  1141.         dc.w    STRGADGET       ;gadget type flags
  1142.         dc.l    a00Border2      ;gadget border or image to be rendered
  1143.         dc.l    NULL    ;alternate imagery for selection
  1144.         dc.l    NULL    ;first IntuiText structure
  1145.         dc.l    NULL    ;gadget mutual-exclude long word
  1146.         dc.l    a00a00Gadget2SInfo      ;SpecialInfo structure
  1147.         dc.w    0       ;user-definable data
  1148.         dc.l    NULL    ;pointer to user-definable data
  1149. a00a00Gadget2SInfo:
  1150.         dc.l    fdrawer ;buffer where text will be edited
  1151.         dc.l    NULL    ;optional undo buffer
  1152.         dc.w    0       ;character position in buffer
  1153.         dc.w    50      ;maximum number of characters to allow
  1154. fdrawp  dc.w    0       ;first displayed character buffer position
  1155.         dc.w    0,0,0,0,0       ;Intuition initialized and maintained variables
  1156.         dc.l    0       ;Rastport of gadget
  1157.         dc.l    0       ;initial value for integer gadgets
  1158.         dc.l    NULL    ;alternate keymap (fill in if you set the flag)
  1159. fdrawer:
  1160.         dc.b "DF0:"
  1161.         dcb.l 12,0
  1162.         cnop 0,2
  1163. a00Border2:
  1164.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1165.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1166.         dc.b    5       ;number of XY vectors
  1167.         dc.l    a00BorderVectors2       ;pointer to XY vectors
  1168.         dc.l    NULL    ;next border in list
  1169. a00BorderVectors2:
  1170.         dc.w    0,0
  1171.         dc.w    154,0
  1172.         dc.w    154,9
  1173.         dc.w    0,9
  1174.         dc.w    0,0
  1175. a00Gadget3:
  1176.         dc.l    a00Gadget4      ;next gadget
  1177.         dc.w    10,16   ;origin XY of hit box relative to window TopLeft
  1178.         dc.w    200,9   ;hit box width and height
  1179.         dc.w    NULL    ;gadget flags
  1180.         dc.w    RELVERIFY       ;activation flags
  1181.         dc.w    BOOLGADGET      ;gadget type flags
  1182.         dc.l    a00Border3      ;gadget border or image to be rendered
  1183.         dc.l    NULL    ;alternate imagery for selection
  1184.         dc.l    NULL    ;first IntuiText structure
  1185.         dc.l    NULL    ;gadget mutual-exclude long word
  1186.         dc.l    NULL    ;SpecialInfo structure
  1187.         dc.w    15      ;user-definable data
  1188.         dc.l    NULL    ;pointer to user-definable data
  1189. a00Border3:
  1190.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1191.         dc.b    1,2,RP_JAM2     ;front pen, back pen and drawmode
  1192.         dc.b    5       ;number of XY vectors
  1193.         dc.l    a00BorderVectors3       ;pointer to XY vectors
  1194.         dc.l    NULL    ;next border in list
  1195. a00BorderVectors3:
  1196.         dc.w    0,0
  1197.         dc.w    201,0
  1198.         dc.w    201,73
  1199.         dc.w    0,73
  1200.         dc.w    0,1
  1201. a00Gadget4:
  1202.         dc.l    a00Gadget5      ;next gadget
  1203.         dc.w    10,25   ;origin XY of hit box relative to window TopLeft
  1204.         dc.w    200,9   ;hit box width and height
  1205.         dc.w    NULL    ;gadget flags
  1206.         dc.w    RELVERIFY       ;activation flags
  1207.         dc.w    BOOLGADGET      ;gadget type flags
  1208.         dc.l    a00Border4      ;gadget border or image to be rendered
  1209.         dc.l    NULL    ;alternate imagery for selection
  1210.         dc.l    NULL    ;first IntuiText structure
  1211.         dc.l    NULL    ;gadget mutual-exclude long word
  1212.         dc.l    NULL    ;SpecialInfo structure
  1213.         dc.w    16      ;user-definable data
  1214.         dc.l    NULL    ;pointer to user-definable data
  1215. a00Border4:
  1216.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1217.         dc.b    0,0,RP_JAM1     ;front pen, back pen and drawmode
  1218.         dc.b    5       ;number of XY vectors
  1219.         dc.l    a00BorderVectors4       ;pointer to XY vectors
  1220.         dc.l    NULL    ;next border in list
  1221. a00BorderVectors4:
  1222.         dc.w    0,0
  1223.         dc.w    201,0
  1224.         dc.w    201,10
  1225.         dc.w    0,10
  1226.         dc.w    0,0
  1227. a00Gadget5:
  1228.         dc.l    a00Gadget6      ;next gadget
  1229.         dc.w    10,34   ;origin XY of hit box relative to window TopLeft
  1230.         dc.w    200,9   ;hit box width and height
  1231.         dc.w    NULL    ;gadget flags
  1232.         dc.w    RELVERIFY       ;activation flags
  1233.         dc.w    BOOLGADGET      ;gadget type flags
  1234.         dc.l    a00Border5      ;gadget border or image to be rendered
  1235.         dc.l    NULL    ;alternate imagery for selection
  1236.         dc.l    NULL    ;first IntuiText structure
  1237.         dc.l    NULL    ;gadget mutual-exclude long word
  1238.         dc.l    NULL    ;SpecialInfo structure
  1239.         dc.w    17      ;user-definable data
  1240.         dc.l    NULL    ;pointer to user-definable data
  1241. a00Border5:
  1242.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1243.         dc.b    0,0,RP_JAM1     ;front pen, back pen and drawmode
  1244.         dc.b    5       ;number of XY vectors
  1245.         dc.l    a00BorderVectors5       ;pointer to XY vectors
  1246.         dc.l    NULL    ;next border in list
  1247. a00BorderVectors5:
  1248.         dc.w    0,0
  1249.         dc.w    201,0
  1250.         dc.w    201,10
  1251.         dc.w    0,10
  1252.         dc.w    0,0
  1253. a00Gadget6:
  1254.         dc.l    a00Gadget7      ;next gadget
  1255.         dc.w    10,43   ;origin XY of hit box relative to window TopLeft
  1256.         dc.w    200,9   ;hit box width and height
  1257.         dc.w    NULL    ;gadget flags
  1258.         dc.w    RELVERIFY       ;activation flags
  1259.         dc.w    BOOLGADGET      ;gadget type flags
  1260.         dc.l    a00Border6      ;gadget border or image to be rendered
  1261.         dc.l    NULL    ;alternate imagery for selection
  1262.         dc.l    NULL    ;first IntuiText structure
  1263.         dc.l    NULL    ;gadget mutual-exclude long word
  1264.         dc.l    NULL    ;SpecialInfo structure
  1265.         dc.w    18      ;user-definable data
  1266.         dc.l    NULL    ;pointer to user-definable data
  1267. a00Border6:
  1268.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1269.         dc.b    0,0,RP_JAM1     ;front pen, back pen and drawmode
  1270.         dc.b    5       ;number of XY vectors
  1271.         dc.l    a00BorderVectors6       ;pointer to XY vectors
  1272.         dc.l    NULL    ;next border in list
  1273. a00BorderVectors6:
  1274.         dc.w    0,0
  1275.         dc.w    201,0
  1276.         dc.w    201,10
  1277.         dc.w    0,10
  1278.         dc.w    0,0
  1279. a00Gadget7:
  1280.         dc.l    a00Gadget8      ;next gadget
  1281.         dc.w    10,52   ;origin XY of hit box relative to window TopLeft
  1282.         dc.w    200,9   ;hit box width and height
  1283.         dc.w    NULL    ;gadget flags
  1284.         dc.w    RELVERIFY       ;activation flags
  1285.         dc.w    BOOLGADGET      ;gadget type flags
  1286.         dc.l    a00Border7      ;gadget border or image to be rendered
  1287.         dc.l    NULL    ;alternate imagery for selection
  1288.         dc.l    NULL    ;first IntuiText structure
  1289.         dc.l    NULL    ;gadget mutual-exclude long word
  1290.         dc.l    NULL    ;SpecialInfo structure
  1291.         dc.w    19      ;user-definable data
  1292.         dc.l    NULL    ;pointer to user-definable data
  1293. a00Border7:
  1294.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1295.         dc.b    0,0,RP_JAM1     ;front pen, back pen and drawmode
  1296.         dc.b    5       ;number of XY vectors
  1297.         dc.l    a00BorderVectors7       ;pointer to XY vectors
  1298.         dc.l    NULL    ;next border in list
  1299. a00BorderVectors7:
  1300.         dc.w    0,0
  1301.         dc.w    201,0
  1302.         dc.w    201,10
  1303.         dc.w    0,10
  1304.         dc.w    0,0
  1305. a00Gadget8:
  1306.         dc.l    a00Gadget9      ;next gadget
  1307.         dc.w    10,61   ;origin XY of hit box relative to window TopLeft
  1308.         dc.w    200,9   ;hit box width and height
  1309.         dc.w    NULL    ;gadget flags
  1310.         dc.w    RELVERIFY       ;activation flags
  1311.         dc.w    BOOLGADGET      ;gadget type flags
  1312.         dc.l    a00Border8      ;gadget border or image to be rendered
  1313.         dc.l    NULL    ;alternate imagery for selection
  1314.         dc.l    NULL    ;first IntuiText structure
  1315.         dc.l    NULL    ;gadget mutual-exclude long word
  1316.         dc.l    NULL    ;SpecialInfo structure
  1317.         dc.w    20      ;user-definable data
  1318.         dc.l    NULL    ;pointer to user-definable data
  1319. a00Border8:
  1320.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1321.         dc.b    0,0,RP_JAM1     ;front pen, back pen and drawmode
  1322.         dc.b    5       ;number of XY vectors
  1323.         dc.l    a00BorderVectors8       ;pointer to XY vectors
  1324.         dc.l    NULL    ;next border in list
  1325. a00BorderVectors8:
  1326.         dc.w    0,0
  1327.         dc.w    201,0
  1328.         dc.w    201,10
  1329.         dc.w    0,10
  1330.         dc.w    0,0
  1331. a00Gadget9:
  1332.         dc.l    a00Gadget10     ;next gadget
  1333.         dc.w    10,70   ;origin XY of hit box relative to window TopLeft
  1334.         dc.w    200,9   ;hit box width and height
  1335.         dc.w    NULL    ;gadget flags
  1336.         dc.w    RELVERIFY       ;activation flags
  1337.         dc.w    BOOLGADGET      ;gadget type flags
  1338.         dc.l    a00Border9      ;gadget border or image to be rendered
  1339.         dc.l    NULL    ;alternate imagery for selection
  1340.         dc.l    NULL    ;first IntuiText structure
  1341.         dc.l    NULL    ;gadget mutual-exclude long word
  1342.         dc.l    NULL    ;SpecialInfo structure
  1343.         dc.w    21      ;user-definable data
  1344.         dc.l    NULL    ;pointer to user-definable data
  1345. a00Border9:
  1346.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1347.         dc.b    0,0,RP_JAM1     ;front pen, back pen and drawmode
  1348.         dc.b    5       ;number of XY vectors
  1349.         dc.l    a00BorderVectors9       ;pointer to XY vectors
  1350.         dc.l    NULL    ;next border in list
  1351. a00BorderVectors9:
  1352.         dc.w    0,0
  1353.         dc.w    201,0
  1354.         dc.w    201,10
  1355.         dc.w    0,10
  1356.         dc.w    0,0
  1357. a00Gadget10:
  1358.         dc.l    a00Gadget11     ;next gadget
  1359.         dc.w    10,79   ;origin XY of hit box relative to window TopLeft
  1360.         dc.w    200,9   ;hit box width and height
  1361.         dc.w    NULL    ;gadget flags
  1362.         dc.w    RELVERIFY       ;activation flags
  1363.         dc.w    BOOLGADGET      ;gadget type flags
  1364.         dc.l    a00Border10     ;gadget border or image to be rendered
  1365.         dc.l    NULL    ;alternate imagery for selection
  1366.         dc.l    NULL    ;first IntuiText structure
  1367.         dc.l    NULL    ;gadget mutual-exclude long word
  1368.         dc.l    NULL    ;SpecialInfo structure
  1369.         dc.w    22      ;user-definable data
  1370.         dc.l    NULL    ;pointer to user-definable data
  1371. a00Border10:
  1372.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1373.         dc.b    0,0,RP_JAM1     ;front pen, back pen and drawmode
  1374.         dc.b    5       ;number of XY vectors
  1375.         dc.l    a00BorderVectors10      ;pointer to XY vectors
  1376.         dc.l    NULL    ;next border in list
  1377. a00BorderVectors10:
  1378.         dc.w    0,0
  1379.         dc.w    201,0
  1380.         dc.w    201,10
  1381.         dc.w    0,10
  1382.         dc.w    0,0
  1383. a00Gadget11:
  1384.         dc.l    a00Gadget12     ;next gadget
  1385.         dc.w    218,15  ;origin XY of hit box relative to window TopLeft
  1386.         dc.w    20,74   ;hit box width and height
  1387.         dc.w    NULL    ;gadget flags
  1388.         dc.w    NULL    ;activation flags
  1389.         dc.w    PROPGADGET      ;gadget type flags
  1390.         dc.l    a00Image1       ;gadget border or image to be rendered
  1391.         dc.l    NULL    ;alternate imagery for selection
  1392.         dc.l    NULL    ;first IntuiText structure
  1393.         dc.l    NULL    ;gadget mutual-exclude long word
  1394.         dc.l    a00a00Gadget11SInfo     ;SpecialInfo structure
  1395.         dc.w    14      ;user-definable data
  1396.         dc.l    NULL    ;pointer to user-definable data
  1397. a00a00Gadget11SInfo:
  1398.         dc.w    AUTOKNOB+FREEVERT       ;PropInfo flags
  1399.         dc.w    0       ;horizontal and vertical pot values
  1400. fmoverp dc.w    0
  1401.         dc.w    0       ;horizontal and vertical body values
  1402. fmovers dc.w    $ffff
  1403.         dc.w    0,0,0,0,0,0     ;Intuition initialized and maintained variables
  1404. a00Image1:
  1405.         dc.w    0,0     ;XY origin relative to container TopLeft
  1406.         dc.w    12,70   ;Image width and height in pixels
  1407.         dc.w    0       ;number of bitplanes in Image
  1408.         dc.l    NULL    ;pointer to ImageData
  1409.         dc.b    $0000,$0000     ;PlanePick and PlaneOnOff
  1410.         dc.l    NULL    ;next Image structure
  1411. a00Gadget12:
  1412.         dc.l    a00Gadget13     ;next gadget
  1413.         dc.w    291,49  ;origin XY of hit box relative to window TopLeft
  1414.         dc.w    34,9    ;hit box width and height
  1415.         dc.w    NULL    ;gadget flags
  1416.         dc.w    RELVERIFY       ;activation flags
  1417.         dc.w    BOOLGADGET      ;gadget type flags
  1418.         dc.l    a00Border11     ;gadget border or image to be rendered
  1419.         dc.l    NULL    ;alternate imagery for selection
  1420.         dc.l    a00IText2       ;first IntuiText structure
  1421.         dc.l    NULL    ;gadget mutual-exclude long word
  1422.         dc.l    NULL    ;SpecialInfo structure
  1423.         dc.w    02      ;user-definable data
  1424.         dc.l    NULL    ;pointer to user-definable data
  1425. a00Border11:
  1426.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1427.         dc.b    3,1,RP_JAM1     ;front pen, back pen and drawmode
  1428.         dc.b    5       ;number of XY vectors
  1429.         dc.l    a00BorderVectors11      ;pointer to XY vectors
  1430.         dc.l    NULL    ;next border in list
  1431. a00BorderVectors11:
  1432.         dc.w    0,0
  1433.         dc.w    35,0
  1434.         dc.w    35,10
  1435.         dc.w    0,10
  1436.         dc.w    0,0
  1437. a00IText2:
  1438.         dc.b    1,0,RP_JAM2,0   ;front and back text pens, drawmode and fill byte
  1439.         dc.w    6,1     ;XY origin relative to container TopLeft
  1440.         dc.l    NULL    ;font pointer or NULL for default
  1441.         dc.l    a00ITextText2   ;pointer to text
  1442.         dc.l    NULL    ;next IntuiText structure
  1443. a00ITextText2:
  1444.         dc.b    'DF1',0
  1445.         cnop 0,2
  1446. a00Gadget13:
  1447.         dc.l    a00Gadget14     ;next gadget
  1448.         dc.w    331,49  ;origin XY of hit box relative to window TopLeft
  1449.         dc.w    34,9    ;hit box width and height
  1450.         dc.w    NULL    ;gadget flags
  1451.         dc.w    RELVERIFY       ;activation flags
  1452.         dc.w    BOOLGADGET      ;gadget type flags
  1453.         dc.l    a00Border12     ;gadget border or image to be rendered
  1454.         dc.l    NULL    ;alternate imagery for selection
  1455.         dc.l    a00IText3       ;first IntuiText structure
  1456.         dc.l    NULL    ;gadget mutual-exclude long word
  1457.         dc.l    NULL    ;SpecialInfo structure
  1458.         dc.w    03      ;user-definable data
  1459.         dc.l    NULL    ;pointer to user-definable data
  1460. a00Border12:
  1461.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1462.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1463.         dc.b    5       ;number of XY vectors
  1464.         dc.l    a00BorderVectors12      ;pointer to XY vectors
  1465.         dc.l    NULL    ;next border in list
  1466. a00BorderVectors12:
  1467.         dc.w    0,0
  1468.         dc.w    35,0
  1469.         dc.w    35,10
  1470.         dc.w    0,10
  1471.         dc.w    0,0
  1472. a00IText3:
  1473.         dc.b    1,2,RP_JAM1,0   ;front and back text pens, drawmode and fill byte
  1474.         dc.w    -3,1    ;XY origin relative to container TopLeft
  1475.         dc.l    NULL    ;font pointer or NULL for default
  1476.         dc.l    a00ITextText3   ;pointer to text
  1477.         dc.l    NULL    ;next IntuiText structure
  1478. a00ITextText3:
  1479.         dc.b    ' DF2 ',0
  1480.         cnop 0,2
  1481. a00Gadget14:
  1482.         dc.l    a00Gadget15     ;next gadget
  1483.         dc.w    371,49  ;origin XY of hit box relative to window TopLeft
  1484.         dc.w    34,9    ;hit box width and height
  1485.         dc.w    NULL    ;gadget flags
  1486.         dc.w    RELVERIFY       ;activation flags
  1487.         dc.w    BOOLGADGET      ;gadget type flags
  1488.         dc.l    a00Border13     ;gadget border or image to be rendered
  1489.         dc.l    NULL    ;alternate imagery for selection
  1490.         dc.l    a00IText4       ;first IntuiText structure
  1491.         dc.l    NULL    ;gadget mutual-exclude long word
  1492.         dc.l    NULL    ;SpecialInfo structure
  1493.         dc.w    04      ;user-definable data
  1494.         dc.l    NULL    ;pointer to user-definable data
  1495. a00Border13:
  1496.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1497.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1498.         dc.b    5       ;number of XY vectors
  1499.         dc.l    a00BorderVectors13      ;pointer to XY vectors
  1500.         dc.l    NULL    ;next border in list
  1501. a00BorderVectors13:
  1502.         dc.w    0,0
  1503.         dc.w    35,0
  1504.         dc.w    35,10
  1505.         dc.w    0,10
  1506.         dc.w    0,0
  1507. a00IText4:
  1508.         dc.b    1,0,RP_JAM1,0   ;front and back text pens, drawmode and fill byte
  1509.         dc.w    5,1     ;XY origin relative to container TopLeft
  1510.         dc.l    NULL    ;font pointer or NULL for default
  1511.         dc.l    a00ITextText4   ;pointer to text
  1512.         dc.l    NULL    ;next IntuiText structure
  1513. a00ITextText4:
  1514.         dc.b    'DF3',0
  1515.         cnop 0,2
  1516. a00Gadget15:
  1517.         dc.l    a00Gadget16     ;next gadget
  1518.         dc.w    251,62  ;origin XY of hit box relative to window TopLeft
  1519.         dc.w    34,9    ;hit box width and height
  1520.         dc.w    NULL    ;gadget flags
  1521.         dc.w    RELVERIFY       ;activation flags
  1522.         dc.w    BOOLGADGET      ;gadget type flags
  1523.         dc.l    a00Border14     ;gadget border or image to be rendered
  1524.         dc.l    NULL    ;alternate imagery for selection
  1525.         dc.l    a00IText5       ;first IntuiText structure
  1526.         dc.l    NULL    ;gadget mutual-exclude long word
  1527.         dc.l    NULL    ;SpecialInfo structure
  1528.         dc.w    05      ;user-definable data
  1529.         dc.l    NULL    ;pointer to user-definable data
  1530. a00Border14:
  1531.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1532.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1533.         dc.b    5       ;number of XY vectors
  1534.         dc.l    a00BorderVectors14      ;pointer to XY vectors
  1535.         dc.l    NULL    ;next border in list
  1536. a00BorderVectors14:
  1537.         dc.w    0,0
  1538.         dc.w    35,0
  1539.         dc.w    35,10
  1540.         dc.w    0,10
  1541.         dc.w    0,0
  1542. a00IText5:
  1543.         dc.b    1,0,RP_JAM1,0   ;front and back text pens, drawmode and fill byte
  1544.         dc.w    5,1     ;XY origin relative to container TopLeft
  1545.         dc.l    NULL    ;font pointer or NULL for default
  1546.         dc.l    a00ITextText5   ;pointer to text
  1547.         dc.l    NULL    ;next IntuiText structure
  1548. a00ITextText5:
  1549.         dc.b    'DH0',0
  1550.         cnop 0,2
  1551. a00Gadget16:
  1552.         dc.l    a00Gadget17     ;next gadget
  1553.         dc.w    291,62  ;origin XY of hit box relative to window TopLeft
  1554.         dc.w    34,9    ;hit box width and height
  1555.         dc.w    NULL    ;gadget flags
  1556.         dc.w    RELVERIFY       ;activation flags
  1557.         dc.w    BOOLGADGET      ;gadget type flags
  1558.         dc.l    a00Border15     ;gadget border or image to be rendered
  1559.         dc.l    NULL    ;alternate imagery for selection
  1560.         dc.l    a00IText6       ;first IntuiText structure
  1561.         dc.l    NULL    ;gadget mutual-exclude long word
  1562.         dc.l    NULL    ;SpecialInfo structure
  1563.         dc.w    06      ;user-definable data
  1564.         dc.l    NULL    ;pointer to user-definable data
  1565. a00Border15:
  1566.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1567.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1568.         dc.b    5       ;number of XY vectors
  1569.         dc.l    a00BorderVectors15      ;pointer to XY vectors
  1570.         dc.l    NULL    ;next border in list
  1571. a00BorderVectors15:
  1572.         dc.w    0,0
  1573.         dc.w    35,0
  1574.         dc.w    35,10
  1575.         dc.w    0,10
  1576.         dc.w    0,0
  1577. a00IText6:
  1578.         dc.b    1,0,RP_JAM1,0   ;front and back text pens, drawmode and fill byte
  1579.         dc.w    6,1     ;XY origin relative to container TopLeft
  1580.         dc.l    NULL    ;font pointer or NULL for default
  1581.         dc.l    a00ITextText6   ;pointer to text
  1582.         dc.l    NULL    ;next IntuiText structure
  1583. a00ITextText6:
  1584.         dc.b    'DH1',0
  1585.         cnop 0,2
  1586. a00Gadget17:
  1587.         dc.l    a00Gadget18     ;next gadget
  1588.         dc.w    331,62  ;origin XY of hit box relative to window TopLeft
  1589.         dc.w    34,9    ;hit box width and height
  1590.         dc.w    NULL    ;gadget flags
  1591.         dc.w    RELVERIFY       ;activation flags
  1592.         dc.w    BOOLGADGET      ;gadget type flags
  1593.         dc.l    a00Border16     ;gadget border or image to be rendered
  1594.         dc.l    NULL    ;alternate imagery for selection
  1595.         dc.l    a00IText7       ;first IntuiText structure
  1596.         dc.l    NULL    ;gadget mutual-exclude long word
  1597.         dc.l    NULL    ;SpecialInfo structure
  1598.         dc.w    07      ;user-definable data
  1599.         dc.l    NULL    ;pointer to user-definable data
  1600. a00Border16:
  1601.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1602.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1603.         dc.b    5       ;number of XY vectors
  1604.         dc.l    a00BorderVectors16      ;pointer to XY vectors
  1605.         dc.l    NULL    ;next border in list
  1606. a00BorderVectors16:
  1607.         dc.w    0,0
  1608.         dc.w    35,0
  1609.         dc.w    35,10
  1610.         dc.w    0,10
  1611.         dc.w    0,0
  1612. a00IText7:
  1613.         dc.b    1,0,RP_JAM1,0   ;front and back text pens, drawmode and fill byte
  1614.         dc.w    5,1     ;XY origin relative to container TopLeft
  1615.         dc.l    NULL    ;font pointer or NULL for default
  1616.         dc.l    a00ITextText7   ;pointer to text
  1617.         dc.l    NULL    ;next IntuiText structure
  1618. a00ITextText7:
  1619.         dc.b    'JH0',0
  1620.         cnop 0,2
  1621. a00Gadget18:
  1622.         dc.l    a00Gadget19     ;next gadget
  1623.         dc.w    371,62  ;origin XY of hit box relative to window TopLeft
  1624.         dc.w    34,9    ;hit box width and height
  1625.         dc.w    NULL    ;gadget flags
  1626.         dc.w    RELVERIFY       ;activation flags
  1627.         dc.w    BOOLGADGET      ;gadget type flags
  1628.         dc.l    a00Border17     ;gadget border or image to be rendered
  1629.         dc.l    NULL    ;alternate imagery for selection
  1630.         dc.l    a00IText8       ;first IntuiText structure
  1631.         dc.l    NULL    ;gadget mutual-exclude long word
  1632.         dc.l    NULL    ;SpecialInfo structure
  1633.         dc.w    08      ;user-definable data
  1634.         dc.l    NULL    ;pointer to user-definable data
  1635. a00Border17:
  1636.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1637.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1638.         dc.b    5       ;number of XY vectors
  1639.         dc.l    a00BorderVectors17      ;pointer to XY vectors
  1640.         dc.l    NULL    ;next border in list
  1641. a00BorderVectors17:
  1642.         dc.w    0,0
  1643.         dc.w    35,0
  1644.         dc.w    35,10
  1645.         dc.w    0,10
  1646.         dc.w    0,0
  1647. a00IText8:
  1648.         dc.b    1,3,RP_JAM1,0   ;front and back text pens, drawmode and fill byte
  1649.         dc.w    5,1     ;XY origin relative to container TopLeft
  1650.         dc.l    NULL    ;font pointer or NULL for default
  1651.         dc.l    a00ITextText8   ;pointer to text
  1652.         dc.l    NULL    ;next IntuiText structure
  1653. a00ITextText8:
  1654.         dc.b    'VD0',0
  1655.         cnop 0,2
  1656. a00Gadget19:
  1657.         dc.l    a00Gadget20     ;next gadget
  1658.         dc.w    262,94  ;origin XY of hit box relative to window TopLeft
  1659.         dc.w    48,8    ;hit box width and height
  1660.         dc.w    NULL    ;gadget flags
  1661.         dc.w    RELVERIFY       ;activation flags
  1662.         dc.w    BOOLGADGET      ;gadget type flags
  1663.         dc.l    a00Border18     ;gadget border or image to be rendered
  1664.         dc.l    NULL    ;alternate imagery for selection
  1665.         dc.l    a00IText9       ;first IntuiText structure
  1666.         dc.l    NULL    ;gadget mutual-exclude long word
  1667.         dc.l    NULL    ;SpecialInfo structure
  1668.         dc.w    12      ;user-definable data
  1669.         dc.l    NULL    ;pointer to user-definable data
  1670. a00Border18:
  1671.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1672.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1673.         dc.b    5       ;number of XY vectors
  1674.         dc.l    a00BorderVectors18      ;pointer to XY vectors
  1675.         dc.l    NULL    ;next border in list
  1676. a00BorderVectors18:
  1677.         dc.w    0,0
  1678.         dc.w    49,0
  1679.         dc.w    49,9
  1680.         dc.w    0,9
  1681.         dc.w    0,0
  1682. a00IText9:
  1683.         dc.b    2,1,RP_JAM2,0   ;front and back text pens, drawmode and fill byte
  1684.         dc.w    0,0     ;XY origin relative to container TopLeft
  1685.         dc.l    NULL    ;font pointer or NULL for default
  1686.         dc.l    a00ITextText9   ;pointer to text
  1687.         dc.l    NULL    ;next IntuiText structure
  1688. a00ITextText9:
  1689.         dc.b    'Cancel',0
  1690.         cnop 0,2
  1691. a00Gadget20:
  1692.         dc.l    a00Gadget21     ;next gadget
  1693.         dc.w    346,94  ;origin XY of hit box relative to window TopLeft
  1694.         dc.w    48,8    ;hit box width and height
  1695.         dc.w    NULL    ;gadget flags
  1696.         dc.w    RELVERIFY       ;activation flags
  1697.         dc.w    BOOLGADGET      ;gadget type flags
  1698.         dc.l    a00Border19     ;gadget border or image to be rendered
  1699.         dc.l    NULL    ;alternate imagery for selection
  1700.         dc.l    a00IText10      ;first IntuiText structure
  1701.         dc.l    NULL    ;gadget mutual-exclude long word
  1702.         dc.l    NULL    ;SpecialInfo structure
  1703.         dc.w    13      ;user-definable data
  1704.         dc.l    NULL    ;pointer to user-definable data
  1705. a00Border19:
  1706.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1707.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1708.         dc.b    5       ;number of XY vectors
  1709.         dc.l    a00BorderVectors19      ;pointer to XY vectors
  1710.         dc.l    NULL    ;next border in list
  1711. a00BorderVectors19:
  1712.         dc.w    0,0
  1713.         dc.w    49,0
  1714.         dc.w    49,9
  1715.         dc.w    0,9
  1716.         dc.w    0,0
  1717. a00IText10:
  1718.         dc.b    2,1,RP_JAM2,0   ;front and back text pens, drawmode and fill byte
  1719.         dc.w    0,0     ;XY origin relative to container TopLeft
  1720.         dc.l    NULL    ;font pointer or NULL for default
  1721.         dc.l    a00ITextText10  ;pointer to text
  1722.         dc.l    NULL    ;next IntuiText structure
  1723. a00ITextText10:
  1724.         dc.b    '  Ok  ',0
  1725.         cnop 0,2
  1726. a00Gadget21:
  1727.         dc.l    a00Gadget22     ;next gadget
  1728.         dc.w    291,75  ;origin XY of hit box relative to window TopLeft
  1729.         dc.w    74,9    ;hit box width and height
  1730.         dc.w    NULL    ;gadget flags
  1731.         dc.w    RELVERIFY       ;activation flags
  1732.         dc.w    BOOLGADGET      ;gadget type flags
  1733.         dc.l    a00Border20     ;gadget border or image to be rendered
  1734.         dc.l    NULL    ;alternate imagery for selection
  1735.         dc.l    a00IText11      ;first IntuiText structure
  1736.         dc.l    NULL    ;gadget mutual-exclude long word
  1737.         dc.l    NULL    ;SpecialInfo structure
  1738.         dc.w    11      ;user-definable data
  1739.         dc.l    NULL    ;pointer to user-definable data
  1740. a00Border20:
  1741.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1742.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1743.         dc.b    5       ;number of XY vectors
  1744.         dc.l    a00BorderVectors20      ;pointer to XY vectors
  1745.         dc.l    NULL    ;next border in list
  1746. a00BorderVectors20:
  1747.         dc.w    0,0
  1748.         dc.w    75,0
  1749.         dc.w    75,10
  1750.         dc.w    0,10
  1751.         dc.w    0,0
  1752. a00IText11:
  1753.         dc.b    1,0,RP_JAM1,0   ;front and back text pens, drawmode and fill byte
  1754.         dc.w    13,1    ;XY origin relative to container TopLeft
  1755.         dc.l    NULL    ;font pointer or NULL for default
  1756.         dc.l    a00ITextText11  ;pointer to text
  1757.         dc.l    NULL    ;next IntuiText structure
  1758. a00ITextText11:
  1759.         dc.b    'Parent',0
  1760.         cnop 0,2
  1761. a00Gadget22:
  1762.         dc.l    a00Gadget23     ;next gadget
  1763.         dc.w    251,75  ;origin XY of hit box relative to window TopLeft
  1764.         dc.w    34,9    ;hit box width and height
  1765.         dc.w    NULL    ;gadget flags
  1766.         dc.w    RELVERIFY       ;activation flags
  1767.         dc.w    BOOLGADGET      ;gadget type flags
  1768.         dc.l    a00Border21     ;gadget border or image to be rendered
  1769.         dc.l    NULL    ;alternate imagery for selection
  1770.         dc.l    a00IText12      ;first IntuiText structure
  1771.         dc.l    NULL    ;gadget mutual-exclude long word
  1772.         dc.l    NULL    ;SpecialInfo structure
  1773.         dc.w    09      ;user-definable data
  1774.         dc.l    NULL    ;pointer to user-definable data
  1775. a00Border21:
  1776.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1777.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1778.         dc.b    5       ;number of XY vectors
  1779.         dc.l    a00BorderVectors21      ;pointer to XY vectors
  1780.         dc.l    NULL    ;next border in list
  1781. a00BorderVectors21:
  1782.         dc.w    0,0
  1783.         dc.w    35,0
  1784.         dc.w    35,10
  1785.         dc.w    0,10
  1786.         dc.w    0,0
  1787. a00IText12:
  1788.         dc.b    1,2,RP_JAM1,0   ;front and back text pens, drawmode and fill byte
  1789.         dc.w    5,1     ;XY origin relative to container TopLeft
  1790.         dc.l    NULL    ;font pointer or NULL for default
  1791.         dc.l    a00ITextText12  ;pointer to text
  1792.         dc.l    NULL    ;next IntuiText structure
  1793. a00ITextText12:
  1794.         dc.b    'RAM',0
  1795.         cnop 0,2
  1796. a00Gadget23:
  1797.         dc.l    a00Gadget24     ;next gadget
  1798.         dc.w    371,75  ;origin XY of hit box relative to window TopLeft
  1799.         dc.w    34,9    ;hit box width and height
  1800.         dc.w    NULL    ;gadget flags
  1801.         dc.w    RELVERIFY       ;activation flags
  1802.         dc.w    BOOLGADGET      ;gadget type flags
  1803.         dc.l    a00Border22     ;gadget border or image to be rendered
  1804.         dc.l    NULL    ;alternate imagery for selection
  1805.         dc.l    a00IText13      ;first IntuiText structure
  1806.         dc.l    NULL    ;gadget mutual-exclude long word
  1807.         dc.l    NULL    ;SpecialInfo structure
  1808.         dc.w    10      ;user-definable data
  1809.         dc.l    NULL    ;pointer to user-definable data
  1810. a00Border22:
  1811.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1812.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1813.         dc.b    5       ;number of XY vectors
  1814.         dc.l    a00BorderVectors22      ;pointer to XY vectors
  1815.         dc.l    NULL    ;next border in list
  1816. a00BorderVectors22:
  1817.         dc.w    0,0
  1818.         dc.w    35,0
  1819.         dc.w    35,10
  1820.         dc.w    0,10
  1821.         dc.w    0,0
  1822. a00IText13:
  1823.         dc.b    1,2,RP_JAM1,0   ;front and back text pens, drawmode and fill byte
  1824.         dc.w    6,1     ;XY origin relative to container TopLeft
  1825.         dc.l    NULL    ;font pointer or NULL for default
  1826.         dc.l    a00ITextText13  ;pointer to text
  1827.         dc.l    NULL    ;next IntuiText structure
  1828. a00ITextText13:
  1829.         dc.b    'RAD',0
  1830.         cnop 0,2
  1831. a00Gadget24:
  1832.         dc.l    a00Gadget25     ;next gadget
  1833.         dc.w    283,14  ;origin XY of hit box relative to window TopLeft
  1834.         dc.w    85,8    ;hit box width and height
  1835.         dc.w    GADGHBOX+GADGHIMAGE     ;gadget flags
  1836.         dc.w    NULL    ;activation flags
  1837.         dc.w    BOOLGADGET      ;gadget type flags
  1838.         dc.l    a00Border23     ;gadget border or image to be rendered
  1839.         dc.l    NULL    ;alternate imagery for selection
  1840.         dc.l    a00IText14      ;first IntuiText structure
  1841.         dc.l    NULL    ;gadget mutual-exclude long word
  1842.         dc.l    NULL    ;SpecialInfo structure
  1843.         dc.w    99      ;user-definable data
  1844.         dc.l    NULL    ;pointer to user-definable data
  1845. a00Border23:
  1846.         dc.w    -38,1   ;XY origin relative to container TopLeft
  1847.         dc.b    1,0,RP_JAM1     ;front pen, back pen and drawmode
  1848.         dc.b    5       ;number of XY vectors
  1849.         dc.l    a00BorderVectors23      ;pointer to XY vectors
  1850.         dc.l    NULL    ;next border in list
  1851. a00BorderVectors23:
  1852.         dc.w    0,0
  1853.         dc.w    165,0
  1854.         dc.w    165,73
  1855.         dc.w    0,73
  1856.         dc.w    0,1
  1857. a00IText14:
  1858.         dc.b    2,1,RP_JAM2,0   ;front and back text pens, drawmode and fill byte
  1859.         dc.w    6,2     ;XY origin relative to container TopLeft
  1860.         dc.l    NULL    ;font pointer or NULL for default
  1861.         dc.l    a00ITextText14  ;pointer to text
  1862.         dc.l    NULL    ;next IntuiText structure
  1863. a00ITextText14:
  1864.         dc.b    '  Drawer  ',0
  1865.         cnop 0,2
  1866. a00Gadget25:
  1867.         dc.l    NULL    ;next gadget
  1868.         dc.w    10,94   ;origin XY of hit box relative to window TopLeft
  1869.         dc.w    200,8   ;hit box width and height
  1870.         dc.w    NULL    ;gadget flags
  1871.         dc.w    RELVERIFY       ;activation flags
  1872.         dc.w    STRGADGET       ;gadget type flags
  1873.         dc.l    a00Border24     ;gadget border or image to be rendered
  1874.         dc.l    NULL    ;alternate imagery for selection
  1875.         dc.l    NULL    ;first IntuiText structure
  1876.         dc.l    NULL    ;gadget mutual-exclude long word
  1877.         dc.l    a00a00Gadget25SInfo     ;SpecialInfo structure
  1878.         dc.w    23      ;user-definable data
  1879.         dc.l    NULL    ;pointer to user-definable data
  1880. a00a00Gadget25SInfo:
  1881.         dc.l    filename
  1882.         dc.l    NULL    ;optional undo buffer
  1883.         dc.w    0       ;character position in buffer
  1884.         dc.w    30      ;maximum number of characters to allow
  1885. ffilep  dc.w    0       ;first displayed character buffer position
  1886.         dc.w    0,0,0,0,0       ;Intuition initialized and maintained variables
  1887.         dc.l    0       ;Rastport of gadget
  1888.         dc.l    0       ;initial value for integer gadgets
  1889.         dc.l    NULL    ;alternate keymap (fill in if you set the flag)
  1890. filename:
  1891.         dcb.b 32,0
  1892.         cnop 0,2
  1893. a00Border24:
  1894.         dc.w    -1,-1   ;XY origin relative to container TopLeft
  1895.         dc.b    3,0,RP_JAM1     ;front pen, back pen and drawmode
  1896.         dc.b    5       ;number of XY vectors
  1897.         dc.l    a00BorderVectors24      ;pointer to XY vectors
  1898.         dc.l    NULL    ;next border in list
  1899. a00BorderVectors24:
  1900.         dc.w    0,0
  1901.         dc.w    201,0
  1902.         dc.w    201,9
  1903.         dc.w    0,9
  1904.         dc.w    0,0
  1905.  
  1906. * Structure to print filenames ---------------------------------------------
  1907.  
  1908. faffnames       dc.b 1,1        :Colors
  1909.                 dc.b 0          :Modus JAM1
  1910.                 even            :parity
  1911.                 dc.w 10         :pos X
  1912.                 dc.w 17         :pos Y
  1913.                 dc.l 0          :font
  1914.                 dc.l fnames     :text
  1915.                 dc.l 0          :next text
  1916. fnames          ds.l 13
  1917.  
  1918. * Structure to print new filename after scrolling up or down ---------------
  1919.  
  1920. faffnewline     dc.b 1,1        :Colors
  1921.                 dc.b 0          :Modus JAM1
  1922.                 even            :parity
  1923.                 dc.w 10         :pos X
  1924. faffpos         dc.w 80         :pos Y
  1925.                 dc.l 0          :font
  1926.                 dc.l fafftext   :text
  1927.                 dc.l 0          :next text
  1928. fafftext        ds.l 13
  1929.                 end
  1930.  
  1931.