home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / GCC / GERLIB_DEV08B.LHA / gerlib / amiga_lib / support / ArgArrayInitDone.s < prev    next >
Encoding:
Text File  |  1993-12-12  |  3.5 KB  |  256 lines

  1.     .globl    _ArgArrayInit
  2. _ArgArrayInit:
  3.  
  4.     moveml    d5/d6/d7/a2/a3,sp@-
  5.     movel    sp@(0x18),d7
  6.     movel    sp@(0x1c),a3
  7.     subl    a2,a2
  8.     tstl    d7
  9.     beq    Weiter104
  10.     moveq    #1,d0
  11.     cmpl    d0,d7
  12.     bne    Weiterc0
  13.     moveq    #0,d0
  14.     bra    Weiter122
  15. Weiterc0:
  16.     movel    d7,d0
  17.     asll    #2,d0
  18. .if 0
  19.     movel    d0,a4@(_CXLIB_argarray_size:W)
  20. .else
  21.     movel    d0,_CXLIB_argarray_size
  22. .endif
  23.     movel    #0x10000,d1
  24.     movel    a6,sp@-
  25.     movel    4:w,a6
  26.     jsr    a6@(-0x2ac)        | exec, umschreiben !
  27.                     | AllocVec(byteSize=d0, attributes=d1)
  28.     movel    sp@+,a6
  29. .if 0
  30.     movel    d0,a4@(_CXLIB_argarray:W)
  31. .else
  32.     movel    d0,_CXLIB_argarray
  33. .endif
  34.     beq    Weiter122
  35.     moveq    #0,d6
  36.     subql    #1,d7            | ??
  37.     moveq    #0,d5
  38.     bra    WeiterF8
  39.  
  40. WeiterE8:
  41. .if 0
  42.     movel    a4@(_CXLIB_argarray:W),a0
  43. .else
  44.     movel    _CXLIB_argarray,a0
  45. .endif
  46.     addl    d5,a0
  47.     movel    a3@(4,d5:L),a0@
  48.     addql    #1,d6
  49.     addql    #4,d5
  50.  
  51. WeiterF8:
  52.     cmpl    d7,d6
  53.     bcs    WeiterE8
  54. .if 0
  55.     movel    a4@(_CXLIB_argarray:W),d0
  56. .else
  57.     movel    _CXLIB_argarray,d0
  58. .endif
  59.     bra    Weiter122
  60.  
  61. Weiter104:
  62.     movel    a3@(0x24),a0
  63.     movel    a0@(4),a0
  64.     movel    a6,sp@-
  65. .if 0
  66.     movel    a4@(_IconBase:W),a6
  67. .else
  68.     movel    _IconBase,a6
  69. .endif
  70.     jsr     a6@(-0x4e)
  71.     movel    sp@+,a6
  72.  
  73.                     |       diskobj = GetDiskObject(name)
  74.                     |         D0                      A0
  75.  
  76. .if 0
  77.     movel    d0,a4@(Data228:W)
  78. .else
  79.     movel    d0,Data228
  80. .endif
  81.     tstl    d0
  82.     beq    Weiter120
  83.     movel    d0,a0
  84.     movel   a0@(0x36),a2
  85.  
  86. Weiter120:
  87.     movel    a2,d0
  88. Weiter122:
  89.     moveml    sp@+,d5/d6/d7/a2/a3
  90.     rts
  91.  
  92.     .globl _ArgArrayDone
  93. _ArgArrayDone:
  94. .if 0
  95.     tstl    a4@(_CXLIB_argarray:W)
  96. .else
  97.     tstl    _CXLIB_argarray
  98. .endif
  99.     beq    Weiter13c
  100. .if 0
  101.     movel    a4@(_CXLIB_argarray:W),a1
  102. .else
  103.     movel    _CXLIB_argarray,a1
  104. .endif
  105.     movel    a6,sp@-
  106.     movel    4:W,a6
  107.     jsr    a6@(-0x2b2)        | FreVec (membl=a1)
  108.     movel    sp@+,a6
  109. Weiter13c:
  110. .if 0
  111.     movel    a4@(Data228:W),d0
  112. .else
  113.     movel    Data228,d0
  114. .endif
  115.     tstl    d0
  116.     beq    Weiter14c
  117.     movel    d0,a0
  118.     movel    a6,sp@-
  119. .if 0
  120.     movel    a4@(_IconBase:W),a6
  121. .else
  122.     movel    _IconBase,a6
  123. .endif
  124.     jsr    a6@(-0x5a)        | FreeDiskObject (a0)
  125.     movel    sp@+,a6
  126. Weiter14c:
  127.     rts
  128.  
  129.     .globl    _ArgString
  130. _ArgString:
  131.     linkw    a5,#0
  132.     moveml    a2/a3,sp@-
  133.     movel    a5@(8),a0       | eventuell anders herum
  134.     movel    a5@(12),a1
  135.     movel    a0,d0
  136.     beq    Weiter176
  137.     movel    a6,sp@-
  138. .if 0
  139.     movel    a4@(_IconBase:W),a6
  140. .else
  141.     movel    _IconBase,a6
  142. .endif
  143.     jsr    a6@(-0x60)    | FindToolType a0=toolTypeArray, a1=TypeName
  144.     movel   sp@+,a6
  145.  
  146.     movel    d0,a3
  147.     movel    a3,d0
  148.     beq    Weiter176
  149.     movel    a3,d0
  150.     bra    Weiter17a
  151.  
  152. Weiter176:
  153.     movel   a5@(0x10),d0
  154. Weiter17a:
  155.     moveml    sp@+,a2/a3
  156.     unlk    a5
  157.     rts
  158.  
  159.     .globl    _ArgInt
  160. _ArgInt:
  161.     linkw    a5,#0
  162.     moveml    a2/a3,sp@-
  163.     movel    a5@(8),a0
  164.     movel    a5@(12),a1
  165.     movel    a0,d0
  166.     beq    Weiter1b2
  167.  
  168.     movel    a6,sp@-
  169. .if 0
  170.     movel    a4@(_IconBase:W),a6
  171. .else
  172.     movel    _IconBase,a6
  173. .endif
  174.     jsr    a6@(-0x60)    | FindToolType a0=toolTypeArray, a1=TypeName
  175.     movel   sp@+,a6
  176.  
  177.     movel    d0,a3
  178.     movel    a3,d0
  179.     beq    Weiter1b2
  180.  
  181.     lea    a5@(0x10),a0
  182.     movel    a0,d2
  183.     movel    a3,d1
  184.     movel    a6,sp@-
  185. .if 0
  186.     movel    a4@(_DOSBase:W),a6
  187. .else
  188.     movel    _DOSBase,a6
  189. .endif
  190.     jsr    a6@(-0x330)    | StrToLong
  191.     movel    sp@+,a6
  192.  
  193. Weiter1b2:
  194.     movel    a5@(0x10),d0
  195.     moveml    sp@+,a2/a3
  196.     unlk    a5
  197.     rts
  198.  
  199.  
  200.     .globl    _UserFilter
  201. _UserFilter:
  202.     linkw    a5,#-4
  203.     moveml    a2/a3/a6,sp@-
  204.     movel    a5@(8),a3
  205.     subl    a2,a2
  206.     movel    a3,d0
  207.  
  208.     beq    Weiter1de
  209.     movel    a5@(12),a1
  210.     movel    a3,a0
  211.  
  212. |    movel    a6,sp@-
  213. .if 0
  214.     movel    a4@(_IconBase:W),a6
  215. .else
  216.     movel    _IconBase,a6
  217. .endif
  218.     jsr    a6@(-0x60)    | FindToolType a0=toolTypeArray, a1=TypeName
  219. |    movel   sp@+,a6
  220.  
  221.  
  222.     movel    d0,a2
  223.  
  224. Weiter1de:
  225.     movel    a2,d0
  226.     beq    Weiter1e6
  227.     movel    a2,a0
  228.     bra    Weiter1ea
  229.  
  230. Weiter1e6:
  231.     movel    a5@(0x10),a0
  232. Weiter1ea:
  233.     moveq    #1,d0
  234.     subl    a1,a1
  235. .if 0
  236.     movel    a4@(_CxBase:W),a6
  237. .else
  238.     movel    _CxBase,a6
  239. .endif
  240.     jsr    a6@(-0x1e)
  241.     moveml    sp@+,a2/a3/a6
  242.     unlk    a5
  243.     rts
  244.  
  245.     .data
  246.     .even
  247.     .globl _CXLIB_argarray
  248. _CXLIB_argarray:
  249.     .long 0
  250. Data228:
  251.     .long 0
  252.  
  253.     .comm _CXLIB_argarray_size,4
  254.  
  255.  
  256.