home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff292.lzh / FileRequest / FileRequest.s < prev    next >
Text File  |  1989-12-10  |  51KB  |  1,862 lines

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