home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Pascal / HISOFTPASCAL2,0-2.DMS / in.adf / Units / Potgo.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-05-20  |  697 b   |  55 lines

  1. unit Potgo;
  2.  
  3. INTERFACE
  4. uses Exec;
  5.  
  6.  
  7. var
  8.     PotgoBase: pLibrary;
  9.  
  10.  
  11. const
  12.     POTGONAME = 'potgo.resource';
  13.  
  14.  
  15. function AllocPotBits (bits: word): word;
  16. procedure FreePotBits (bits: word);
  17. procedure WritePotgo
  18.         (word: word;
  19.         mask: word);
  20.  
  21.  
  22.  
  23. IMPLEMENTATION
  24. function AllocPotBits; xassembler;
  25. asm
  26.     move.l    a6,-(sp)
  27.     move.w    8(sp),d0
  28.     move.l    PotgoBase,a6
  29.     jsr        -6(a6)
  30.     move.w    d0,$A(sp)
  31.     move.l    (sp)+,a6
  32. end;
  33.  
  34. procedure FreePotBits; xassembler;
  35. asm
  36.     move.l    a6,-(sp)
  37.     move.w    8(sp),d0
  38.     move.l    PotgoBase,a6
  39.     jsr        -$C(a6)
  40.     move.l    (sp)+,a6
  41. end;
  42.  
  43. procedure WritePotgo; xassembler;
  44. asm
  45.     move.l    a6,-(sp)
  46.     lea        8(sp),a6
  47.     move.w    (a6)+,d1
  48.     move.w    (a6)+,d0
  49.     move.l    PotgoBase,a6
  50.     jsr        -$12(a6)
  51.     move.l    (sp)+,a6
  52. end;
  53.  
  54. end.
  55.