home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 6 / AACD06.ISO / AACD / Programming / DOpus4-GPL / Library / functions2.a < prev    next >
Text File  |  2000-01-27  |  2KB  |  111 lines

  1. ; Directory Opus 4
  2. ; Original GPL release version 4.12
  3. ; Copyright 1993-2000 Jonathan Potter
  4. ; This program is free software; you can redistribute it and/or
  5. ; modify it under the terms of the GNU General Public License
  6. ; as published by the Free Software Foundation; either version 2
  7. ; of the License, or (at your option) any later version.
  8. ; This program is distributed in the hope that it will be useful,
  9. ; but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. ; GNU General Public License for more details.
  12. ; You should have received a copy of the GNU General Public License
  13. ; along with this program; if not, write to the Free Software
  14. ; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  15. ; All users of Directory Opus 4 (including versions distributed
  16. ; under the GPL) are entitled to upgrade to the latest version of
  17. ; Directory Opus version 5 at a reduced price. Please see
  18. ; http://www.gpsoft.com.au for more information.
  19. ; The release of Directory Opus 4 under the GPL in NO WAY affects
  20. ; the existing commercial status of Directory Opus 5.
  21.  
  22.     SECTION    code
  23.  
  24.     INCLUDE "exec/types.i"
  25.     INCLUDE "exec/initializers.i"
  26.     INCLUDE "exec/libraries.i"
  27.     INCLUDE "exec/lists.i"
  28.     INCLUDE "exec/alerts.i"
  29.     INCLUDE "exec/resident.i"
  30.     INCLUDE "exec/ports.i"
  31.     INCLUDE "exec/io.i"
  32.     INCLUDE "libraries/dos.i"
  33.     INCLUDE "graphics/rastport.i"
  34.  
  35.     INCLUDE "asmsupp.i"
  36.     INCLUDE "dopusbase.i"
  37.  
  38.     XDEF BtoCStr
  39.     XDEF ActivateStrGad
  40.     XDEF RefreshStrGad
  41.     
  42. BtoCStr:
  43.     subq.l #1,d0
  44.     move.l a0,d1
  45.     lsl.l #2,d1
  46.     move.l d1,a0
  47.     moveq.l #0,d1
  48.     move.b (a0)+,d1
  49.     cmp.l d0,d1
  50.     ble conloop
  51.     move.l d0,d1
  52. conloop:
  53.     move.b (a0)+,(a1)+
  54.     dbeq d1,conloop
  55.     move.b #0,(a1)
  56.     rts
  57.  
  58. ActivateStrGad:
  59.     movem.l d2/a2-a4/a6,-(sp)
  60.     btst.b #0,12(a0)
  61.     bne.s noact
  62.     move.l 34(a0),a2
  63.     move.l (a2),a3
  64.     moveq.l #0,d2
  65. lenloop:
  66.     addq.w #1,d2
  67.     tst.b (a3)+
  68.     bne lenloop
  69.     subq.w #1,d2
  70.     btst.b #2,14(a0)
  71.     beq strleft
  72.     move.w #0,8(a2)
  73.     bra doact
  74. strleft:
  75.     move.w d2,8(a2)
  76. doact:
  77.     move.l a0,a3
  78.     move.l a1,a4
  79.     move.l #0,a2
  80.     moveq.l #1,d0
  81.     move.l db_IntuitionBase(a6),a6
  82.     jsr _LVORefreshGList(a6)
  83.     move.l a3,a0
  84.     move.l a4,a1
  85.     move.l #0,a2
  86.     jsr _LVOActivateGadget(a6)
  87. noact:
  88.     movem.l (sp)+,d2/a2-a4/a6
  89.     rts
  90.  
  91. RefreshStrGad:
  92.     movem.l a2/a3/a6,-(sp)
  93.     move.l 34(a0),a2
  94.     move.w #0,8(a2)
  95.     move.l a0,a3
  96.     or.w #3,12(a3)
  97.     move.l #0,a2
  98.     moveq.l #1,d0
  99.     move.l db_IntuitionBase(a6),a6
  100.     jsr _LVORefreshGList(a6)
  101.     and.w #-4,12(a3)
  102.     movem.l (sp)+,a2/a3/a6
  103.     rts
  104.  
  105.     end
  106.