home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 2 / goldfish_vol2_cd1.bin / files / dev / gui / triton / programmer / gcc / source / tr_getattribute.c < prev    next >
C/C++ Source or Header  |  1994-07-14  |  913b  |  30 lines

  1. /*
  2.  *  Triton - The object oriented GUI creation system for the Amiga
  3.  *  Written by Stefan Zeiger in 1993-1994
  4.  *
  5.  *  (c) 1993-1994 by Stefan Zeiger
  6.  *  You are hereby allowed to use this source or parts of it for
  7.  *  creating programs for AmigaOS which use the Triton GUI creation
  8.  *  system. All other rights reserved.
  9.  *
  10.  *  Triton linkable library code for GCC - (c) 1994 by Gunther Nikl
  11.  */
  12.  
  13. #include "triton.h"
  14.  
  15. extern struct Library *TritonBase;
  16.  
  17. ULONG TR_GetAttribute(struct TR_Project *project, ULONG id, ULONG attribute)
  18. {
  19.   register ULONG _res __asm("d0");
  20.   register struct Library *a6 __asm("a6") = TritonBase;
  21.   register struct TR_Project *a0 __asm("a0") = project;
  22.   register ULONG d0 __asm("d0") = id;
  23.   register ULONG d1 __asm("d1") = attribute;
  24.   __asm __volatile ("jsr a6@(-0x42)"
  25.   : "=r" (_res)
  26.   : "r" (a6), "r" (a0), "r" (d0), "r" (d1)
  27.   : "a0","a1","d0","d1", "memory");
  28.   return _res;
  29. }
  30.